Texture Config property type
This type of property allows to select a texture between all the textures defined in the an Asset Pack file. When the texture is selected, the property gets as value the configuration of the texture. For example, if the selected texture is an image with key background, the property is set to:
{ "key": "background" }
If the selected texture is the frame branch-01 of the atlas atlas-props, then the property is set to:
{ "key": "atlas-props", "frame": "branch-01" }
The scene compiler generates Texture Config properties like this:
class Dragon extends Phaser.GameObjects.Sprite {
constructor(..) {
...
}
/** @type {{key:string,frame?:string|number}} */
myTexture = {"key":"atlas-props","frame":"branch-01"};
}