Skip to content

Commit 2691bff

Browse files
committed
02Engine initial commit
1 parent dfc67dd commit 2691bff

57 files changed

Lines changed: 380 additions & 194 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
See https://github.com/TurboWarp/docs#writing-content
1+
See https://github.com/02Engine/docs#writing-content

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# TurboWarp Docs
1+
# 02Engine Docs
22

3-
https://docs.turbowarp.org/
3+
https://docs.02engine.org/
44

5-
This repository contains documentation for TurboWarp.
5+
This repository contains documentation for 02Engine.
66

77
## Writing content
88

9-
If you found a typo or have a suggestion to improve the pages, the easiest way to get it resolved is to post about it on the Scratch profile https://scratch.mit.edu/users/GarboMuffin/#comments or in GitHub issues https://github.com/TurboWarp/docs/issues/new. Minor fixes get resolved very quickly usually.
9+
If you found a typo or have a suggestion to improve the pages, the easiest way to get it resolved is to post about it on the Scratch profile https://scratch.mit.edu/users/GarboMuffin/#comments or in GitHub issues https://github.com/02Engine/docs/issues/new. Minor fixes get resolved very quickly usually.
1010

1111
Alternatively, you can submit a pull request yourself containing a fix. The easiest way to edit a page is:
1212

13-
1. Open the website, https://docs.turbowarp.org/
13+
1. Open the website, https://docs.02engine.org/
1414
2. Find the page you want to edit
1515
3. Click "Edit this page" at the bottom
1616
4. Sign in with a GitHub account

docs/desktop/rich-presence.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hide_table_of_contents: true
66

77
# Rich Presence
88

9-
TurboWarp Desktop supports Rich Presence, which can display the name of the project you're working on and how long you've been working on it on your profile in a certain chat app.
9+
02Engine Desktop supports Rich Presence, which can display the name of the project you're working on and how long you've been working on it on your profile in a certain chat app.
1010

1111
import example from './rich-presence-example.png';
1212
import settingsMenu from './rich-presence-settings-menu.png';
@@ -34,39 +34,39 @@ It may take up to 15 seconds for your status to appear, update, or disappear. If
3434

3535
### Windows {#windows}
3636

37-
Rich Presence works in Windows regardless of how you installed TurboWarp Desktop or Chat App.
37+
Rich Presence works in Windows regardless of how you installed 02Engine Desktop or Chat App.
3838

3939
### macOS {#mac}
4040

4141
:::warning
42-
Rich Presence will not work if TurboWarp Desktop is installed from the Mac App Store.
42+
Rich Presence will not work if 02Engine Desktop is installed from the Mac App Store.
4343
:::
4444

4545
### Linux {#linux}
4646

47-
For best results, install TurboWarp Desktop as a native app using the .deb package, Debian repository, Arch User Repository, AppImage, or tarball. TurboWarp Desktop installed as a Flatpak may require manual permission overrides. TurboWarp Desktop installed as a Snap does not work at all. See the table below for more details:
47+
For best results, install 02Engine Desktop as a native app using the .deb package, Debian repository, Arch User Repository, AppImage, or tarball. 02Engine Desktop installed as a Flatpak may require manual permission overrides. 02Engine Desktop installed as a Snap does not work at all. See the table below for more details:
4848

4949
| | Chat App Native | Chat App Flatpak | Chat App Snap |
5050
| :-: | :-: | :-: | :-: |
51-
| **TurboWarp Desktop Native** ||||
52-
| **TurboWarp Desktop Flatpak** | See commands below || See commands below |
53-
| **TurboWarp Desktop Snap** ||||
51+
| **02Engine Desktop Native** ||||
52+
| **02Engine Desktop Flatpak** | See commands below || See commands below |
53+
| **02Engine Desktop Snap** ||||
5454

55-
For the Flatpak version of TurboWarp Desktop, you may need to run these commands in a terminal and restart TurboWarp Desktop for Rich Presence to function:
55+
For the Flatpak version of 02Engine Desktop, you may need to run these commands in a terminal and restart 02Engine Desktop for Rich Presence to function:
5656

5757
```bash
5858
# For Chat App Native
59-
flatpak override org.turbowarp.TurboWarp --user --filesystem=xdg-run/$(printf "\x64\x69\x73\x63\x6f\x72\x64")-ipc-{0..9}
59+
flatpak override org.02Engine.02Engine --user --filesystem=xdg-run/$(printf "\x64\x69\x73\x63\x6f\x72\x64")-ipc-{0..9}
6060
# For Chat App Snap
61-
flatpak override org.turbowarp.TurboWarp --user --filesystem=xdg-run/snap.$(printf "\x64\x69\x73\x63\x6f\x72\x64"):create
61+
flatpak override org.02Engine.02Engine --user --filesystem=xdg-run/snap.$(printf "\x64\x69\x73\x63\x6f\x72\x64"):create
6262
```
6363

64-
There is still a small caveat: Rich Presence may not work if TurboWarp Desktop is started before Chat App.
64+
There is still a small caveat: Rich Presence may not work if 02Engine Desktop is started before Chat App.
6565

6666
These permissions can be later revoked with:
6767

6868
```bash
69-
flatpak override org.turbowarp.TurboWarp --user --reset
69+
flatpak override org.02Engine.02Engine --user --reset
7070
```
7171

7272
### Chat App modifications {#mods}

docs/development/extensions/assorted-apis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ docsURI adds a button at the start of the block list that opens a page for peopl
2424

2525
## disableMonitor
2626

27-
Scratch will automatically show a checkbox to show a variable monitor by REPORTER blocks with no inputs. Note that in TurboWarp, this applies to BOOLEAN blocks too. To disable this, set disableMonitor to true on the block.
27+
Scratch will automatically show a checkbox to show a variable monitor by REPORTER blocks with no inputs. Note that in 02Engine, this applies to BOOLEAN blocks too. To disable this, set disableMonitor to true on the block.
2828

2929
Note that, even if disableMonitor is set, it is still possible for someone to manually create a monitor using a modified (or old) version of the extension or other tools.
3030

docs/development/extensions/async.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Notice the async blocks are defined the same as other blocks in getInfo(). The o
1616

1717
The first block in this question is roughly equivalent to Scratch's built-in wait block. Notice that we had to manually construct a Promise this time because setTimeout does not use Promises. When Scratch hits this block, it won't continue executing the script until this promise resolves. Scratch may continue executing other scripts in the meantime. Wait is a command block (no return value), so it shouldn't resolve with anything (it would be ignored).
1818

19-
The second block is a block that tries to fetch a URL, similar to the "Fetch" extension on https://extensions.turbowarp.org/. fetch() already returns a promise, so we simply chain on top of it instead of making a new promise this time.
19+
The second block is a block that tries to fetch a URL, similar to the "Fetch" extension on https://extensions.02engine.org/. fetch() already returns a promise, so we simply chain on top of it instead of making a new promise this time.
2020

2121
The restriction on return values still applies: you still need to ensure that you return a string, number, or boolean, so we call text() in then() to convert the Response object from fetch() into a string.
2222

docs/development/extensions/better-development-server.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import {Spoiler} from './utils.js';
88

99
The HTTP server built into Python is simple to use, but it's primitive. We can do better. This section is strictly optional, but we think it will make your life easier.
1010

11-
## TurboWarp/extensions
11+
## 02Engine/extensions
1212

13-
The GitHub repository of extensions.turbowarp.org is [TurboWarp/extensions](https://github.com/TurboWarp/extensions). One of the things available here is the development server that we use, along with the code that makes the website. You can run it locally too.
13+
The GitHub repository of extensions.02engine.org is [02Engine/extensions](https://github.com/02Engine/extensions). One of the things available here is the development server that we use, along with the code that makes the website. You can run it locally too.
1414

1515
This will require Git and Node.js to be installed locally. Run these commands to download the server and install its dependencies:
1616

1717
```bash
18-
git clone https://github.com/TurboWarp/extensions.git
18+
git clone https://github.com/02Engine/extensions.git
1919
cd extensions
2020
npm ci
2121
```
@@ -28,11 +28,11 @@ Close your old development server and start the new one with:
2828
npm run dev
2929
```
3030

31-
Now navigate to [http://localhost:8000](http://localhost:8000) -- you should see a list similar to [extensions.turbowarp.org](https://extensions.turbowarp.org/). For now, we're not going to worry about the list, we're just going to use the development server part.
31+
Now navigate to [http://localhost:8000](http://localhost:8000) -- you should see a list similar to [extensions.02engine.org](https://extensions.02engine.org/). For now, we're not going to worry about the list, we're just going to use the development server part.
3232

3333
The place to save your extension JS is in the `extensions` folder inside of the repository. If you intend to submit these to us later, you should create a user folder for your extensions. For example, if your username is `TestMuffin`, you might save your fetching extension in the folder `extensions/TestMuffin/fetch.js` and load it using http://localhost:8000/TestMuffin/fetch.js. The extension should then also use an ID that contains your username, such as `testmuffinfetch`.
3434

35-
The local development server is set up with the correct headers so that you don't need to manually hard refresh to ensure your script changes apply, and it tries to mimic the real extensions.turbowarp.org website as much as possible. It also includes TypeScript hints for many common Scratch APIs and ESLint rules for common mistakes.
35+
The local development server is set up with the correct headers so that you don't need to manually hard refresh to ensure your script changes apply, and it tries to mimic the real extensions.02engine.org website as much as possible. It also includes TypeScript hints for many common Scratch APIs and ESLint rules for common mistakes.
3636

3737
In the future, we may consider adding more development features.
3838

docs/development/extensions/hello-world.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Let's start by creating a very simple extension. This extension just adds a bloc
1010

1111
<ExtensionCode title="hello-world">{require('!raw-loader!@site/static/example-extensions/hello-world.js')}</ExtensionCode>
1212

13-
The above is a standard component we will use for showing extension code. Make note of the "Try this extension" button by the title -- that link will let you see what this extension does without having to do anything locally. Note that these extensions are primarily for demonstrating API features; they are not intended to be actually used in projects. There will almost always be another extension on [extensions.turbowarp.org](https://extensions.turbowarp.org/) that does the same thing, but better.
13+
The above is a standard component we will use for showing extension code. Make note of the "Try this extension" button by the title -- that link will let you see what this extension does without having to do anything locally. Note that these extensions are primarily for demonstrating API features; they are not intended to be actually used in projects. There will almost always be another extension on [extensions.02engine.org](https://extensions.02engine.org/) that does the same thing, but better.
1414

1515
If you're just using simple files to develop extensions, save this code into a file called "hello-world.js". If you're using a local HTTP server, save the code in a file called "hello-world.js" that the server will let you access.
1616

17-
Now, go to the TurboWarp editor, click on the add extension button (a + next to 2 blocks), scroll to the bottom of the Scratch section, and choose the "Custom Extension" option. Either enter the full URL to your local HTTP server or use one of the other tabs to select your file or paste in code. For now, **do not** check the "Run extension without sandbox" box.
17+
Now, go to the 02Engine editor, click on the add extension button (a + next to 2 blocks), scroll to the bottom of the Scratch section, and choose the "Custom Extension" option. Either enter the full URL to your local HTTP server or use one of the other tabs to select your file or paste in code. For now, **do not** check the "Run extension without sandbox" box.
1818

1919
After a second, an extension named "It works!" should appear in the sidebar. If it doesn't appear, open up your developer tools and look for any warnings in the console. Some of the most common errors are:
2020

@@ -97,7 +97,7 @@ While other BlockTypes do exist, they do not work well and will not be discussed
9797
9898
This defines the function that will run the block with the opcode "hello". In this case, our block is very simple and just returns a string. REPORTER blocks are expected to return a string, number, or boolean, and BOOLEAN blocks are expected to only return a boolean. Note that `null`, `undefined`, lists, and objects are not expected return values for these blocks.
9999
100-
When you want to change the extension, simply modify the extension and reload the page. Here's a tip to make your life easier: You can use the `?extension=` URL parameter to load an extension automatically instead of requiring going into the library. For example, if your extension URL is http://localhost:8080/hello-world.js, you could use https://turbowarp.org/editor?extension=http://localhost:8080/hello-world.js to load it automatically.
100+
When you want to change the extension, simply modify the extension and reload the page. Here's a tip to make your life easier: You can use the `?extension=` URL parameter to load an extension automatically instead of requiring going into the library. For example, if your extension URL is http://localhost:8080/hello-world.js, you could use https://02engine.org/editor?extension=http://localhost:8080/hello-world.js to load it automatically.
101101
102102
If you observe that your changes aren't being applied when you refresh, try your browser's "hard refresh" or "refresh without cache" shortcuts.
103103

docs/development/extensions/inputs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Often you will want your blocks to take something in as an "input", "argument",
1212

1313
Save this code to a file called "strict-equality.js" beside "hello-world.js", and load it the same way you loaded the hello world extension. Most of the code is very similar to the hello world extension. Notice that the strictly equals block in this extension will differentiate between "a" and "A" unlike the normal Scratch equals block.
1414

15-
(If you want to use this block in your projects, see the "Utilities" extension on https://extensions.turbowarp.org/)
15+
(If you want to use this block in your projects, see the "Utilities" extension on https://extensions.02engine.org/)
1616

1717
Now let's talk about the arguments.
1818

@@ -69,7 +69,7 @@ Sometimes you might prefer your blocks to have a dropdown. These are called menu
6969

7070
<ExtensionCode title="strings-1">{require("!raw-loader!@site/static/example-extensions/strings-1.js")}</ExtensionCode>
7171

72-
A similar block is available in the "Text" extension on https://extensions.turbowarp.org/.
72+
A similar block is available in the "Text" extension on https://extensions.02engine.org/.
7373

7474
To make an argument into a menu, set its `type` to `Scratch.ArgumentType.STRING` and set its `menu` property to the name of the menu. This corresponds to a new property in the object returned by getInfo(): `menus`.
7575

docs/development/extensions/introduction.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ hide_table_of_contents: true
44

55
# Introduction to custom extensions
66

7-
Custom extensions are a way for you to add new blocks to TurboWarp using JavaScript.
7+
Custom extensions are a way for you to add new blocks to 02Engine using JavaScript.
88

99
In this tutorial, we will describe how to build custom extensions. The pages can be navigated using the sidebar or links at the bottom of each page. We assume that you read each page in full and do the exercises listed (if any) before going to the next page.
1010

@@ -28,7 +28,7 @@ We will discuss the difference between sandboxed and unsandboxed extensions at [
2828

2929
## Compatibility
3030

31-
Custom extensions are not compatible with Scratch. Projects made using custom extensions cannot be uploaded to the Scratch website. They can, however, be packaged using the [TurboWarp Packager](https://packager.turbowarp.org/).
31+
Custom extensions are not compatible with Scratch. Projects made using custom extensions cannot be uploaded to the Scratch website. They can, however, be packaged using the [02Engine Packager](https://packager.02engine.org/).
3232

3333
## Prerequisites
3434

@@ -46,15 +46,15 @@ We know that some of you will be eager to start sharing your extensions around,
4646

4747
## Prepare a development environment
4848

49-
In recent versions of TurboWarp, there are several ways to develop extensions.
49+
In recent versions of 02Engine, there are several ways to develop extensions.
5050

5151
### Files (simplest)
5252

53-
Recent versions of the TurboWarp website and desktop app have an option in the custom extension menu to load extensions either from local files or from copied and pasted JavaScript code. This will be the easiest way to develop extensions as it can be done on any computer with just a text editor.
53+
Recent versions of the 02Engine website and desktop app have an option in the custom extension menu to load extensions either from local files or from copied and pasted JavaScript code. This will be the easiest way to develop extensions as it can be done on any computer with just a text editor.
5454

5555
### Local HTTP Server (recommended)
5656

57-
However, if possible, you should use a local HTTP server that lets TurboWarp fetch your extension from your computer. This speeds up the process because you don't have to select/paste the JavaScript code in TurboWarp every time you make changes. There are a lot of options for installing one of these. If you have Python installed, you already have one:
57+
However, if possible, you should use a local HTTP server that lets 02Engine fetch your extension from your computer. This speeds up the process because you don't have to select/paste the JavaScript code in 02Engine every time you make changes. There are a lot of options for installing one of these. If you have Python installed, you already have one:
5858

5959
```bash
6060
cd path/to/where/you/will/store/your/extensions

docs/development/extensions/sandbox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ And perhaps most importantly, running a block from an unsandboxed extension is a
4848

4949
1. Create a sandboxed extension (same as we've been building so far) with a COMMAND block that does nothing. Create a new empty project and create a repeat (10) loop that runs this block 4 times. Observe that, even though the blocks don't do anything, it takes more than a second for the loop to complete.
5050
1. In the repeat loop, replace the block from the extension with a "set my variable to 0" block instead. Observe that the loop completes instantly. This is how blocks from unsandboxed extensions will behave.
51-
1. Inside a custom extension, use console.log to output the value of `window.origin`. Compare this to running `window.origin` in your browser's developer console on turbowarp.org.
51+
1. Inside a custom extension, use console.log to output the value of `window.origin`. Compare this to running `window.origin` in your browser's developer console on 02engine.org.
5252

5353
## Next steps
5454

0 commit comments

Comments
 (0)