Skip to content

Commit 47834ad

Browse files
committed
Fixed issue in FrameData.getFrameIndexes where the input array was being ignored.
1 parent 91c07ea commit 47834ad

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ Phaser is everything we ever wanted from an HTML5 game framework. It will power
3535
Change Log
3636
----------
3737

38+
Version 1.0.5 (September 19th 2013)
39+
40+
* Fixed issue in FrameData.getFrameIndexes where the input array was being ignored.
41+
42+
3843
Version 1.0.4 (September 18th 2013)
3944

4045
* Small fix to Phaser.Canvas to stop it from setting overflow hidden if the parent DOM element doesn't exist.

src/Phaser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
var Phaser = Phaser || {
55

6-
VERSION: '1.0.4',
6+
VERSION: '1.0.5',
77
GAMES: [],
88
AUTO: 0,
99
CANVAS: 1,

src/animation/FrameData.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ Phaser.Animation.FrameData.prototype = {
188188
* @param {Array} [output] Optional array. If given the results will be appended to the end of this Array, otherwise a new array is created.
189189
* @return {Array} An array of all Frame indexes matching the given names or IDs.
190190
*/
191-
getFrameIndexes: function (input, useNumericIndex, output) {
191+
getFrameIndexes: function (frames, useNumericIndex, output) {
192192

193193
if (typeof useNumericIndex === "undefined") { useNumericIndex = true; }
194194
if (typeof output === "undefined") { output = []; }
195195

196196
if (typeof frames === "undefined" || frames.length == 0)
197197
{
198-
// No input array, so we loop through all frames
198+
// No frames array, so we loop through all frames
199199
for (var i = 0, len = this._frames.length; i < len; i++)
200200
{
201201
output.push(this._frames[i].index);
@@ -204,16 +204,16 @@ Phaser.Animation.FrameData.prototype = {
204204
else
205205
{
206206
// Input array given, loop through that instead
207-
for (var i = 0, len = input.length; i < len; i++)
207+
for (var i = 0, len = frames.length; i < len; i++)
208208
{
209-
// Does the input array contain names or indexes?
209+
// Does the frames array contain names or indexes?
210210
if (useNumericIndex)
211211
{
212-
output.push(input[i].index);
212+
output.push(frames[i].index);
213213
}
214214
else
215215
{
216-
output.push(this.getFrameByName(input[i]).index);
216+
output.push(this.getFrameByName(frames[i]).index);
217217
}
218218
}
219219
}

0 commit comments

Comments
 (0)