# Two.ImageSequence

Extends: Two.Rectangle

A convenient package to display still or animated images organized as a series of still images.

# Constructor

Argument Description
paths A list of URLs or Two.Textures.
ox The initial x position of the Two.ImageSequence.
oy The initial y position of the Two.ImageSequence.
frameRate The frame rate at which the images should playback at.

# Properties

A list of properties that are on every Two.ImageSequence.

# DefaultFrameRate

default frame rate that Two.ImageSequence.frameRate is set to when instantiated.

# textures

A list of textures to be used as frames for animating the Two.ImageSequence.

# frameRate

The number of frames to animate against per second.

# index

The index of the current tile of the sprite to display. Defaults to 0.

# play

Argument Description
firstFrame The index of the frame to start the animation with.
lastFrame The index of the frame to end the animation with. Defaults to the last item in the Two.ImageSequence.textures.
onLastFrame Optional callback function to be triggered after playing the last frame. This fires multiple times when the image sequence is looped.

Initiate animation playback of a Two.ImageSequence.

# stop

Halt animation playback of a Two.ImageSequence and set the current frame back to the first frame.

# clone

Returns: Two.ImageSequence

Argument Description
parent The parent group or scene to add the clone to.

Create a new instance of Two.ImageSequence with the same properties of the current image sequence.

# toObject

Returns: Object

Return a JSON compatible plain object that represents the path.