Sprite
Description:
The Sprite class to render texture in game scene tree hierarchy.
Class Object: Sprite Class.
Inherits from: Node.
Sprite.TextureWrap
Type: Enumeration.
Description:
An enumeration for texture wrapping modes.
Signature:
enum TextureWrap
"None"
"Mirror"
"Clamp"
"Border"
end
Sprite.TextureFilter
Type: Enumeration.
Description:
An enumeration for texture filtering modes.
Signature:
enum TextureFilter
"None"
"Point"
"Anisotropic"
end
depthWrite
Type: Field.
Description:
Whether the depth buffer should be written to when rendering the sprite (default is false).
Signature:
depthWrite: boolean
alphaRef
Type: Field.
Description:
The alpha reference value for alpha testing. Pixels with alpha values less than or equal to this value will be discarded.
Only works with sprite.effect = SpriteEffect("builtin:vs_sprite", "builtin:fs_spritealphatest")
.
Signature:
alphaRef: number
textureRect
Type: Field.
Description:
The texture rectangle for the sprite.
Signature:
textureRect: Rect
blendFunc
Type: Field.
Description:
The blend function for the sprite.
Signature:
blendFunc: BlendFunc
effect
Type: Field.
Description:
The sprite shader effect.
Signature:
effect: SpriteEffect
texture
Type: Field.
Description:
The texture for the sprite.
Signature:
texture: Texture2D
uwrap
Type: Field.
Description:
The texture wrapping mode for the U (horizontal) axis.
Signature:
uwrap: TextureWrap
vwrap
Type: Field.
Description:
The texture wrapping mode for the V (vertical) axis.
Signature:
vwrap: TextureWrap
filter
Type: Field.
Description:
The texture filtering mode for the sprite.
Signature:
filter: TextureFilter