Translate scratch script to HTML and javascript [closed]
Asked Answered
C

3

5

I am wondering if there already exists a translator to export a scratch project to HTML and javascript or to export a project so it can be played on a tablet.

Cancel answered 30/11, 2016 at 11:21 Comment(1)
phosphorus.github.ioKamchatka
F
4

As Scimonster mentioned in a comment, Phosphorus (written by Nathan) will run your projects on an HTML5 Canvas and let you export the project to other places.

However, Sulfurous is an improvement to the Phosphorus player and might run projects more accurately to how the Scratch Player would.

Note that both players have issues and might not replicate the projects perfectly.

Fleecy answered 1/1, 2017 at 16:53 Comment(1)
But how to package it standalone without needing to run it on a link given by these tools Phosphorus or Sulfurous?Ignatia
H
4

Yes, you can use Scratch HTMLifier by SheepTester, which generates a HTML file that runs the project. It uses the official Scratch VM so everything should work the same as in Scratch. Note that variables and ask prompts will look different.

Hodman answered 17/2, 2020 at 15:26 Comment(1)
This doesn't seem so nice. I have a simple dart game simulator but it doesn't work properly in the html versionAtwood
S
2

You don't need Phosphorus or Sulpherous now, since Scratch 3.0 (the current version) allows you to directly play on a tablet from the Scratch website. This is because Scratch 3.0 doesn't need Adobe Flash.

Swerve answered 23/2, 2019 at 15:32 Comment(2)
But I was wondering if it can be packed as a standalone web app at a specific url?Glaze
@Glaze You can add /embed after the project url. For example: https://scratch.mit.edu/projects/303683408/embedSwerve

© 2022 - 2024 — McMap. All rights reserved.