Phaser API Documentation

  Version: 
getFrames(textureManager, frames, [defaultTextureKey])

Description:

Creates AnimationFrame instances based on the given frame data.

Parameters:

name type arguments description
textureManager Phaser.Textures.TextureManager

A reference to the global Texture Manager.

frames string | Array.<Phaser.Types.Animations.AnimationFrame>

Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.

defaultTextureKey string <optional>

The key to use if no key is set in the frame configuration object.

Returns:
Description:

An array of newly created AnimationFrame instances.

Since: 3.0.0