Struct Sprite3D
2D sprite node in a 3D world.
struct Sprite3D
;
A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
Properties
Name | Type | Description |
---|---|---|
frame [get, set]
|
long | Current frame to display from sprite sheet. vframes or hframes must be greater than 1.
|
frameCoords [get, set]
|
Vector2 | Coordinates of the frame to display from sprite sheet. This is as an alias for the frame property. vframes or hframes must be greater than 1.
|
hframes [get, set]
|
long | The number of columns in the sprite sheet. |
regionEnabled [get, set]
|
bool | If true , texture will be cut from a larger atlas texture. See regionRect .
|
regionRect [get, set]
|
Rect2 | The region of the atlas texture to display. regionEnabled must be true .
|
texture [get, set]
|
Texture | Texture object to draw.
|
vframes [get, set]
|
long | The number of rows in the sprite sheet. |
Methods
Name | Description |
---|---|
getFrame
|
|
getFrameCoords
|
|
getHframes
|
|
getRegionRect
|
|
getTexture
|
|
getVframes
|
|
isRegion
|
|
setFrame
|
|
setFrameCoords
|
|
setHframes
|
|
setRegion
|
|
setRegionRect
|
|
setTexture
|
|
setVframes
|