Adds a Unity Texture Atlas to this Texture Manager.
In Phaser terminology, a Texture Atlas is a combination of an atlas image and a data file, such as those exported by applications like Texture Packer or Unity.
The frame data of the atlas must be stored in a Unity YAML file.
As of Phaser 3.60 you can use this method to add a atlas data to an existing Phaser Texture.
name | type | arguments | description |
---|---|---|---|
key | string |
The unique string-based key of the Texture. |
|
source | HTMLImageElement |
The source Image element. |
|
data | object |
The Texture Atlas data. |
|
dataSource | HTMLImageElement | HTMLCanvasElement | Array.<HTMLImageElement> | Array.<HTMLCanvasElement> | <optional> |
An optional data Image element. |
The Texture that was created, or null
if the key is already in use.