Remove sprite size limit when fencing is disabled

This commit is contained in:
Thomas Weber committed 2021-03-25 18:38:49 -05:00
1 parent 68bbe2a010
commit 1c41126a7b
1 file changed
+4 -3
+4 -3
View File
@@ -377,11 +377,12 @@ class RenderedTarget extends Target {
const costumeSize = this.renderer.getCurrentSkinSize(this.drawableID);
const origW = costumeSize[0];
const origH = costumeSize[1];
const minScale = Math.min(1, Math.max(5 / origW, 5 / origH));
const maxScale = Math.min(
const fencing = this.runtime.runtimeOptions.fencing;
const minScale = fencing ? Math.min(1, Math.max(5 / origW, 5 / origH)) : 0;
const maxScale = fencing ? Math.min(
(1.5 * this.runtime.stageWidth) / origW,
(1.5 * this.runtime.stageHeight) / origH
);
) : Infinity;
this.size = MathUtil.clamp(size / 100, minScale, maxScale) * 100;
const {direction, scale} = this._getRenderedDirectionAndScale();
this.renderer.updateDrawableDirectionScale(this.drawableID, direction, scale);