mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-10 21:39:57 -04:00
Straw-man implementation of targets/sprites/clones
This commit is contained in:
parent
1a48e75341
commit
809528abdc
7 changed files with 99 additions and 45 deletions
src/engine
20
src/engine/target.js
Normal file
20
src/engine/target.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
var Blocks = require('./blocks');
|
||||
|
||||
/**
|
||||
* @fileoverview
|
||||
* A Target is an abstract "code-running" object for the Scratch VM.
|
||||
* Examples include sprites/clones or potentially physical-world devices.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
|
||||
* @constructor
|
||||
*/
|
||||
function Target (blocks) {
|
||||
if (!blocks) {
|
||||
blocks = new Blocks(this);
|
||||
}
|
||||
this.blocks = blocks;
|
||||
}
|
||||
|
||||
module.exports = Target;
|
Loading…
Add table
Add a link
Reference in a new issue