diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js index 0f189206a..479647c3f 100644 --- a/src/sprites/sprite.js +++ b/src/sprites/sprite.js @@ -54,4 +54,18 @@ Sprite.prototype.createClone = function () { 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;