forked from SheepTester/words-go-here
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69c7f65
commit c67ad45
Showing
13 changed files
with
1,043 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 David Feng | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Scratch 3 to HTML Converter | ||
|
||
![screenshot of the converter running](resources/screenshot.png) | ||
|
||
> ⚠ WARNING: WORK IN PROGRESS! NOT YET USABLE! CHINESE LANG UI ONLY! | ||
Core code forked from **Sheep_maker**'s repository, this program converts Scratch 3 projects (.sb3 files) into stand-alone HTML files. | ||
|
||
I used NodeJS Electron to pack this program into a Windows/MacOS/Linux Executable, along with a cosmetic overhual of the original UI. | ||
|
||
> ⚠ 警告:仍在开发过程中,尚不能运行!界面语言仅限中文! | ||
核心代码分叉自Sheep_maker的仓库,本程序把Scratch 3项目(.sb3文件)转换为独立的HTML文件。 | ||
|
||
我使用NodeJS Electron将此程序打包成Windows/MacOS/Linux执行档,还顺便对原本的用户界面进行了美观性打磨。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const electron = require('electron'); | ||
const app = electron.app; | ||
const BrowserWindow = electron.BrowserWindow; | ||
|
||
// 保持一个对于 window 对象的全局引用,不然,当 JavaScript 被 GC, | ||
// window 会被自动地关闭 | ||
var mainWindow = null; | ||
|
||
// 当所有窗口被关闭了,退出。 | ||
app.on('window-all-closed', function () { | ||
// 在 OS X 上,通常用户在明确地按下 Cmd + Q 之前 | ||
// 应用会保持活动状态 | ||
if (process.platform != 'darwin') { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
// 当 Electron 完成了初始化并且准备创建浏览器窗口的时候 | ||
// 这个方法就被调用 | ||
app.on('ready', function () { | ||
// 创建浏览器窗口。 | ||
mainWindow = new BrowserWindow({ width: 750, height: 920 , icon:"resources/icon.png"}); | ||
|
||
// 加载应用的 index.html | ||
mainWindow.loadURL('file://' + __dirname + '/index.html'); | ||
|
||
// 当 window 被关闭,这个事件会被发出 | ||
mainWindow.on('closed', function () { | ||
// 取消引用 window 对象,如果你的应用支持多窗口的话, | ||
// 通常会把多个 window 对象存放在一个数组里面, | ||
// 但这次不是。 | ||
mainWindow = null; | ||
}); | ||
}); |
Oops, something went wrong.