Class: GUIAtlasTexture
Atlas data
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new GUIAtlasTexture(size
): GUIAtlasTexture
Parameters
Name | Type |
---|---|
size | Object |
size.x | number |
size.y | number |
Returns
Defined in
src/components/gui/core/GUIAtlasTexture.ts:19
Properties
textureSize
• Readonly
textureSize: Vector2
Defined in
src/components/gui/core/GUIAtlasTexture.ts:15
name
• name: string
Defined in
src/components/gui/core/GUIAtlasTexture.ts:16
Accessors
spriteList
• get
spriteList(): GUISprite
[]
Returns all sprite list
Returns
list of GUISprite
Defined in
src/components/gui/core/GUIAtlasTexture.ts:50
Methods
setTexture
▸ setTexture(srcTexture
, id
, detail
): GUISprite
create a sprite
Parameters
Name | Type | Description |
---|---|---|
srcTexture | GUITexture | Usually it's an atlas diagram |
id | string | key of sprite |
detail | any | description of sprite |
Returns
GUISprite
Defined in
src/components/gui/core/GUIAtlasTexture.ts:30
getSprite
▸ getSprite(id
): GUISprite
get a sprite by key/id/name
Parameters
Name | Type | Description |
---|---|---|
id | string | key of sprite |
Returns
GUISprite