Remove sprite size limit when fencing is disabled
This commit is contained in:
1 file changed
+4
-3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user