mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
Write costumes and sounds to JSON on save
This commit is contained in:
parent
e16f2924a3
commit
0dc1883e9f
2 changed files with 4 additions and 2 deletions
|
@ -67,7 +67,7 @@ var parseScratchObject = function (object, runtime, topLevel) {
|
|||
// Costumes from JSON.
|
||||
if (object.hasOwnProperty('costumes') || object.hasOwnProperty('costume')) {
|
||||
for (var i = 0; i < object.costumeCount; i++) {
|
||||
var costume = object.costume; // [i]?
|
||||
var costume = object.costumes[i];
|
||||
// @todo: Make sure all the relevant metadata is being pulled out.
|
||||
sprite.costumes.push({
|
||||
skin: costume.skin,
|
||||
|
|
|
@ -723,7 +723,9 @@ RenderedTarget.prototype.toJSON = function () {
|
|||
rotationStyle: this.rotationStyle,
|
||||
blocks: this.blocks._blocks,
|
||||
variables: this.variables,
|
||||
lists: this.lists
|
||||
lists: this.lists,
|
||||
costumes: this.getCostumes(),
|
||||
sounds: this.sprite.sounds
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue