Skip to content

Checking the box #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
2cd5b0c
Update README
CubesterYT Feb 7, 2024
dd6e89f
Update to attribute new dependencies
CubesterYT Feb 9, 2024
cb7d493
Fix quick mistake
CubesterYT Feb 10, 2024
ace8b1d
Update `package-lock.json` as well
CubesterYT Feb 10, 2024
a374cb2
Merge branch 'TurboWarp:develop' into develop
CubesterYT Feb 10, 2024
e13f4a2
Revert "Fix quick mistake"
CubesterYT Feb 13, 2024
5c3265e
Revert "Update to attribute new dependencies"
CubesterYT Feb 13, 2024
a915cf9
Revert "Update `package-lock.json` as well"
CubesterYT Feb 13, 2024
ab05b3f
Merge branch 'TurboWarp:develop' into develop
CubesterYT Feb 13, 2024
e7baa0e
Readd Dependencies
CubesterYT Feb 13, 2024
2a2ddf2
Add comments category (scratch-vm)
CubesterYT Feb 13, 2024
bfd41f2
Update `scratch-blocks`
CubesterYT Feb 13, 2024
5d50372
Merge branch 'TurboWarp:develop' into develop
CubesterYT Mar 2, 2024
f35e6d6
Merge branch 'TurboWarp:develop' into develop
CubesterYT Apr 2, 2024
fd1b5b4
Update Dependencies
CubesterYT Apr 2, 2024
f64f5d3
Update Dependencies
CubesterYT Apr 3, 2024
43830bc
Merge branch 'TurboWarp:develop' into develop
CubesterYT Apr 15, 2024
3229b7a
Add Dependabot
CubesterYT Apr 15, 2024
2ec233a
Bump scratch-blocks from `f0fb4fe` to `a1441f1`
dependabot[bot] Apr 15, 2024
0c9bcef
Merge pull request #1 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT Apr 15, 2024
a4c9f9b
Update package.json
CubesterYT Apr 17, 2024
5bd5283
Update Dependabot
CubesterYT Apr 17, 2024
90058ff
Bump scratch-parser from `663ea98` to `e2ab58d`
dependabot[bot] Apr 18, 2024
ffecb31
Merge pull request #2 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT Apr 18, 2024
593ff16
Bump scratch-blocks from `a1441f1` to `29de013`
dependabot[bot] Apr 23, 2024
c510762
Merge pull request #3 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT Apr 23, 2024
39c3677
Merge branch 'TurboWarp:develop' into develop
CubesterYT May 11, 2024
ed4db15
Update Platform
CubesterYT May 11, 2024
c3b8e18
Merge branch 'TurboWarp:develop' into develop
CubesterYT May 14, 2024
6b56304
Merge branch 'TurboWarp:develop' into develop
CubesterYT May 15, 2024
60b0138
Add `Scratch.extensions.isNitroBolt`
CubesterYT May 15, 2024
b3c39f5
Add Extension Manager Modal (scratch-vm)
CubesterYT May 19, 2024
2825a27
Quite down, lint
CubesterYT May 19, 2024
517c647
Merge branch 'develop' of https://github.com/TurboWarp/scratch-vm int…
CubesterYT May 27, 2024
2777239
Bump scratch-parser from `e2ab58d` to `51b5a05`
dependabot[bot] May 28, 2024
e2ea073
Merge pull request #5 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT May 28, 2024
9fe30ef
Add reordering support to Extension Manager 🎉 (scratch-vm)
CubesterYT Jun 22, 2024
dcb6f06
Merge branch 'TurboWarp:develop' into develop
CubesterYT Jun 22, 2024
70bf5de
Add the new Block and Argument Type (JSON) (scratch-vm)
CubesterYT Jul 10, 2024
496a68e
Bump scratch-blocks from `29de013` to `7e31f46`
dependabot[bot] Jul 10, 2024
1ab25f8
Bump scratch-parser from `51b5a05` to `3b5dc5d`
dependabot[bot] Jul 10, 2024
7da486e
Merge pull request #7 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT Jul 10, 2024
702941d
Merge pull request #6 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT Jul 10, 2024
cebc5bd
Changes and Bug Fixes (scratch-vm)
CubesterYT Jul 11, 2024
738fa49
Bump scratch-blocks from `7e31f46` to `c581278`
dependabot[bot] Jul 11, 2024
8516764
Merge pull request #8 from Nitro-Bolt/dependabot/npm_and_yarn/scratch…
CubesterYT Jul 11, 2024
ad8e51a
Compiler Support for the JSON category 🎉
CubesterYT Jul 14, 2024
7e52fc0
Add parenthesis to some outputs
CubesterYT Jul 14, 2024
43a0f8b
Merge branch 'TurboWarp:develop' into develop
CubesterYT Jul 24, 2024
8afdcea
Merge branch 'develop' of https://github.com/TurboWarp/scratch-vm int…
CubesterYT Sep 16, 2024
237f54c
Also update this
CubesterYT Sep 16, 2024
2fcaf7c
Fix JSON block issues with variables and allow any value to be used i…
CubesterYT Sep 16, 2024
efe10f5
Merge branch 'TurboWarp:develop' into develop
CubesterYT Feb 6, 2025
abbfae0
Bump scratch-parser from `3b5dc5d` to `25b8b36`
dependabot[bot] Feb 6, 2025
ebe4fa3
Merge pull request #11 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Feb 6, 2025
e42b0d1
Merge branch 'develop' of https://github.com/TurboWarp/scratch-vm int…
CubesterYT Apr 29, 2025
0ff5488
Bump scratch-blocks from `c581278` to `460d154`
dependabot[bot] Apr 29, 2025
bcbbb9d
Merge pull request #13 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Apr 29, 2025
636e4cb
Final JSON fixes
CubesterYT Apr 29, 2025
588a9fb
Bump scratch-parser from `25b8b36` to `e71bc6f`
dependabot[bot] Apr 30, 2025
8b6b8dd
Merge pull request #14 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT Apr 30, 2025
0c8c705
First round of rebranding (scratch-vm)
CubesterYT May 1, 2025
0651e62
nitpick branding fix
yuri-kiss May 1, 2025
f27a4b0
Fix object / array empty inputs
yuri-kiss May 4, 2025
d571363
Fix object / array support (cuz cube f***ed it up)
yuri-kiss May 4, 2025
25d5e48
Fix cubesters implementation of some blocks
yuri-kiss May 4, 2025
fafa481
Fix cyclic objects in Cast.toString
yuri-kiss May 4, 2025
14cc8f0
Bump scratch-blocks from `460d154` to `cf86bf1`
dependabot[bot] May 5, 2025
510adce
Merge pull request #15 from Nitro-Bolt/dependabot/npm_and_yarn/scratc…
CubesterYT May 5, 2025
6c1860a
Implement checkbox on the vm side (1/2)
yuri-kiss May 8, 2025
23c7270
Implement checkbox on the vm side (2/2)
yuri-kiss May 8, 2025
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "scratch-blocks"
- dependency-name: "scratch-parser"
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
## TurboWarp/scratch-vm
Modified TurboWarp VM with more features.

Modified Scratch VM with a JIT compiler and more features.

This is a drop-in replacement for LLK/scratch-vm.
This is a drop-in replacement for `LLK/scratch-vm`.

## Setup

See https://github.com/TurboWarp/scratch-gui/wiki/Getting-Started to setup the complete TurboWarp environment.
See [getting started](https://docs.turbowarp.org/development/getting-started) to setup the complete NitroBolt environment.

If you just want to play with the VM then it's the same process as upstream scratch-vm.
If you just want to play with the VM then it's the same process as upstream `scratch-vm`.

## Extension authors

If you only use the standard reporter, boolean, and command block types, everything should just work without any changes.

## Compiler Overview

For a high-level overview of how the compiler works, see https://docs.turbowarp.org/how
For a high-level overview of how the compiler works, see [how](https://docs.turbowarp.org/how).

For more technical information, read the code in src/compiler.
For more technical information, read the code in `src/compiler`.

## Public API

Expand Down
98 changes: 53 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"format-message": "6.2.1",
"htmlparser2": "3.10.0",
"immutable": "3.8.2",
"scratch-parser": "github:TurboWarp/scratch-parser#master",
"jszip": "^3.1.5",
"scratch-parser": "github:Nitro-Bolt/scratch-parser#master",
"scratch-sb1-converter": "0.2.7",
"scratch-translate-extension-languages": "0.0.20191118205314",
"text-encoding": "0.7.0",
Expand Down Expand Up @@ -78,7 +79,7 @@
"lodash.defaultsdeep": "4.6.1",
"pngjs": "3.3.3",
"scratch-audio": "0.1.0-prerelease.20231221012053",
"scratch-blocks": "0.1.0-prerelease.20230527085947",
"scratch-blocks": "github:Nitro-Bolt/scratch-blocks#develop-builds",
"scratch-l10n": "3.16.20231222031921",
"scratch-render": "0.1.0-prerelease.20231220210403",
"scratch-render-fonts": "github:TurboWarp/scratch-render-fonts#master",
Expand Down
57 changes: 57 additions & 0 deletions src/blocks/scratch3_comments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const Cast = require('../util/cast');

class Scratch3CommentsBlocks {
constructor (runtime) {
/**
* The runtime instantiating this block package.
* @type {Runtime}
*/
this.runtime = runtime;
}

/**
* Retrieve the block primitives implemented by this package.
* @return {object.<string, Function>} Mapping of opcode to Function.
*/
getPrimitives () {
return {
comments_hat: this.hat,
comments_command: this.command,
comments_loop: this.loop,
comments_reporter: this.reporter,
comments_boolean: this.boolean,
comments_object: this.object,
comments_array: this.array
};
}

hat (args) {

Check failure on line 28 in src/blocks/scratch3_comments.js

View workflow job for this annotation

GitHub Actions / build

'args' is defined but never used
// No Operation;
}

command (args) {

Check failure on line 32 in src/blocks/scratch3_comments.js

View workflow job for this annotation

GitHub Actions / build

'args' is defined but never used
// No Operation;
}

loop (args, util) {
util.startBranch(1, false);
}

reporter (args) {
return args.VALUE;
}

boolean (args) {
return Cast.toBoolean(args.VALUE);
}

object (args) {
return Cast.toObject(args.VALUE);
}

array (args) {
return Cast.toArray(args.VALUE);
}
}

module.exports = Scratch3CommentsBlocks;
2 changes: 1 addition & 1 deletion src/blocks/scratch3_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Scratch3DataBlocks {
if (allSingleLetters) {
return list.value.join('');
}
return list.value.join(' ');
return list.value.map(item => Cast.toString(item)).join(' ');

}

Expand Down
Loading
Loading