Skip to content

Commit bea6d21

Browse files
committed
SpriteSheet animations loop by default.
Signed-off-by: Grant Skinner <info@gskinner.com>
1 parent 369aa54 commit bea6d21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/easeljs/display/SpriteSheet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ var p = SpriteSheet.prototype;
261261
anim.next = obj.next;
262262
a = anim.frames = obj.frames.slice(0);
263263
}
264-
anim.next = (a.length < 2 || anim.next == false) ? null : (anim.next == true) ? name : anim.next;
264+
anim.next = (a.length < 2 || anim.next == false) ? null : (anim.next == null || anim.next == true) ? name : anim.next;
265265
if (!anim.frequency) { anim.frequency = 1; }
266266
this._animations.push(name);
267267
this._data[name] = anim;
@@ -388,4 +388,4 @@ var p = SpriteSheet.prototype;
388388
}
389389

390390
window.SpriteSheet = SpriteSheet;
391-
}(window));
391+
}(window));

0 commit comments

Comments
 (0)