Add renderer demo using scratch-render-webgl

This commit is contained in:
Tim Mickel 2016-06-29 20:56:55 -04:00
parent 809528abdc
commit 19da0b0032
11 changed files with 155 additions and 8 deletions
src/sprites

View file

@ -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;