mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-13 02:31:34 -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.
|
// Costumes from JSON.
|
||||||
if (object.hasOwnProperty('costumes') || object.hasOwnProperty('costume')) {
|
if (object.hasOwnProperty('costumes') || object.hasOwnProperty('costume')) {
|
||||||
for (var i = 0; i < object.costumeCount; i++) {
|
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.
|
// @todo: Make sure all the relevant metadata is being pulled out.
|
||||||
sprite.costumes.push({
|
sprite.costumes.push({
|
||||||
skin: costume.skin,
|
skin: costume.skin,
|
||||||
|
|
|
@ -723,7 +723,9 @@ RenderedTarget.prototype.toJSON = function () {
|
||||||
rotationStyle: this.rotationStyle,
|
rotationStyle: this.rotationStyle,
|
||||||
blocks: this.blocks._blocks,
|
blocks: this.blocks._blocks,
|
||||||
variables: this.variables,
|
variables: this.variables,
|
||||||
lists: this.lists
|
lists: this.lists,
|
||||||
|
costumes: this.getCostumes(),
|
||||||
|
sounds: this.sprite.sounds
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue