sb-edit-custom 0.20.103 → 0.20.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,7 +11,7 @@ export declare const GAME_STAGE_JS = "\nimport { Stage as StageBase, Trigger, Wa
|
|
|
11
11
|
export declare const WRAP_SPRITE_CLASS_JS = "\nimport { GameSprite } from \"./GameSprite.js\"\nimport { copyPrototypeToInstance } from \"./helpers.js\"\n\nexport function wrapSpriteClass(UserClass) {\n if (UserClass.prototype?.hasOwnProperty(\"constructor\")) {\n const userCtor = UserClass.prototype.constructor\n if (userCtor && userCtor !== UserClass) {\n throw new Error(`${UserClass.name}: Please use init() instead of constructor()`)\n }\n }\n\n var spriteId = UserClass.name;\n\n return class WrappedSprite extends GameSprite {\n constructor(...args) {\n var opts = args[0] ?? {}\n args[0] = { ...opts, spriteId: spriteId }\n super(...args)\n\n copyPrototypeToInstance(this, UserClass.prototype)\n\n if (typeof this.init === \"function\") this.init()\n\n this._finalizeTriggers()\n }\n }\n}\n";
|
|
12
12
|
export declare const WRAP_STAGE_CLASS_JS = "\nimport { GameStage } from \"./GameStage.js\"\nimport { copyPrototypeToInstance } from \"./helpers.js\"\n\nexport function wrapStageClass(UserClass) {\n return class WrappedStage extends GameStage {\n constructor(...args) {\n super(...args)\n\n copyPrototypeToInstance(this, UserClass.prototype)\n if (typeof this.init === \"function\") this.init(...args)\n\n this._finalizeTriggers()\n }\n }\n}\n";
|
|
13
13
|
export declare const getUserApiJS: (_leopardJSURL?: string) => string;
|
|
14
|
-
export declare const SPRITE_FUNCS_JS = "\n// spriteFuncs.js - Free functions that delegate to context.target\n// These allow cleaner code: wait(1) instead of this.wait(1)\n\nimport { context } from \"./userApi.js\";\n\n// Control\nexport function wait(seconds) {\n return context.target.wait(seconds);\n}\n\nexport function broadcast(message) {\n return context.target.broadcast(message);\n}\n\nexport function broadcastAndWait(message) {\n return context.target.broadcastAndWait(message);\n}\n\nexport function createClone() {\n context.target.createClone();\n}\n\nexport function deleteThisClone() {\n context.target.deleteThisClone();\n}\n\nexport function
|
|
14
|
+
export declare const SPRITE_FUNCS_JS = "\n// spriteFuncs.js - Free functions that delegate to context.target\n// These allow cleaner code: wait(1) instead of this.wait(1)\n\nimport { context } from \"./userApi.js\";\n\n// Control\nexport function wait(seconds) {\n return context.target.wait(seconds);\n}\n\nexport function broadcast(message) {\n return context.target.broadcast(message);\n}\n\nexport function broadcastAndWait(message) {\n return context.target.broadcastAndWait(message);\n}\n\nexport function createClone() {\n context.target.createClone();\n}\n\nexport function deleteThisClone() {\n context.target.deleteThisClone();\n}\n\nexport function stop(option) {\n context.target.stop(option);\n}\n\nexport function stopAllSounds() {\n context.target.stopAllSounds();\n}\n\n// Looks\nexport function say(message) {\n context.target.say(message);\n}\n\nexport function sayAndWait(message, seconds) {\n return context.target.sayAndWait(message, seconds);\n}\n\nexport function think(message) {\n context.target.think(message);\n}\n\nexport function thinkAndWait(message, seconds) {\n return context.target.thinkAndWait(message, seconds);\n}\n\n// Motion\nexport function move(steps) {\n context.target.move(steps);\n}\n\nexport function goto(x, y) {\n context.target.goto(x, y);\n}\n\nexport function glide(seconds, x, y) {\n return context.target.glide(seconds, x, y);\n}\n\nexport function setDirection(direction) {\n context.target.direction = direction;\n}\n\nexport function changeX(amount) {\n context.target.x += amount;\n}\n\nexport function setX(x) {\n context.target.x = x;\n}\n\nexport function changeY(amount) {\n context.target.y += amount;\n}\n\nexport function setY(y) {\n context.target.y = y;\n}\n\nexport function ifOnEdgeBounce() {\n context.target.ifOnEdgeBounce();\n}\n\n// Pen\nexport function stamp() {\n context.target.stamp();\n}\n\nexport function penDown() {\n context.target.penDown = true;\n}\n\nexport function penUp() {\n context.target.penDown = false;\n}\n\nexport function setPenColor(color) {\n context.target.penColor = color;\n}\n\nexport function setPenSize(size) {\n context.target.penSize = size;\n}\n\nexport function changePenSize(amount) {\n context.target.penSize += amount;\n}\n\nexport function clearPen() {\n context.target.clearPen();\n}\n\n// Sound\nexport function playSoundUntilDone(sound) {\n return context.target.playSoundUntilDone(sound);\n}\n\nexport function startSound(sound) {\n return context.target.startSound(sound);\n}\n\n// Sensing\nexport function touching(target) {\n return context.target.touching(target);\n}\n\nexport function colorTouching(color, target) {\n return context.target.colorTouching(color, target);\n}\n\nexport function keyPressed(key) {\n return context.target.keyPressed(key);\n}\n\nexport function isMouseDown() {\n return context.target.mouse.down;\n}\n\nexport function getMouseX() {\n return context.target.mouse.x;\n}\n\nexport function getMouseY() {\n return context.target.mouse.y;\n}\n\nexport function askAndWait(question) {\n return context.target.askAndWait(question);\n}\n\nexport function getAnswer() {\n return context.target.answer;\n}\n\nexport function getTimer() {\n return context.target.timer;\n}\n\nexport function restartTimer() {\n context.target.restartTimer();\n}\n\n// Visibility\nexport function show() {\n context.target.visible = true;\n}\n\nexport function hide() {\n context.target.visible = false;\n}\n\n// Size\nexport function setSize(percent) {\n context.target.size = percent;\n}\n\nexport function changeSize(amount) {\n context.target.size += amount;\n}\n\n// Effects\nexport function setEffect(effect, value) {\n context.target.effects[effect] = value;\n}\n\nexport function changeEffect(effect, amount) {\n context.target.effects[effect] += amount;\n}\n\nexport function clearEffects() {\n context.target.effects.clear();\n}\n\n// Costume\nexport function setCostume(costume) {\n context.target.costume = costume;\n}\n\nexport function nextCostume() {\n context.target.costumeNumber++;\n}\n\n// Layer\nexport function goToFront() {\n context.target.moveAhead();\n}\n\nexport function goToBack() {\n context.target.moveBehind();\n}\n\nexport function goForwardLayers(layers) {\n context.target.moveAhead(layers);\n}\n\nexport function goBackwardLayers(layers) {\n context.target.moveBehind(layers);\n}\n\n// Rotation style\nexport function setRotationStyle(style) {\n context.target.rotationStyle = style;\n}\n";
|
|
15
15
|
export declare const getInfrastructureFiles: (options?: InfrastructureOptions) => {
|
|
16
16
|
"userApi.js": string;
|
|
17
17
|
"helpers.js": string;
|
|
@@ -13,7 +13,7 @@ exports.WRAP_SPRITE_CLASS_JS = "\nimport { GameSprite } from \"./GameSprite.js\"
|
|
|
13
13
|
exports.WRAP_STAGE_CLASS_JS = "\nimport { GameStage } from \"./GameStage.js\"\nimport { copyPrototypeToInstance } from \"./helpers.js\"\n\nexport function wrapStageClass(UserClass) {\n return class WrappedStage extends GameStage {\n constructor(...args) {\n super(...args)\n\n copyPrototypeToInstance(this, UserClass.prototype)\n if (typeof this.init === \"function\") this.init(...args)\n\n this._finalizeTriggers()\n }\n }\n}\n";
|
|
14
14
|
var getUserApiJS = function (_leopardJSURL) { return "\n// userApi.js - Leopard class re-exports for sprite files\n// In bundled mode, this file is empty - Leopard classes come from window globals.\n// In ES module mode, sprite files import directly from the Leopard library URL.\n"; };
|
|
15
15
|
exports.getUserApiJS = getUserApiJS;
|
|
16
|
-
exports.SPRITE_FUNCS_JS = "\n// spriteFuncs.js - Free functions that delegate to context.target\n// These allow cleaner code: wait(1) instead of this.wait(1)\n\nimport { context } from \"./userApi.js\";\n\n// Control\nexport function wait(seconds) {\n return context.target.wait(seconds);\n}\n\nexport function broadcast(message) {\n return context.target.broadcast(message);\n}\n\nexport function broadcastAndWait(message) {\n return context.target.broadcastAndWait(message);\n}\n\nexport function createClone() {\n context.target.createClone();\n}\n\nexport function deleteThisClone() {\n context.target.deleteThisClone();\n}\n\nexport function
|
|
16
|
+
exports.SPRITE_FUNCS_JS = "\n// spriteFuncs.js - Free functions that delegate to context.target\n// These allow cleaner code: wait(1) instead of this.wait(1)\n\nimport { context } from \"./userApi.js\";\n\n// Control\nexport function wait(seconds) {\n return context.target.wait(seconds);\n}\n\nexport function broadcast(message) {\n return context.target.broadcast(message);\n}\n\nexport function broadcastAndWait(message) {\n return context.target.broadcastAndWait(message);\n}\n\nexport function createClone() {\n context.target.createClone();\n}\n\nexport function deleteThisClone() {\n context.target.deleteThisClone();\n}\n\nexport function stop(option) {\n context.target.stop(option);\n}\n\nexport function stopAllSounds() {\n context.target.stopAllSounds();\n}\n\n// Looks\nexport function say(message) {\n context.target.say(message);\n}\n\nexport function sayAndWait(message, seconds) {\n return context.target.sayAndWait(message, seconds);\n}\n\nexport function think(message) {\n context.target.think(message);\n}\n\nexport function thinkAndWait(message, seconds) {\n return context.target.thinkAndWait(message, seconds);\n}\n\n// Motion\nexport function move(steps) {\n context.target.move(steps);\n}\n\nexport function goto(x, y) {\n context.target.goto(x, y);\n}\n\nexport function glide(seconds, x, y) {\n return context.target.glide(seconds, x, y);\n}\n\nexport function setDirection(direction) {\n context.target.direction = direction;\n}\n\nexport function changeX(amount) {\n context.target.x += amount;\n}\n\nexport function setX(x) {\n context.target.x = x;\n}\n\nexport function changeY(amount) {\n context.target.y += amount;\n}\n\nexport function setY(y) {\n context.target.y = y;\n}\n\nexport function ifOnEdgeBounce() {\n context.target.ifOnEdgeBounce();\n}\n\n// Pen\nexport function stamp() {\n context.target.stamp();\n}\n\nexport function penDown() {\n context.target.penDown = true;\n}\n\nexport function penUp() {\n context.target.penDown = false;\n}\n\nexport function setPenColor(color) {\n context.target.penColor = color;\n}\n\nexport function setPenSize(size) {\n context.target.penSize = size;\n}\n\nexport function changePenSize(amount) {\n context.target.penSize += amount;\n}\n\nexport function clearPen() {\n context.target.clearPen();\n}\n\n// Sound\nexport function playSoundUntilDone(sound) {\n return context.target.playSoundUntilDone(sound);\n}\n\nexport function startSound(sound) {\n return context.target.startSound(sound);\n}\n\n// Sensing\nexport function touching(target) {\n return context.target.touching(target);\n}\n\nexport function colorTouching(color, target) {\n return context.target.colorTouching(color, target);\n}\n\nexport function keyPressed(key) {\n return context.target.keyPressed(key);\n}\n\nexport function isMouseDown() {\n return context.target.mouse.down;\n}\n\nexport function getMouseX() {\n return context.target.mouse.x;\n}\n\nexport function getMouseY() {\n return context.target.mouse.y;\n}\n\nexport function askAndWait(question) {\n return context.target.askAndWait(question);\n}\n\nexport function getAnswer() {\n return context.target.answer;\n}\n\nexport function getTimer() {\n return context.target.timer;\n}\n\nexport function restartTimer() {\n context.target.restartTimer();\n}\n\n// Visibility\nexport function show() {\n context.target.visible = true;\n}\n\nexport function hide() {\n context.target.visible = false;\n}\n\n// Size\nexport function setSize(percent) {\n context.target.size = percent;\n}\n\nexport function changeSize(amount) {\n context.target.size += amount;\n}\n\n// Effects\nexport function setEffect(effect, value) {\n context.target.effects[effect] = value;\n}\n\nexport function changeEffect(effect, amount) {\n context.target.effects[effect] += amount;\n}\n\nexport function clearEffects() {\n context.target.effects.clear();\n}\n\n// Costume\nexport function setCostume(costume) {\n context.target.costume = costume;\n}\n\nexport function nextCostume() {\n context.target.costumeNumber++;\n}\n\n// Layer\nexport function goToFront() {\n context.target.moveAhead();\n}\n\nexport function goToBack() {\n context.target.moveBehind();\n}\n\nexport function goForwardLayers(layers) {\n context.target.moveAhead(layers);\n}\n\nexport function goBackwardLayers(layers) {\n context.target.moveBehind(layers);\n}\n\n// Rotation style\nexport function setRotationStyle(style) {\n context.target.rotationStyle = style;\n}\n";
|
|
17
17
|
var getInfrastructureFiles = function (options) {
|
|
18
18
|
if (options === void 0) { options = {}; }
|
|
19
19
|
return ({
|
|
@@ -27,4 +27,4 @@ var getInfrastructureFiles = function (options) {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
exports.getInfrastructureFiles = getInfrastructureFiles;
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5mcmFzdHJ1Y3R1cmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaW8vbGVvcGFyZC9pbmZyYXN0cnVjdHVyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7OztHQUdHOzs7QUFNSCxJQUFNLHNCQUFzQixHQUFHLGtGQUFrRixDQUFDO0FBRXJHLFFBQUEsVUFBVSxHQUFHLDBUQVF6QixDQUFDO0FBRVcsUUFBQSxjQUFjLEdBQUcsZ3VHQTBGN0IsQ0FBQztBQUVXLFFBQUEsYUFBYSxHQUFHLHU5RU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