FrameData#getFrames()

getFrames(frames, useNumericIndex, output) → {Array}

Returns all of the Frames in this FrameData set where the frame index is found in the input array.
The frames are returned in the output array, or if none is provided in a new Array object.

Parameters
Name Type Argument Default Description
frames Array <optional>

An Array containing the indexes of the frames to retrieve. If the array is empty or undefined then all frames in the FrameData are returned.

useNumericIndex boolean <optional>
true

Are the given frames using numeric indexes (default) or strings? (false)

output Array <optional>

If given the results will be appended to the end of this array otherwise a new array will be created.

Returns
Array -

An array of all Frames in this FrameData set matching the given names or IDs.

Source code: animation/FrameData.js (Line 157)
doc_phaser
2017-02-14 10:48:05
Comments
Leave a Comment

Please login to continue.