Compiles Scratch 3 projects into Java bytecode and executable JARs.
Developer toolsKotlin · JavaScriptGitHub @AstroBlocksModOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Scratch 3 on the Java platform!
Translation pending
Taken from the repository README
Loading the full README.
Read the full README ↗jScratch compiles Scratch 3 projects (.sb3) into Java bytecode and executable JARs. Every sprite becomes a JVM class, every script a method, and a small bundled runtime provides the stage, the scheduler, input and rendering.
./gradlew :cli:fatJar
java -jar cli/build/libs/cli-0.1.0-SNAPSHOT-all.jar my-game.sb3
java -jar my-game.jar
# or compile a shared project straight from the Scratch website
java -jar cli/build/libs/cli-0.1.0-SNAPSHOT-all.jar https://scratch.mit.edu/projects/10128407/
.sb) and Scratch 2 (.sb2) projects are converted to Scratch 3 with the Scratch Foundation's own code, scratch-sb1-converter and scratch-vm, then compiled like any other.This is an MVP. Typical projects from the Scratch website compile and run, with gaps listed in docs/blocks.md, such as no extensions besides pen.
| Module | Purpose |
|---|---|
runtime/ | Scratch runtime bundled into compiled JARs |
sb3js/ | scratch-parser and the Scratch 1.4 and 2 converter, bundled for Rhino and the browser |
compiler/ | Platform-neutral core: sb3 model, ASM code generator, JAR writer |
compiler-jvm/ | Rhino bridge to scratch-parser and the converter, JSON through kotlinx-serialization, end-to-end tests |
cli/ | jscratch command line tool, including project downloads from scratch.mit.edu |
web/ | TeaVM playground |
samples/ | Sample projects, zipped into .sb3 and .sb2 by the build |
benchmarks/ | CPU-heavy projects timed on jScratch, TurboWarp and scratch-vm |
docs/ | Documentation site (Zensical) |
Useful commands:
./gradlew build # lint, test and assemble everything
./gradlew :web:assembleSite # playground in web/build/site
zensical serve # preview the docs
See the documentation for the CLI options, the supported blocks, the architecture and development notes.
jScratch is free software released under the GNU General Public License v3.0. It bundles scratch-parser, scratch-vm, scratch-storage and scratch-sb1-converter, which are licensed under the AGPL-3.0.