Skip to content

Commit

Permalink
[Automated] Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
DangoCat authored and GarboMuffin committed Dec 29, 2024
1 parent b9329af commit 91ba02b
Showing 1 changed file with 86 additions and 58 deletions.
144 changes: 86 additions & 58 deletions extensions/SharkPool/Renderer-Control.js
Original file line number Diff line number Diff line change
Expand Up @@ -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+PGcgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIj48cGF0aCBkPSJNMiA0Mi42NTJDMiAyMC4yMDEgMjAuMiAyIDQyLjY1MiAyYzIyLjQ1MSAwIDQwLjY1MiAxOC4yIDQwLjY1MiA0MC42NTIgMCAyMi40NTEtMTguMiA0MC42NTItNDAuNjUyIDQwLjY1MkMyMC4yMDEgODMuMzA0IDIgNjUuMTA0IDIgNDIuNjUyeiIgZmlsbD0iIzUzODZiNSIgc3Ryb2tlPSIjMmY0YzY3IiBzdHJva2Utd2lkdGg9IjQiLz48cGF0aCBkPSJtNDQuODc5IDY2Ljg3Mi0zLjk2NSAxLjY2IDEuNjYzLTMuOTUxYzEuMTM3LTIuNjk4IDIuNzEyLTUuMDU5IDQuNjkyLTcuMDMxbDE4LjQyMi0xOC4zNTRjLjc5LS43ODYgMi40NzItLjM4MyAzLjc2MS45MDIgMS4yODcgMS4yODIgMS42OTQgMi45Ni45MDUgMy43NDVMNTEuOTM1IDYyLjE5OGMtMS45OCAxLjk3My00LjM1IDMuNTQ0LTcuMDU2IDQuNjc1IiBmaWxsPSIjZmZmIiBmaWxsLXJ1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AwIDAgMS00LjEzLTQuMTN2LTQuNTcyYTQuMTMgNC4xMyAwIDAgMSA0LjEzLTQuMTNoNC41NzNhNC4xMyA0LjEzIDAgMCAxIDQuMTMgNC4xM3Y0LjU3MmE0LjEzIDQuMTMgMCAwIDEtNC4xMyA0LjEzem0tMTYuNDk3IDBhNC4xMyA0LjEzIDAgMCAxLTQuMTMtNC4xM3YtNC41NzJhNC4xMyA0LjEzIDAgMCAxIDQuMTMtNC4xM2g0LjU3MmE0LjEzIDQuMTMgMCAwIDEgNC4xMyA0LjEzdjQuNTcyYTQuMTMgNC4xMyAwIDAgMS00LjEzIDQuMTN6bTAgMTYuNDk4YTQuMTMgNC4xMyAwIDAgMS00LjEzLTQuMTN2LTQuNTcyYTQuMTMgNC4xMyAwIDAgMSA0LjEzLTQuMTNoNC41NzJhNC4xMyA0LjEzIDAgMCAxIDQuMTMgNC4xM3Y0LjU3MmE0LjEzIDQuMTMgMCAwIDEtNC4xMyA0LjEzem0wIDE2LjQ5N2E0LjEzIDQuMTMgMCAwIDEtNC4xMy00LjEzdi00LjU3MmE0LjEzIDQuMTMgMCAwIDEgNC4xMy00LjEzaDQuNTcyYTQuMTMgNC4xMyAwIDAgMSA0LjEzIDQuMTN2NC41NzNhNC4xMyA0LjEzIDAgMCAxLTQuMTMgNC4xM3ptMTYuNDk3LTE2LjQ5N2E0LjEzIDQuMTMgMCAwIDEtNC4xMy00LjEzdi00LjU3MmE0LjEzIDQuMTMgMCAwIDEgNC4xMy00LjEzaDQuNTczYTQuMTMgNC4xMyAwIDAgMSA0LjEzIDQuMTN2NC41NzJhNC4xMyA0LjEzIDAgMCAxLTQuMTMgNC4xM3oiIGZpbGw9IiNmZmYiLz48L2c+PC9zdmc+";

const vm = Scratch.vm;
const runtime = vm.runtime;
Expand All @@ -30,34 +31,34 @@
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 },
},
},
"---",
{
opcode: "exportID",
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",
blockType: Scratch.BlockType.COMMAND,
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 },
},
},
"---",
{
Expand All @@ -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 },
},
},
"---",
{
Expand All @@ -86,17 +87,17 @@
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",
blockType: Scratch.BlockType.REPORTER,
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 },
},
},
"---",
{
Expand All @@ -106,17 +107,17 @@
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",
blockType: Scratch.BlockType.REPORTER,
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 },
},
},
"---",
{
Expand All @@ -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",
Expand All @@ -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" },
},
};
}

Expand All @@ -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 : [""];
}
Expand All @@ -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 : "";
Expand All @@ -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 "";
}
Expand All @@ -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;
}

Expand All @@ -289,34 +308,43 @@
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;
}

positionID(args) {
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 });
}
}
}
Expand Down

0 comments on commit 91ba02b

Please sign in to comment.