Skip to content

Trigger

INFO

Inherits: CompoundCommand

A command group that will trigger when a specific condition is satisfied.

Example:

ts
const trigger = new Trigger({
  triggerType: 'Passing',
  startTime: 0,
  endTime: 1000,
})
trigger.commands.push(
  new Fade({
    startTime: 0,
    startValue: 1,
  }),
)

Constructor details

ts
new Trigger({
  triggerType,
  startTime,
  endTime,
  commands,
})
  • Parameters:
    • startTime (number | string | Timestamp) (Timestamp): The start time of the trigger group.
    • endTime (number | string | Timestamp) (Timestamp): The end time of the trigger group.
    • triggerType (TriggerType) (TriggerType): The condition to trigger this group.
    • commands (Command[] | undefined) (TriggerType): List of child commands that will be triggered. Defaults to undefined.

Properties

Properties inherited from Command:

startTime

Properties inherited from CompoundCommand:

commands

triggerType

The condition to trigger this group.

endTime

The end time of the trigger group.