本程序将把你的Scratch项目打包成一个可以在web浏览器中独立运行的HTML文件。生成的HTML文件会比较大,因为它包含整个Scratch引擎(2.6mb)以及项目中使用的角色和声音文件。因两种程序语言不同,Scratch模块和JavaScript模块之间未进行直接转换,生成的文件代码不适合用于学习HTML或JavaScript。
转换后的项目会自动启动,并且没有开始按钮(绿色小旗)和停止按钮。
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.
1You may have to deal with privacy laws around cookies outside of Scratch.
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).
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.
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.
Update history
See the code and previous versions on Github.
2020-06-13
- More options for styling variable/list monitors
- Option to generate a .zip of files
- Option to preview the HTMLified project
- Readded the option for a progress counter despite lack of demand
- Warn if a file might be too large for JavaScript to HTMLify
- Fixed HTMLifying 2.0 projects
2020-06-01
- Option to remove clone/list length limits
- Option to hide the cursor
- Ability to distinguish between cloud variables for localStorage and the server (and run JavaScript using cloud variables)
- Option for rudimentary pointer lock
- Fixed mouse position and unresized lists not showing
- Default project changed to one of ScratchCat's
- Unfortunately, as part of these changes, I removed the option for a progress bar. If there's demand, I'll try to add it back.
2020-05-01
- Support for custom extensions from a URL
- CSS by Mr. Cringe Kid
2020-03-29
- Fixed custom stage sizes
2020-03-27
- Show an image such as a gif while loading
- Fixed dragging sprites simulating another green flag click
2020-01-06
- An offline version of the HTMLifier
2019-12-25
- An option to use a custom cloud server for cloud variables instead of saving to localStorage
2019-11-23
- A fullscreen button
- An option to change monitor colours
2019-10-05
- New ask box
2019-09-28
- A status text that shows the assets loaded
- Support the video extension
- Support draggable sprites
2019-08-08
- Removed "Scratch" from the name of this utility just in case
2019-07-27
- Support 16:9 projects
- Simplify the number of modes for HTMLification
2019-07-13
- Cloud variables store in localStorage
2019-06-29
- Upload project file instead of using project ID
- Toggle compatibility and turbo mode
2019-03-31
- Variable and list watchers
2019-02-09
- Project start
本程序由Sheep_maker制作,该程序中使用了 scratch-vm, download.js 及其依赖项。
CSS 由 Cringe Kid 先生编写。
由 王俊峰 汉化,并隐藏了转换项目的设置和开发日志,如需上述功能请使用原 Project HTMLifier 页面。