Phaser API Documentation

  Version: 
toJSON([key])

Description:

Returns the Animation data as JavaScript object based on the given key. Or, if not key is defined, it will return the data of all animations as array of objects.

Parameters:

name type arguments description
key string <optional>

The animation to get the JSONAnimation data from. If not provided, all animations are returned as an array.

Returns:
Description:

The resulting JSONAnimations formatted object.

Since: 3.0.0