@petkoneo/phaser3-rex-plugins
Version:
18 lines (14 loc) • 443 B
JavaScript
import FitToSize from '../../../../utils/size/FitTo.js';
var ScaleImage = function () {
var image = this.image;
if ((!this.scaleUp) &&
(image.width <= this.width) && (image.height <= this.height)
) {
return this;
}
var result = FitToSize(image, this, 'FIT', true);
image.setDisplaySize(result.width, result.height);
this.resetChildScaleState(image);
return this;
}
export default ScaleImage;