From d6bcfae526edd339fe056318a813d1c29b2984cc Mon Sep 17 00:00:00 2001 From: DD Date: Fri, 23 Feb 2018 10:21:29 -0500 Subject: [PATCH] Remove costume ID --- src/sprites/sprite.js | 9 +-------- src/virtual-machine.js | 8 -------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js index d3e53b8db..4e9bd2894 100644 --- a/src/sprites/sprite.js +++ b/src/sprites/sprite.js @@ -32,8 +32,7 @@ class Sprite { * name: "Costume Name", * bitmapResolution: 2, * rotationCenterX: 0, - * rotationCenterY: 0, - * costumeId: 0 + * rotationCenterY: 0 * } * @type {Array.} */ @@ -47,10 +46,6 @@ class Sprite { * @type {Array.} */ this.clones = []; - /** - * A costume ID generator. Costumes within a sprite should each have a unique ID. - */ - this.nextCostumeId = 0; } /** @@ -85,8 +80,6 @@ class Sprite { } const usedNames = this.costumes_.map(costume => costume.name); costumeObject.name = StringUtil.unusedName(costumeObject.name, usedNames); - costumeObject.costumeId = this.nextCostumeId; - this.nextCostumeId++; this.costumes_.splice(index, 0, costumeObject); } diff --git a/src/virtual-machine.js b/src/virtual-machine.js index 9d4b21ea8..af190b9de 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -327,14 +327,6 @@ class VirtualMachine extends EventEmitter { }); } - duplicateCostume (costumeIndex) { - const currentCostume = this.editingTarget.getCostumes()[costumeIndex]; - const clone = Object.assign({}, currentCostume); - this.editingTarget.addCostumeAt(clone, costumeIndex + 1); - this.editingTarget.setCostume(costumeIndex + 1); - this.emitTargetsUpdate(); - } - /** * Rename a costume on the current editing target. * @param {int} costumeIndex - the index of the costume to be renamed.