.play()
A reference method that will play a singular animation or state machine. For an animation currently playing it is a no-op. Type:(animationName?: string, loop?: LoopMode, direction?: Direction, isStateMachine?: boolean) => void
animationName- Specifies which singular animation should be played. We highly recommend passing a value here- Default:
""
- Default:
loop- Specifies whichLoopModeshould be used for playing the animations.- Default:
LoopMode.Auto
- Default:
direction- Specifies whichDirectionshould be used for playing the animations.- Default:
Direction.Auto
- Default:
isStateMachine- Specifies whether the passed inanimationNameis a state machine or just a linear animation.- Default:
false
- Default:
.pause()
A reference method that will pause any playing animation/state machine. For the animations currently stopped/paused it is no-op. Type:() => void
Example:
.stop()
A reference method that will stop an animation/state machine. For the animations currently stopped/paused it is no-op. Type:() => void
Example:
.reset()
A reference method that will reset the whole artboard. It will playanimationName or the first animation (if animationName hasn’t been passed) immediately if autoplay hasn’t been set to false explicitly.
Type: () => void
.fireState()
A reference method that will firetrigger identified by the inputName on all active matching state machines.
Type: (stateMachineName: string, inputName: string) => void
stateMachineName- Specifies state machine name which will be matched against all active state machines.inputName- Specifies the name of thetriggerthat should be fired.
.setInputState()
A reference method that will setinput state identified by the inputName on all active matching state machines to the given value.
Type: (stateMachineName: string, inputName: string, value: boolean | number) => void
stateMachineName- Specifies state machine name which will be matched against all active state machines.inputName- Specifies name of theinputwhich state should be updated.value- Specifies a value that theinputstate should be set to.
.setTextRunValue()
A reference method that will set a text run value (viavalue) on a given text run (via textRunName).
Type: setTextRunValue: (textRunName: string, value: string) => void
textRunName- Name of the text run to set a new text value on. Read more on text runs here: Textvalue- Specifies a new text value that should be set on the text run