Adds a new trigger.
The identifier of this trigger. Multiple of the same identifier can be used to fire the same trigger multiple times in an animation.
The time position in seconds of this trigger. Trigger will be fired when the animation reaches this time position.
Creates a copy of this TriggerRecorder and returns it.
Adds the triggers from the given TriggerRecorder to this
Named "combine" as order does not matter
Optional
shiftInterval: numberShifts the time position of all the triggers in this recorder by the given interval
Useful if you are appending the keyframes from one KeyframeRecorder to another to keep the trigger's positions relative.
Example:
local keyframeRecorder
local triggerRecorder
local otherKeyframeRecorder
local otherTriggerRecorder
-- make sure to shift position before you append the other keyframeRecorder
-- getLength will change (unless you want to subtract from the new one)
otherTriggerRecorder:shift(keyframeRecorder:getLength())
keyframeRecorder:append(otherKeyframeRecorder)
triggerRecorder:combine(otherTriggerRecorder)
Note: Could also add this to combine in the future
Generated using TypeDoc
Records and holds trigger data for an animation.
Triggers are used to fire events when the animation gets to that point.