Phaser API Documentation

  Version: 
fromJSON(data, [clearCurrentAnimations])

Description:

Loads this Animation Manager's Animations and settings from a JSON object.

Parameters:

name type arguments Default description
data string | Phaser.Types.Animations.JSONAnimations | Phaser.Types.Animations.JSONAnimation

The JSON object to parse.

clearCurrentAnimations boolean <optional> false

If set to true, the current animations will be removed (anims.clear()). If set to false (default), the animations in data will be added.

Returns:
Description:

An array containing all of the Animation objects that were created as a result of this call.

Since: 3.0.0