Project HTMLifier

Convert a Scratch project to HTML Scratch转HTML

This packages your Scratch project into a single HTML file that can run on its own in a web browser. The HTML file will be pretty big because it contains the entire Scratch engine (2.6 MB) and the costume and sound files used in the project. There is no direct translation between a Scratch block and a JavaScript equivalent because the two languages are fundamentally different, so you should not use the code in the generated file for learning HTML or JavaScript after Scratch.

这会将你的Scratch项目打包为一个HTML文件,该文件可以在网络浏览器中单独运行。HTML文件将很大,因为它包含整个Scratch引擎(2.6 MB)以及项目中使用的服装和声音文件。在Scratch块和等效的JavaScript之间没有直接翻译,因为这两种语言本质上是不同的,因此您不应在生成的文件中使用代码在Scratch之后学习HTML或JavaScript。

The project will automatically start, and there are no green flag or stop sign buttons.

该项目将自动启动,并且没有绿色标志或停止符号按钮。

Options(选项)

(the text displayed in the browser tab)(浏览器选项卡中显示的文本)

(the value that the username block reports)(用户名块报出的数值)

2

3

Monitor style(显示器风格)

Cloud variable source(云变量)

1

4

E羊icques (modded) options

If you want to view or edit the HTML file, you can use the specialized Large File Editor to hide the long lines that may hang or crash normal text editors.(如果要查看或编辑HTML文件,可以使用专门的“大文件编辑器”来隐藏可能会挂起或使普通文本编辑器崩溃的长行。)

1You may have to deal with privacy laws around cookies outside of Scratch.(你可能需要处理Scratch外部Cookie的隐私权法律。)

2Compatibility mode forces projects to run at 30 FPS, like in Scratch 2.0. Turning this off allows the project to run at a higher framerate (usually 60 FPS, depending on the computer screen's refresh rate).(兼容模式会强制项目以30 FPS的速度运行,就像在Scratch 2.0中一样。禁用此选项可使项目以更高的帧速率运行(通常为60 FPS,具体取决于计算机屏幕的刷新率)。)

3I think the implementation of this is poor. Maybe instead of setting mouse x/y, it can set a cloud variable with a certain name. You can leave feedback and suggestions on my profile(我认为执行起来很差。也许不用设置鼠标x / y,而是可以设置一个具有特定名称的cloud变量。您可以在我的个人资料上留下反馈和建议。).

4If a cloud variable with the name "☁ eval" is set, it'll run the variable value as JavaScript and store it in a cloud variable named "☁ eval output"; if there is an error, it'll be stored in "☁ eval error." If you're using a custom cloud server, then cloud variables whose names start with "☁ local storage" will store their values in localStorage instead of in the server.(如果设置了名称为"☁ eval "的云变量,则会将变量值作为JavaScript运行,并将其存储在名为"☁ eval output "的云变量中;如果出现错误,则会将其存储在"☁ eval error "中。如果你使用的是自定义云服务器,那么名称以"☁ local storage"开头的云变量将把它们的值存储在localStorage中,而不是服务器中。)

Update history

See the code and previous versions on Github.

  • Project start
  • Made by Sheep_maker, who used scratch-vm, download.js, and their dependencies for this project.

    CSS by Mr. Cringe Kid.