From ed978e30623f5711b3e16e2229ea97036d005f5e Mon Sep 17 00:00:00 2001 From: morant Date: Tue, 7 Feb 2017 20:12:55 -0500 Subject: [PATCH] Read sprite costume names from JSON, and write currentCostume to JSON --- src/serialization/sb3.js | 2 +- src/sprites/rendered-target.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/serialization/sb3.js b/src/serialization/sb3.js index 6b370ac77..12d947b89 100644 --- a/src/serialization/sb3.js +++ b/src/serialization/sb3.js @@ -70,7 +70,7 @@ var parseScratchObject = function (object, runtime) { // @todo: Make sure all the relevant metadata is being pulled out. sprite.costumes.push({ skin: costume.skin, - name: costume.costumeName, + name: costume.name, bitmapResolution: costume.bitmapResolution, rotationCenterX: costume.rotationCenterX, rotationCenterY: costume.rotationCenterY diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 9d9efaf7c..18440e679 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -719,6 +719,7 @@ RenderedTarget.prototype.toJSON = function () { direction: this.direction, costume: this.getCurrentCostume(), costumeCount: this.getCostumes().length, + currentCostume: this.currentCostume, visible: this.visible, rotationStyle: this.rotationStyle, blocks: this.blocks._blocks,