mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-01 08:59:51 -04:00
Add Export To Sprite
This commit is contained in:
parent
cac52020a4
commit
0f4e80cbfc
1 changed files with 14 additions and 0 deletions
|
@ -54,4 +54,18 @@ Sprite.prototype.createClone = function () {
|
||||||
return newClone;
|
return newClone;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Sprite.prototype.export = function () {
|
||||||
|
var result = new Object();
|
||||||
|
var notSaved = ["clones","runtime"];
|
||||||
|
for (x in this) {
|
||||||
|
if (typeof(this[x]) === "function") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (notSaved.indexOf(x) == -1) {
|
||||||
|
result[x] = this[x];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = Sprite;
|
module.exports = Sprite;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue