Class ThinSprite
Hierarchy
- ThinSprite
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a new Thin Sprite
Returns ThinSprite
Properties
angleSearch playground for angle
Gets or sets rotation angle
cell IndexSearch playground for cellIndex
Gets or sets the cell index in the sprite sheet
cell RefSearch playground for cellRef
Gets or sets the cell reference in the sprite sheet, uses sprite's filename when added to sprite sheet
colorSearch playground for color
Gets or sets the main color
heightSearch playground for height
Gets or sets the height
invertUSearch playground for invertU
Gets or sets a boolean indicating if UV coordinates should be inverted in U axis
invertVSearch playground for invertV
Gets or sets a boolean indicating if UV coordinates should be inverted in B axis
is VisibleSearch playground for isVisible
Gets or sets a boolean indicating if the sprite is visible (renderable). Default is true
positionSearch playground for position
Gets or sets the current world position
widthSearch playground for width
Gets or sets the width
Accessors
animation Started
-
Returns a boolean indicating if the animation is started
Returns boolean
delay
-
Gets or sets the delay between cell changes (setting it will restart the animation)
Returns number
from Index
-
Gets the initial key for the animation (setting it will restart the animation)
Returns number
loop Animation
-
Gets or sets a boolean indicating if the animation is looping (setting it will restart the animation)
Returns boolean
to Index
-
Gets or sets the end key for the animation (setting it will restart the animation)
Returns number
Methods
play AnimationSearch playground for playAnimation
-
Starts an animation
Parameters
-
from: number
defines the initial key
-
to: number
defines the end key
-
loop: boolean
defines if the animation must loop
-
delay: number
defines the start delay (in ms)
-
onAnimationEnd: Nullable<() => void>
defines a callback for when the animation ends
Returns void
-
stop AnimationSearch playground for stopAnimation
-
Stops current animation (if any)
Returns void
ThinSprite Class used to represent a thin sprite This is the base class for sprites but can also directly be used with ThinEngine
https://doc.babylonjs.com/babylon101/sprites