Skip to content

Loop

INFO

Inherits: CompoundCommand

A command group that will repeat itself a fixed number of times.

Example:

ts
const loop = new Loop({
  startTime: 0,
  loopCount: 10,
})
loop.commands.push(
  new Fade({
    startTime: 0,
    startValue: 1,
  }),
)

Constructor details

ts
new Loop({ startTime, loopCount, command })
  • Parameters:
    • startTime (number | string | Timestamp) (Timestamp): The start time of the loop group.
    • triggerType (TriggerType) (TriggerType): The condition to trigger this group.
    • commands (Command[] | undefined) (TriggerType): List of child commands that will repeat. Defaults to undefined.

Properties

Properties inherited from Command:

startTime

Properties inherited from CompoundCommand:

commands

loopCount

The number of times to loop.

  • Type: number