mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-15 16:01:07 -04:00
fix: update GitHub links with /scratchfoundation/
This commit is contained in:
parent
613e5cc823
commit
802d211f95
10 changed files with 26 additions and 27 deletions
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
|
@ -5,7 +5,7 @@ The development of Scratch is an ongoing process, and we love to have people in
|
|||
|
||||
* **Documenting bugs**
|
||||
* If you've identified a bug in Scratch you should first check to see if it's been filed as an issue, if not you can file one. Make sure you follow the issue template.
|
||||
* It's important that we can consistently reproduce issues. When writing an issue, be sure to follow our [reproduction step guidelines](https://github.com/LLK/scratch-gui/wiki/Writing-good-repro-steps).
|
||||
* It's important that we can consistently reproduce issues. When writing an issue, be sure to follow our [reproduction step guidelines](https://github.com/scratchfoundation/scratch-gui/wiki/Writing-good-repro-steps).
|
||||
* Some issues are marked "Needs Repro". Adding a comment with good reproduction steps to those issues is a great way to help.
|
||||
* If you don't have an issue in mind already, you can look through the [Bugs & Glitches forum.](https://scratch.mit.edu/discuss/3/) Look for users reporting problems, reproduce the problem yourself, and file new issues following our guidelines.
|
||||
|
||||
|
@ -60,7 +60,7 @@ We welcome suggestions! If you want to suggest a feature, please post in our [su
|
|||
|
||||
### Other resources
|
||||
Beyond this repo, there are also some other resources that you might want to take a look at:
|
||||
* [Community Guidelines](https://github.com/LLK/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
|
||||
* [Community Guidelines](https://github.com/scratchfoundation/scratch-www/wiki/Community-Guidelines) (we find it important to maintain a constructive and welcoming community, just like on Scratch)
|
||||
* [Open Source forum](https://scratch.mit.edu/discuss/49/) on Scratch
|
||||
* [Suggestions forum](https://scratch.mit.edu/discuss/1/) on Scratch
|
||||
* [Bugs & Glitches forum](https://scratch.mit.edu/discuss/3/) on Scratch
|
||||
|
|
11
README.md
11
README.md
|
@ -1,8 +1,7 @@
|
|||
## scratch-vm
|
||||
#### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/LLK/scratch-blocks).
|
||||
#### Scratch VM is a library for representing, running, and maintaining the state of computer programs written using [Scratch Blocks](https://github.com/scratchfoundation/scratch-blocks).
|
||||
|
||||
[](https://travis-ci.org/LLK/scratch-vm)
|
||||
[](https://coveralls.io/github/LLK/scratch-vm?branch=develop)
|
||||
[](https://github.com/scratchfoundation/scratch-vm/actions/workflows/ci-cd.yml)
|
||||
|
||||
## Installation
|
||||
This requires you to have Git and Node.js installed.
|
||||
|
@ -13,7 +12,7 @@ npm install scratch-vm
|
|||
```
|
||||
To set up a development environment to edit scratch-vm yourself:
|
||||
```bash
|
||||
git clone https://github.com/LLK/scratch-vm.git
|
||||
git clone https://github.com/scratchfoundation/scratch-vm.git
|
||||
cd scratch-vm
|
||||
npm install
|
||||
```
|
||||
|
@ -21,7 +20,7 @@ npm install
|
|||
## Development Server
|
||||
This requires Node.js to be installed.
|
||||
|
||||
For convenience, we've included a development server with the VM. This is sometimes useful when running in an environment that's loading remote resources (e.g., SVGs from the Scratch server). If you would like to use your modified VM with the full Scratch 3.0 GUI, [follow the instructions to link the VM to the GUI](https://github.com/LLK/scratch-gui/wiki/Getting-Started).
|
||||
For convenience, we've included a development server with the VM. This is sometimes useful when running in an environment that's loading remote resources (e.g., SVGs from the Scratch server). If you would like to use your modified VM with the full Scratch 3.0 GUI, [follow the instructions to link the VM to the GUI](https://github.com/scratchfoundation/scratch-gui/wiki/Getting-Started).
|
||||
|
||||
## Running the Development Server
|
||||
Open a Command Prompt or Terminal in the repository and run:
|
||||
|
@ -64,7 +63,7 @@ vm.start();
|
|||
## Abstract Syntax Tree
|
||||
|
||||
#### Overview
|
||||
The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST) by listening to events emitted by the [scratch-blocks](https://github.com/LLK/scratch-blocks) workspace via the `blockListener`. Each target (code-running object, for example, a sprite) keeps an AST for its blocks. At any time, the current state of an AST can be viewed by inspecting the `vm.runtime.targets[...].blocks` object.
|
||||
The Virtual Machine constructs and maintains the state of an [Abstract Syntax Tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST) by listening to events emitted by the [scratch-blocks](https://github.com/scratchfoundation/scratch-blocks) workspace via the `blockListener`. Each target (code-running object, for example, a sprite) keeps an AST for its blocks. At any time, the current state of an AST can be viewed by inspecting the `vm.runtime.targets[...].blocks` object.
|
||||
|
||||
#### Anatomy of a Block
|
||||
The VM's block representation contains all the important information for execution and storage. Here's an example representing the "when key pressed" script on a workspace:
|
||||
|
|
|
@ -48,7 +48,7 @@ ways.
|
|||
## Defining an Extension
|
||||
|
||||
Scratch extensions are defined as a single Javascript class which accepts either a reference to the Scratch
|
||||
[VM](https://github.com/llk/scratch-vm) runtime or a "runtime proxy" which handles communication with the Scratch VM
|
||||
[VM](https://github.com/scratchfoundation/scratch-vm) runtime or a "runtime proxy" which handles communication with the Scratch VM
|
||||
across a well defined worker boundary (i.e. the sandbox).
|
||||
|
||||
```js
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
"description": "Virtual Machine for Scratch 3.0",
|
||||
"author": "Massachusetts Institute of Technology",
|
||||
"license": "BSD-3-Clause",
|
||||
"homepage": "https://github.com/LLK/scratch-vm#readme",
|
||||
"homepage": "https://github.com/scratchfoundation/scratch-vm#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/LLK/scratch-vm.git",
|
||||
"url": "https://github.com/scratchfoundation/scratch-vm.git",
|
||||
"sha": "6c2df37bed2cbda63a9de514ceb021e67f10a86a"
|
||||
},
|
||||
"main": "./dist/node/scratch-vm.js",
|
||||
|
|
|
@ -250,7 +250,7 @@ class Scratch3LooksBlocks {
|
|||
|
||||
// Non-integers should be rounded to 2 decimal places (no more, no less), unless they're small enough that
|
||||
// rounding would display them as 0.00. This matches 2.0's behavior:
|
||||
// https://github.com/LLK/scratch-flash/blob/2e4a402ceb205a042887f54b26eebe1c2e6da6c0/src/scratch/ScratchSprite.as#L579-L585
|
||||
// https://github.com/scratchfoundation/scratch-flash/blob/2e4a402ceb205a042887f54b26eebe1c2e6da6c0/src/scratch/ScratchSprite.as#L579-L585
|
||||
if (typeof text === 'number' &&
|
||||
Math.abs(text) >= 0.01 && text % 1 !== 0) {
|
||||
text = text.toFixed(2);
|
||||
|
|
|
@ -15,7 +15,7 @@ const blockIconURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYA
|
|||
|
||||
/**
|
||||
* Enum for micro:bit BLE command protocol.
|
||||
* https://github.com/LLK/scratch-microbit-firmware/blob/master/protocol.md
|
||||
* https://github.com/scratchfoundation/scratch-microbit-firmware/blob/master/protocol.md
|
||||
* @readonly
|
||||
* @enum {number}
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@ const BLEDataStoppedError = 'micro:bit extension stopped receiving data';
|
|||
|
||||
/**
|
||||
* Enum for micro:bit protocol.
|
||||
* https://github.com/LLK/scratch-microbit-firmware/blob/master/protocol.md
|
||||
* https://github.com/scratchfoundation/scratch-microbit-firmware/blob/master/protocol.md
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
|
|
|
@ -198,7 +198,7 @@ class Scratch3Text2SpeechBlocks {
|
|||
*
|
||||
* SCRATCH LOCALE
|
||||
* Set by the editor, and used to store the language state in the project.
|
||||
* Listed in l10n: https://github.com/LLK/scratch-l10n/blob/master/src/supported-locales.js
|
||||
* Listed in l10n: https://github.com/scratchfoundation/scratch-l10n/blob/master/src/supported-locales.js
|
||||
* SUPPORTED LOCALE
|
||||
* A Scratch locale that has a corresponding extension locale.
|
||||
* EXTENSION LOCALE
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
* Keep this up-to-date as 3.0 blocks are renamed, changed, etc.
|
||||
* Originally this was generated largely by a hand-guided scripting process.
|
||||
* The relevant data lives here:
|
||||
* https://github.com/LLK/scratch-flash/blob/master/src/Specs.as
|
||||
* https://github.com/scratchfoundation/scratch-flash/blob/master/src/Specs.as
|
||||
* (for the old opcode and argument order).
|
||||
* and here:
|
||||
* https://github.com/LLK/scratch-blocks/tree/develop/blocks_vertical
|
||||
* https://github.com/scratchfoundation/scratch-blocks/tree/develop/blocks_vertical
|
||||
* (for the new opcodes and argument names).
|
||||
* and here:
|
||||
* https://github.com/LLK/scratch-blocks/blob/develop/tests/
|
||||
* https://github.com/scratchfoundation/scratch-blocks/blob/develop/tests/
|
||||
* (for the shadow blocks created for each block).
|
||||
* I started with the `commands` array in Specs.as, and discarded irrelevant
|
||||
* properties. By hand, I matched the opcode name to the 3.0 opcode.
|
||||
|
|
|
@ -1115,7 +1115,7 @@ const deserializeMonitor = function (monitorData, runtime, targets, extensions)
|
|||
// This will be undefined for extension blocks
|
||||
const monitorBlockInfo = runtime.monitorBlockInfo[monitorData.opcode];
|
||||
|
||||
// Due to a bug (see https://github.com/LLK/scratch-vm/pull/2322), renamed list monitors may have been serialized
|
||||
// Due to a bug (see https://github.com/scratchfoundation/scratch-vm/pull/2322), renamed list monitors may have been serialized
|
||||
// with an outdated/incorrect LIST parameter. Fix it up to use the current name of the actual corresponding list.
|
||||
if (monitorData.opcode === 'data_listcontents') {
|
||||
const listTarget = monitorData.targetId ?
|
||||
|
|
|
@ -8,7 +8,7 @@ test('getPrimitives', t => {
|
|||
t.end();
|
||||
});
|
||||
|
||||
// Originally inspired by https://github.com/LLK/scratch-gui/issues/809
|
||||
// Originally inspired by https://github.com/scratchfoundation/scratch-gui/issues/809
|
||||
test('calling a custom block with no definition does not throw', t => {
|
||||
const args = {
|
||||
mutation: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue