summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-08-09 16:07:02 +0200
committerjmoenig <jens@moenig.org>2013-08-09 16:07:02 +0200
commit147674631c21a0762d2b21e56495b36409cfef33 (patch)
treee00d8b0d6e07f6f8b75cbca22b71c21168ca6421 /objects.js
parent91f52228f209d7d432ea1685ed62958d22fee83a (diff)
downloadsnap-byow-147674631c21a0762d2b21e56495b36409cfef33.tar.gz
snap-byow-147674631c21a0762d2b21e56495b36409cfef33.zip
Nested Sprite saving / loading
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/objects.js b/objects.js
index 74211be..4a5545f 100644
--- a/objects.js
+++ b/objects.js
@@ -1169,18 +1169,18 @@ SpriteMorph.prototype.init = function (globals) {
this.isClone = false; // indicate a "temporary" Scratch-style clone
this.cloneOriginName = '';
+ // sprite nesting properties
+ this.parts = []; // not serialized, only anchor (name)
+ this.anchor = null;
+ this.nestingScale = 1;
+ this.rotatesWithAnchor = true;
+
this.blocksCache = {}; // not to be serialized (!)
this.paletteCache = {}; // not to be serialized (!)
this.rotationOffset = new Point(); // not to be serialized (!)
this.idx = 0; // not to be serialized (!) - used for de-serialization
this.wasWarped = false; // not to be serialized, used for fast-tracking
- // sprite nesting properties
- this.parts = [];
- this.anchor = null;
- this.nestingScale = 1;
- this.rotatesWithAnchor = true;
-
SpriteMorph.uber.init.call(this);
this.isDraggable = true;
@@ -2126,7 +2126,7 @@ SpriteMorph.prototype.wearCostume = function (costume) {
this.startWarp();
}
if (x !== null) {
- this.silentGotoXY(x, y);
+ this.silentGotoXY(x, y, true); // just me
}
if (this.positionTalkBubble) { // the stage doesn't talk
this.positionTalkBubble();