From 91ba02b879325cb5575f116247b4309d40db11cf Mon Sep 17 00:00:00 2001 From: "DangoCat[bot]" Date: Sun, 29 Dec 2024 02:10:23 +0000 Subject: [PATCH] [Automated] Format code --- extensions/SharkPool/Renderer-Control.js | 144 ++++++++++++++--------- 1 file changed, 86 insertions(+), 58 deletions(-) diff --git a/extensions/SharkPool/Renderer-Control.js b/extensions/SharkPool/Renderer-Control.js index 05cfcccb86..cfc60c0552 100644 --- a/extensions/SharkPool/Renderer-Control.js +++ b/extensions/SharkPool/Renderer-Control.js @@ -7,10 +7,11 @@ (function (Scratch) { "use strict"; - if (!Scratch.extensions.unsandboxed) throw new Error("Render Control must run unsandboxed!"); + if (!Scratch.extensions.unsandboxed) + throw new Error("Render Control must run unsandboxed!"); const menuIconURI = -"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NS4zMDMiIGhlaWdodD0iODUuMzAzIiB2aWV3Qm94PSIwIDAgODUuMzAzIDg1LjMwMyI+PGcgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIj48cGF0aCBkPSJNMiA0Mi42NTJDMiAyMC4yMDEgMjAuMiAyIDQyLjY1MiAyYzIyLjQ1MSAwIDQwLjY1MiAxOC4yIDQwLjY1MiA0MC42NTIgMCAyMi40NTEtMTguMiA0MC42NTItNDAuNjUyIDQwLjY1MkMyMC4yMDEgODMuMzA0IDIgNjUuMTA0IDIgNDIuNjUyeiIgZmlsbD0iIzUzODZiNSIgc3Ryb2tlPSIjMmY0YzY3IiBzdHJva2Utd2lkdGg9IjQiLz48cGF0aCBkPSJtNDQuODc5IDY2Ljg3Mi0zLjk2NSAxLjY2IDEuNjYzLTMuOTUxYzEuMTM3LTIuNjk4IDIuNzEyLTUuMDU5IDQuNjkyLTcuMDMxbDE4LjQyMi0xOC4zNTRjLjc5LS43ODYgMi40NzItLjM4MyAzLjc2MS45MDIgMS4yODcgMS4yODIgMS42OTQgMi45Ni45M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+31,16 @@ blockType: Scratch.BlockType.REPORTER, text: Scratch.translate("get ID layer of [TARGET]"), arguments: { - TARGET: { type: Scratch.ArgumentType.STRING, menu: "TARGETS" } - } + TARGET: { type: Scratch.ArgumentType.STRING, menu: "TARGETS" }, + }, }, { opcode: "getOwner", blockType: Scratch.BlockType.REPORTER, text: Scratch.translate("get owner of layer ID [ID]"), arguments: { - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, "---", { @@ -47,8 +48,8 @@ blockType: Scratch.BlockType.REPORTER, text: Scratch.translate("export ID [ID] as data.uri"), arguments: { - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 }, + }, }, { opcode: "setQuality", @@ -56,8 +57,8 @@ text: Scratch.translate("set quality of ID [ID] to [NUM]"), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 }, - NUM: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 } - } + NUM: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 }, + }, }, "---", { @@ -67,16 +68,16 @@ arguments: { EFFECT: { type: Scratch.ArgumentType.STRING, menu: "EFFECTS" }, NUM: { type: Scratch.ArgumentType.NUMBER, defaultValue: 50 }, - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 1 }, + }, }, { opcode: "resetID", blockType: Scratch.BlockType.COMMAND, text: Scratch.translate("reset effects of ID [ID]"), arguments: { - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, "---", { @@ -86,8 +87,8 @@ arguments: { ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, x: { type: Scratch.ArgumentType.NUMBER, defaultValue: 100 }, - y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 100 } - } + y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 100 }, + }, }, { opcode: "scaleOfID", @@ -95,8 +96,8 @@ text: Scratch.translate("scale [XY] of ID [ID]"), arguments: { XY: { type: Scratch.ArgumentType.STRING, menu: "XY" }, - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, "---", { @@ -106,8 +107,8 @@ arguments: { ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, x: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, - y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, { opcode: "posOfID", @@ -115,8 +116,8 @@ text: Scratch.translate("[XY] position of ID [ID]"), arguments: { XY: { type: Scratch.ArgumentType.STRING, menu: "XY" }, - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, "---", { @@ -125,26 +126,28 @@ text: Scratch.translate("set direction of ID [ID] to [ANGLE]"), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, - ANGLE: { type: Scratch.ArgumentType.ANGLE, defaultValue: 90 } - } + ANGLE: { type: Scratch.ArgumentType.ANGLE, defaultValue: 90 }, + }, }, { opcode: "dirOfID", blockType: Scratch.BlockType.REPORTER, text: Scratch.translate("direction of ID [ID]"), arguments: { - ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, { opcode: "rotateID", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("set rotation center of ID [ID] to x [x] y [y]"), + text: Scratch.translate( + "set rotation center of ID [ID] to x [x] y [y]" + ), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, x: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, - y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 } - } + y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, + }, }, { opcode: "rotateOfID", @@ -153,14 +156,14 @@ arguments: { XY: { type: Scratch.ArgumentType.STRING, menu: "XY" }, ID: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 }, - } + }, }, ], menus: { XY: ["x", "y"], TARGETS: { acceptReporters: true, items: "_getTargets" }, - EFFECTS: { acceptReporters: true, items: "_getEffects" } - } + EFFECTS: { acceptReporters: true, items: "_getEffects" }, + }, }; } @@ -170,20 +173,23 @@ { text: Scratch.translate("myself"), value: "_myself_" }, { text: Scratch.translate("Stage"), value: "_stage_" }, { text: Scratch.translate("Video Layer"), value: "_video_" }, - { text: Scratch.translate("Pen Layer"), value: "_pen_" } + { text: Scratch.translate("Pen Layer"), value: "_pen_" }, ]; // Custom Drawable Layer (CST's 3D or Simple3D Exts for Example) for (var i = 0; i < render._allDrawables.length; i++) { const drawable = render._allDrawables[i]; - if (drawable !== undefined && drawable.customDrawableName !== undefined) spriteNames.push({ - text: drawable.customDrawableName, value: `${i}=SP-custLayer` - }); + if (drawable !== undefined && drawable.customDrawableName !== undefined) + spriteNames.push({ + text: drawable.customDrawableName, + value: `${i}=SP-custLayer`, + }); } // Sprites const targets = runtime.targets; for (let index = 1; index < targets.length; index++) { const target = targets[index]; - if (target.isOriginal) spriteNames.push({ text: target.getName(), value: target.getName() }); + if (target.isOriginal) + spriteNames.push({ text: target.getName(), value: target.getName() }); } return spriteNames.length > 0 ? spriteNames : [""]; } @@ -196,13 +202,15 @@ // Block Funcs getID(args, util) { if (args.TARGET === "_myself_") return util.target.drawableID; - if (args.TARGET === "_stage_") return runtime.getTargetForStage().drawableID; + if (args.TARGET === "_stage_") + return runtime.getTargetForStage().drawableID; if (args.TARGET === "_pen_") return runtime.ext_pen?._penDrawableId || ""; const videoL = runtime.ioDevices.video._drawable; if (args.TARGET === "_video_") return videoL !== -1 ? videoL : ""; if (args.TARGET.includes("=SP-custLayer")) { const layerID = parseInt(args.TARGET); - if (render._allDrawables[layerID]?.customDrawableName !== undefined) return layerID; + if (render._allDrawables[layerID]?.customDrawableName !== undefined) + return layerID; } const target = runtime.getSpriteTargetByName(args.TARGET); return target ? target.drawableID : ""; @@ -218,14 +226,14 @@ if (ID === vidID) return "Video Layer"; // Sprite Check for (const target of runtime.targets) { - if (target.drawableID === ID) return `${target.getName()}${target.isOriginal ? "" : " (Clone)"}`; + if (target.drawableID === ID) + return `${target.getName()}${target.isOriginal ? "" : " (Clone)"}`; } // Custom Layer Check for (var i = 0; i < render._allDrawables.length; i++) { const drawable = render._allDrawables[i]; - if ( - drawable.customDrawableName !== undefined && i === ID - ) return drawable.customDrawableName; + if (drawable.customDrawableName !== undefined && i === ID) + return drawable.customDrawableName; } return ""; } @@ -247,40 +255,51 @@ const drawable = render._allDrawables[ID]; const penID = runtime.ext_pen?._penDrawableId || ""; drawable.setHighQuality(true); - if (penID === ID) drawable.skin.setRenderQuality(Math.max(0.05, Math.min(34, value / 3))); // 3 is the max before webgl errors - else drawable.skin._maxTextureScale = Math.max(1, Math.min(100, Math.round(value))); + if (penID === ID) + drawable.skin.setRenderQuality(Math.max(0.05, Math.min(34, value / 3))); // 3 is the max before webgl errors + else + drawable.skin._maxTextureScale = Math.max( + 1, + Math.min(100, Math.round(value)) + ); drawable.skin.emitWasAltered(); } effectID(args) { const num = Scratch.Cast.toNumber(args.NUM); const allLay = render._drawList; - if (!this._getEffects().some(effect => effect === args.EFFECT)) return; - if (allLay.indexOf(args.ID) !== -1) render._allDrawables[args.ID].updateEffect(args.EFFECT, num); + if (!this._getEffects().some((effect) => effect === args.EFFECT)) return; + if (allLay.indexOf(args.ID) !== -1) + render._allDrawables[args.ID].updateEffect(args.EFFECT, num); } scaleID(args) { const allLay = render._drawList; - if (allLay.indexOf(args.ID) !== -1) render._allDrawables[args.ID].updateScale([ - Scratch.Cast.toNumber(args.x), Scratch.Cast.toNumber(args.y) - ]); + if (allLay.indexOf(args.ID) !== -1) + render._allDrawables[args.ID].updateScale([ + Scratch.Cast.toNumber(args.x), + Scratch.Cast.toNumber(args.y), + ]); } scaleOfID(args) { const allLay = vm.renderer._drawList; - if (allLay.indexOf(args.ID) !== -1) return render._allDrawables[args.ID]._scale[args.XY === "x" ? 0 : 1]; + if (allLay.indexOf(args.ID) !== -1) + return render._allDrawables[args.ID]._scale[args.XY === "x" ? 0 : 1]; return 0; } directID(args) { const dir = Scratch.Cast.toNumber(args.ANGLE); const allLay = render._drawList; - if (allLay.indexOf(args.ID) !== -1) render._allDrawables[args.ID].updateDirection(dir); + if (allLay.indexOf(args.ID) !== -1) + render._allDrawables[args.ID].updateDirection(dir); } dirOfID(args) { const allLay = render._drawList; - if (allLay.indexOf(args.ID) !== -1) return render._allDrawables[args.ID]._direction; + if (allLay.indexOf(args.ID) !== -1) + return render._allDrawables[args.ID]._direction; return 0; } @@ -289,14 +308,21 @@ const y = Scratch.Cast.toNumber(args.y); const allLay = render._drawList; if (allLay.indexOf(args.ID) !== -1) { - render._allDrawables[args.ID].skin._rotationCenter = new Float32Array([x, y, 0]); + render._allDrawables[args.ID].skin._rotationCenter = new Float32Array([ + x, + y, + 0, + ]); render._allDrawables[args.ID]._skinWasAltered(); } } rotateOfID(args) { const allLay = render._drawList; - if (allLay.indexOf(args.ID) !== -1) return render._allDrawables[args.ID]._skinScale[args.XY === "x" ? 0 : 1] / 2; + if (allLay.indexOf(args.ID) !== -1) + return ( + render._allDrawables[args.ID]._skinScale[args.XY === "x" ? 0 : 1] / 2 + ); return 0; } @@ -304,19 +330,21 @@ args.x = Scratch.Cast.toNumber(args.x); args.y = Scratch.Cast.toNumber(args.y); const allLay = render._drawList; - if (allLay.indexOf(args.ID) !== -1) render._allDrawables[args.ID].updatePosition([args.x, args.y]); + if (allLay.indexOf(args.ID) !== -1) + render._allDrawables[args.ID].updatePosition([args.x, args.y]); } posOfID(args) { const allLay = render._drawList; - if (allLay.indexOf(args.ID) !== -1) return render._allDrawables[args.ID]._position[args.XY === "x" ? 0 : 1]; + if (allLay.indexOf(args.ID) !== -1) + return render._allDrawables[args.ID]._position[args.XY === "x" ? 0 : 1]; return 0; } resetID(args) { const effects = this._getEffects(); for (var i = 0; i < effects.length; i++) { - this.effectID({ ID : args.ID, EFFECT : effects[i], NUM : 0 }); + this.effectID({ ID: args.ID, EFFECT: effects[i], NUM: 0 }); } } }