Provider for animated texture resource.

Can be accessed from Texture.Control on an animated texture.

// 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);

Hierarchy (View Summary, Expand)

Constructors

Properties

duration: number

Length of the animation in seconds.

isAutoplay: boolean

Returns whether the animation was set to automatically play and loop.

isPingPong: boolean

If enabled, the animation will alternate between normal and reverse each time it loops.

isReversed: boolean

Whether the animation plays in reverse.

Methods

  • Returns the texture's aspect ratio, which is calculated as width / height.

    Returns number

  • Returns the index of the frame that is currently playing.

    Returns number

  • Returns how long the animation is in seconds.

    Returns number

  • Returns the number of frames in the animation.

    Returns number

  • Returns the width of the texture in pixels.

    Returns number

  • Returns whether the animation is finished playing.

    Returns boolean

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns whether the animation is currently paused.

    Returns boolean

  • Returns whether the animation is currently playing.

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Pauses the animation.

    Returns void

  • Pauses the animation at frame frameIndex.

    Parameters

    • frameIndex: number

    Returns void

  • Plays the animation loops times, starting with an offset of offset seconds.

    Parameters

    • loops: number
    • offset: number

    Returns void

  • Start playing the animation from frame frameIndex, loops times.

    Parameters

    • frameIndex: number
    • loops: number

    Returns void

  • Resumes a paused animation from the frame that was last played.

    Returns void

  • Stops the animation.

    Returns void

MMNEPVFCICPMFPCPTTAAATR