diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 8e23ee0b..96bef56d 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -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);