mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-30 16:10:08 -04:00
Add renderer demo using scratch-render-webgl
This commit is contained in:
parent
809528abdc
commit
19da0b0032
11 changed files with 155 additions and 8 deletions
src/sprites
|
@ -9,9 +9,12 @@ function Sprite (blocks) {
|
|||
}
|
||||
this.blocks = blocks;
|
||||
this.clones = [];
|
||||
|
||||
// Initial single clone with the shared blocks.
|
||||
this.clones.push(new Clone(this.blocks));
|
||||
}
|
||||
|
||||
Sprite.prototype.createClone = function () {
|
||||
var newClone = new Clone(this.blocks);
|
||||
this.clones.push(newClone);
|
||||
return newClone;
|
||||
};
|
||||
|
||||
module.exports = Sprite;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue