Sprite2D

View source

Extends Object2D

A textured 2D sprite rendered from a generated unit quad.

Constructor


Properties


atlasIndex : number

View source

The index of the selected texture atlas.

Default: 0

sliceIndex : number

View source

The index of the selected slice in the current atlas layout. An invalid index selects the complete texture.

Default: 0

size : Vector2 | undefined

View source

Optional size override in image-space units. When undefined, the sprite uses the dimensions of its selected image cutout.

tint : Color

View source

Color multiplied with the sampled image.

Default: ...

Methods