Lens Studio v1.0.0+
Inherits from TextureProvider
Returns the index of the frame that is currently playing.
Returns how long the animation is in seconds.
Returns the number of frames in the animation.
Returns whether the animation is finished playing.
Returns whether the animation is currently paused.
Returns whether the animation is currently playing.
Pauses the animation.
pauseAtFrame(Number frameIndex) :
Pauses the animation at frame
play(Number loops, Number offset) :
Plays the animation
loops times, starting with an offset of
playFromFrame(Number frameIndex, Number loops) :
Start playing the animation from frame
Resumes a paused animation from the frame that was last played.
setOnFinish(function(AnimatedTextureFileProvider animatedTexture) eventCallback) :
Sets the callback function to be called whenever the animation stops playing.
Stops the animation.
Returns whether the animation was set to automatically play and loop.
If enabled, the animation will alternate between normal and reverse each time it loops.
Whether the animation plays in reverse.
The animation track used to control the frame animation.
Returns the texture’s aspect ratio, which is calculated as width / height.
Returns the height of the texture in pixels.
Returns the width of the texture in pixels.
Returns the name of this object’s type.
isOfType(String type) :
Returns true if the object matches or derives from the passed in type.
// Plays an animated sprite //@input Component.SpriteVisual spriteVisual var loops = 100; var offset = 0.0; var provider = script.spriteVisual.mainPass.baseTex.control; provider.play(loops, offset);
Still Looking for help?Visit Support