Optionalcostume: CostumeLoads a sprite from a compressed .sprite2 or .sprite3 or JSON.
Handle a Blockly event for the current editing target.
Remove everything from the VM.
Delete all of the flyout blocks.
Allow VM consumer to configure the ScratchLink socket creator.
Deletes the costume at a given index int he editing target.
If a costume was deleted, returns a function to undo the deletion.
Deletes the sound at a given index in the editing target.
If a sound was deleted, returns a function to undo the deletion.
Deletes the target with the given ID and any of its clones.
If a sprite was deleted, returns a function to undo the deletion.
Optionalzip: JSZipLoad a project usings its ID from scratch.mit.edu.
Emit a targetsUpdate event about the current target information.
OptionalshouldTriggerProjectChange: booleanWhether a PROJECT_CHANGED event should be emitted. Defaults to true.
Emit a workspaceUpdate event.
Export a specific sprite to a compressed sprite3 file.
The ID of the target
Export a specific sprite to a compressed sprite3 file.
The ID of the target
Handle a Blockly event for the flyout.
Gets the string representation of a costume. For an SVG costume, returns the text. For a PNG or JPG costume, returns a data URL. If costume doesn't exist, returns null.
Get the current locale for the VM.
Get data for playground. Data comes back in an emitted playgroundData event.
Load a project.
Compressed sb, sb2, sb3 or sb2 project.json or sb3 project.json.
Handle a Blockly event for the flyout to be passed to the monitor container.
Post sprite info to the target that's being dragged, otherwise the editing target.
the project to a compressed sb3 file.
Changes whether the runtime is in "compatibility mode" (true by default) Compatibility mode sets the runtime's framerate to 30 FPS. Disabling it sets the framerate to 60 FPS.
Set the current locale and builtin messages for the VM. Resolves once all blocks have been updated for the new locale.
Changes whether the runtime is in turbo mode or not. Emits either TURBO_MODE_ON or TURBO_MODE_OFF.
whether turbo mode should be enabled
Updates the value of a variable. Returns true if the target and variable were successfully found and updated, otherwise null.
Share a costume from the editing target to another target.
Share a sound from the editing target to another target.
OptionaltargetId: stringUpdate a sound.
The index of the sound in the current sprite
The new audio data
OptionalencodedWAV: ArrayBufferThe data of an encoded WAV. If not provided, the new sound won't be saved if the project is exported.
Handle a Blockly event for the variable map.
The target that's currently being dragged, if any.