Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
52c1697
Add files via upload
tom35011 Aug 11, 2026
82f152a
Delete extensions/README.md
tom35011 Aug 11, 2026
07c07fe
Delete extensions/LICENSE.txt
tom35011 Aug 11, 2026
efbedcf
Delete extensions/motion++.js
tom35011 Aug 11, 2026
3b681ce
Add files via upload
tom35011 Aug 11, 2026
5dd56d9
Add Motion++.md file
tom35011 Aug 11, 2026
9d58297
Enhance Motion++ documentation with usage details
tom35011 Aug 11, 2026
2a4661b
Add Motion++ documentation file
tom35011 Aug 11, 2026
172c8b4
Add files via upload
tom35011 Aug 11, 2026
f91f349
Revise Motion++ documentation and features
tom35011 Aug 11, 2026
39fc8ca
Fix duplicate bug report line in Motion++ docs
tom35011 Aug 11, 2026
1d80b65
added blocks images instead of text
tom35011 Aug 11, 2026
445e7ae
Revise Motion++ extension documentation
tom35011 Aug 11, 2026
b3c3f09
Update Motion++ documentation with included blocks
tom35011 Aug 11, 2026
2ad49e7
Revise Motion++ documentation for included blocks
tom35011 Aug 11, 2026
17a0f73
Update Motion++.md
tom35011 Aug 11, 2026
d6b991a
Fix formatting of note about block suggestions
tom35011 Aug 11, 2026
29d902f
Revise Motion++ documentation formatting and sections
tom35011 Aug 11, 2026
7560385
Add image and update removed blocks section in docs
tom35011 Aug 11, 2026
eecb2ad
Add files via upload
tom35011 Aug 11, 2026
f2368b4
Rename block_2026-08-11-10 h 25 min 26 s.png to motion++blocks.png
tom35011 Aug 11, 2026
efdb336
Update image reference for Motion++ documentation
tom35011 Aug 11, 2026
a47de1e
Delete images/motion++blocks.png
tom35011 Aug 11, 2026
95c0340
Update Motion++ documentation to remove broken blocks
tom35011 Aug 11, 2026
38e1937
Create tom350
tom35011 Aug 11, 2026
705b93d
Delete images/tom350
tom35011 Aug 11, 2026
7e8da55
Add files via upload
tom35011 Aug 11, 2026
da22fd7
Rename images/block_2026-08-11-10 h 25 min 26 s.png to images/tom350/…
tom35011 Aug 11, 2026
238f79a
Rename MotionPPblocks to MotionPPblocks.png
tom35011 Aug 11, 2026
04f749f
Update Motion++ documentation with new image
tom35011 Aug 11, 2026
fce556d
Remove unused image reference from Motion++ docs
tom35011 Aug 11, 2026
a5220ee
Add MotionPlusPlus extension to extensions.json
tom35011 Aug 11, 2026
cda9ad6
Rename 'MotionPlusPlus' to 'Motion++'
tom35011 Aug 11, 2026
9f9bfcb
Rename docs/Motion++.md to docs/MotionPlusPlus/Motion++.md
tom35011 Aug 11, 2026
ab4a936
Add files via upload
tom35011 Aug 11, 2026
67f8b79
Rename block_2026-08-11-10 h 25 min 26 s.png to MotionPlusPlus_blocks…
tom35011 Aug 11, 2026
952e0e8
Fix image path for MotionPlusPlus documentation
tom35011 Aug 11, 2026
e08beb5
Correct image path in Motion++ documentation
tom35011 Aug 11, 2026
e386e65
Fix image path in MotionPlusPlus.md
tom35011 Aug 11, 2026
e737305
Fix image path in Motion++ documentation
tom35011 Aug 11, 2026
3de17a1
Add files via upload
tom35011 Aug 11, 2026
ae3840a
Fix image path and update removed blocks section
tom35011 Aug 11, 2026
25d9920
Add motion commands for sprites in moremotion.js
tom35011 Aug 12, 2026
1de4e0c
Delete extensions/motion++.js
tom35011 Aug 12, 2026
dc3a6a1
Delete docs/MotionPlusPlus/Motion++.md
tom35011 Aug 12, 2026
b1f1b03
Delete docs/MotionPlusPlus/MotionPlusPlus_blocks.png
tom35011 Aug 12, 2026
1701671
Remove 'Motion++' extension from extensions.json
tom35011 Aug 12, 2026
d600f9c
Delete Motion++.md
tom35011 Aug 12, 2026
5686d3d
Delete images/tom350/Motion++blocks.png
tom35011 Aug 16, 2026
800210e
Delete images/tom350/MotionPPblocks.png
tom35011 Aug 16, 2026
2bd51c8
Clean up moremotion.js
tom35011 Aug 16, 2026
13efb80
[Automated] Format code
DangoCat Aug 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions README.md

This file was deleted.

258 changes: 258 additions & 0 deletions extensions/NexusKitten/moremotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,177 @@
},
extensions: ["colours_motion"],
},
"---",
{
filter: [Scratch.TargetType.SPRITE],
opcode: "turnRight",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("turn right [SPRITE] [DEG] degrees [MODE]"),
arguments: {
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
DEG: { type: Scratch.ArgumentType.NUMBER, defaultValue: 15 },
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "turnLeft",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("turn left [SPRITE] [DEG] degrees [MODE]"),
arguments: {
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
DEG: { type: Scratch.ArgumentType.NUMBER, defaultValue: 15 },
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "goToXY",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("go to x [X] y [Y] for [SPRITE] [MODE]"),
arguments: {
X: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 },
Y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 },
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "changeX",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("change x by [DX] for [SPRITE] [MODE]"),
arguments: {
DX: { type: Scratch.ArgumentType.NUMBER, defaultValue: 10 },
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "changeY",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("change y by [DY] for [SPRITE] [MODE]"),
arguments: {
DY: { type: Scratch.ArgumentType.NUMBER, defaultValue: 10 },
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "setX",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("set x to [X] for [SPRITE] [MODE]"),
arguments: {
X: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 },
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "setY",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate("set y to [Y] for [SPRITE] [MODE]"),
arguments: {
Y: { type: Scratch.ArgumentType.NUMBER, defaultValue: 0 },
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "pointDirection",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate(
"point in direction [DIR] for [SPRITE] [MODE]"
),
arguments: {
DIR: { type: Scratch.ArgumentType.ANGLE, defaultValue: 90 },
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
{
filter: [Scratch.TargetType.SPRITE],
opcode: "rotationStylePlus",
blockType: Scratch.BlockType.COMMAND,
text: Scratch.translate(
"set rotation style [STYLE] for [SPRITE] [MODE]"
),
arguments: {
STYLE: {
type: Scratch.ArgumentType.STRING,
menu: "menuRotation",
},
SPRITE: {
type: Scratch.ArgumentType.STRING,
menu: "menuSprites",
},
MODE: {
type: Scratch.ArgumentType.STRING,
menu: "menuCloneMode",
},
},
extensions: ["colours_motion"],
},
],
menus: {
WHAT: {
Expand All @@ -265,6 +436,18 @@
},
],
},
menuSprites: {
acceptReporters: false,
items: "getSpriteNames",
},
menuCloneMode: {
acceptReporters: false,
items: "getCloneModes",
},
menuRotation: {
acceptReporters: false,
items: ["left-right", "don't rotate", "all around"],
},
},
};
}
Expand Down Expand Up @@ -444,6 +627,81 @@
}
}
}

// Motion++ helper methods
getSpriteNames() {
return Scratch.vm.runtime.targets
.filter((t) => t.isSprite && !t.isStage)
.map((t) => t.sprite.name);
}

getCloneModes() {
return ["sprite only", "clone included"];
}

_getTargets(name, mode) {
const runtime = Scratch.vm.runtime;
return runtime.targets.filter(
(t) =>
t.isSprite &&
!t.isStage &&
t.sprite.name === name &&
(mode === "clone included" || !t.isClone)

Check warning on line 649 in extensions/NexusKitten/moremotion.js

View workflow job for this annotation

GitHub Actions / type-warnings

Type warning - may indicate a bug - ignore if no bug

Property 'isClone' does not exist on type 'RenderedTarget'.
);
}

turnRight(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setDirection(t.direction + args.DEG);
}

turnLeft(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setDirection(t.direction - args.DEG);
}

goToXY(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setXY(args.X, args.Y);
}

changeX(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) {
const newX = t.x + args.DX;
const newY = t.y;
t.setXY(newX, newY);
}
}

changeY(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) {
const newX = t.x;
const newY = t.y + args.DY;
t.setXY(newX, newY);
}
}

setX(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setXY(args.X, t.y);
}

setY(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setXY(t.x, args.Y);
}

pointDirection(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setDirection(args.DIR);
}

rotationStylePlus(args) {
const targets = this._getTargets(args.SPRITE, args.MODE);
for (const t of targets) t.setRotationStyle(args.STYLE);
}
}

Scratch.extensions.register(new nkmoremotion());
Expand Down