API Docs for: 1.0.0
Show:

Plugin.NodeFXSequence Class

Binds an AnimSequence instance to a Node instance. The API and namespace is the same as NodeFX, so you can plug NodeFXSequence into any node that just needs to run/pause/stop an animation.

Pass sequence in the configuration to set the initial animation sequence.

Constructor

Plugin.NodeFXSequence

(
  • config
)

Parameters:

  • config Object

    configuration

Methods

append

(
  • item
)
Append items to the sequence.

Parameters:

  • item Anim | Function | Array | Number multiple
    animation, function, list of animations and functions, or delay in milliseconds

pause

() chainable
Pauses the sequence. If the current item is a delay, the sequence will pause after the delay interval finishes.

prepend

(
  • item
)
Prepend items to the sequence.

Parameters:

  • item Anim | Function | Array | Number multiple
    animation, function, list of animations and functions, or delay in milliseconds

run

() chainable
Starts or resumes the sequence.

stop

(
  • finish
)
chainable
Stops and resets the sequence.

Parameters:

  • finish Boolean
    If true, the animation will move to the last frame.

Attributes

direction

String
The behavior of the animation when "iterations" > 1: If "normal", the animation will repeat in the same direction. If "alternate", the animation will flip "reverse" at the end of the sequence.

Default: "normal"

iterationCount

Number readonly
The number of times the animation has run. Resets to zero when the animation finishes or is stopped.

iterations

Number | String
The number of times the animation should run. Can be "infinite"

Default: 1

paused

Boolean readonly
Whether or not the animation is currently paused.

Default: false

reverse

Boolean
If true, the animation runs backwards. Immediate actions receive the value of reverse as the only argument.

Default: false

running

Boolean readonly
Whether or not the animation is currently running.

Default: false

Events

end

Fires after the sequence finishes.

item

Fires when an item in the sequence begins.

Event Payload:

  • index Int
    the item index

pause

Fires when the sequence is paused.

resume

Fires when the sequence resumes (after being paused).

start

Fires when the sequence begins.