Skip to content

Commit 7157d57

Browse files
committed
Updated GetFrames
1 parent 679dd10 commit 7157d57

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

v3/src/animation/frame/Animation.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
var GetObjectValue = require('../../utils/object/GetObjectValue');
22
var GetFrames = require('./GetFrames');
33

4-
var Animation = function (manager, config)
4+
var Animation = function (manager, key, config)
55
{
66
this.manager = manager;
77

8+
this.key = key;
9+
810
// frames: [
911
// { key: textureKey, frame: textureFrame },
1012
// { key: textureKey, frame: textureFrame, duration: float },
@@ -21,7 +23,10 @@ var Animation = function (manager, config)
2123
// onRepeat: function
2224
// onComplete: function,
2325

24-
this.frames = GetFrames(this, GetObjectValue(config, 'frames', []));
26+
this.frames = [];
27+
28+
// Extract all the frame data into the frames array
29+
GetFrames(this, GetObjectValue(config, 'frames', []), this.frames);
2530

2631
this.framerate = GetObjectValue(config, 'framerate', 24);
2732

v3/src/animation/frame/GetFrames.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
var AnimationFrame = require('../AnimationFrame');
22
var GetObjectValue = require('../../utils/object/GetObjectValue');
33

4-
var GetFrames = function (animation, frames)
4+
var GetFrames = function (animation, frames, out)
55
{
6-
var out = [];
6+
if (out === undefined) { out = []; }
77

88
var textureManager = animation.manager.textureManager;
99

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: '9c151b40-194b-11e7-b6bd-adc4d80a51e2'
2+
build: '64e60870-194e-11e7-b411-f1e5026f0a49'
33
};
44
module.exports = CHECKSUM;

0 commit comments

Comments
 (0)