Phaser API Documentation

  Version: 
addAtlasJSONArray(key, source, data, [dataSource])

Description:

Adds a Texture Atlas to this Texture Manager. The frame data of the atlas must be stored in an Array within the JSON. This is known as a JSON Array in software such as Texture Packer.

Parameters:

name type arguments description
key string

The unique string-based key of the Texture.

source HTMLImageElement | Array.<HTMLImageElement>

The source Image element/s.

data object | Array.<object>

The Texture Atlas data/s.

dataSource HTMLImageElement | HTMLCanvasElement | Array.<HTMLImageElement> | Array.<HTMLCanvasElement> <optional>

An optional data Image element.

Returns:
Description:

The Texture that was created, or null if the key is already in use.

Since: 3.0.0