Skip to content

Class: GUIAtlasTexture

Atlas data

Constructors

Properties

Accessors

Methods

Constructors

constructor

new GUIAtlasTexture(size): GUIAtlasTexture

Parameters

NameType
sizeObject
size.xnumber
size.ynumber

Returns

GUIAtlasTexture

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

GUISprite[]

list of GUISprite

Defined in

src/components/gui/core/GUIAtlasTexture.ts:50

Methods

setTexture

setTexture(srcTexture, id, detail): GUISprite

create a sprite

Parameters

NameTypeDescription
srcTextureGUITextureUsually it's an atlas diagram
idstringkey of sprite
detailanydescription of sprite

Returns

GUISprite

GUISprite

Defined in

src/components/gui/core/GUIAtlasTexture.ts:30


getSprite

getSprite(id): GUISprite

get a sprite by key/id/name

Parameters

NameTypeDescription
idstringkey of sprite

Returns

GUISprite

GUISprite

Defined in

src/components/gui/core/GUIAtlasTexture.ts:42

Released under the MIT License