Class ConditionalCue

The ConditionalCue defines some action which should be performed once some condition has been met.

Hierarchy

  • CueBase

    Hierarchy

    • ConditionalCue

Constructors

  • Parameters

    • condition: (() => boolean)

      The condition which must be satisfied before performing some action.

        • (): boolean
        • Returns boolean

    • action: (() => void)

      The action to perform once the cue has finished waiting.

        • (): void
        • Returns void

    Returns ConditionalCue

Accessors

  • get action(): (() => void)
  • The action to perform once the cue has finished waiting.

    Returns (() => void)

      • (): void
      • The action to perform once the cue has finished waiting.

        Returns void

  • get condition(): (() => boolean)
  • The condition which must be satisfied before performing some action.

    Returns (() => boolean)

      • (): boolean
      • The condition which must be satisfied before performing some action.

        Returns boolean

  • get finished(): ClockChildFinishedEvent
  • This event fires when the Cue finishes. This is included because it's part of the IClockChild definition. In practice, there's no reason to use it though, since the whole point of a Cue object is that it's already lining up some action to be performed once it finishes.

    Returns ClockChildFinishedEvent

  • get isFinished(): boolean
  • Signifies whether the Cue has stopped.

    Returns boolean

  • get ref(): string
  • Provides a way of identifying cues so they can be easily retrieved later.

    Returns string

  • set ref(value: string): void
  • Parameters

    • value: string

    Returns void

  • get typeName(): string
  • Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.

    Returns string

Methods

  • Calling this tells the Cue to stop whatever it's doing and that it will no longer be used.

    Returns void

  • This method is intended to be called by a clock to provide regular updates. It should not be called by consumers of the library.

    Parameters

    • deltaMs: number

      How many milliseconds have passed since the last update cycle.

    Returns void

  • Provides a way for setting the ref through a chained function call. For example:

    clock.addChild(Cue.afterMs(100, console.log('Hello!')).withRef('cue'));
    

    Returns

    The calling object.

    Parameters

    • ref: string

      The ref to set on the object.

    Returns IClockChild

Generated using TypeDoc