Class Repeat

The Repeat class contains static methods for slightly more nice and intuitive creation of repeats.

Hierarchy

  • Repeat

Constructors

Methods

Constructors

Methods

  • Creates a new instance of BeatRepeat.

    Returns

    Parameters

    • metronome: IMetronome

      The metronome used to count how many beats have passed.

    • beatCount: number

      How many beats the repetition should run for.

    • action: ((args: BeatRepeatArgs) => void)

      The action to perform for every update that the repeat is active.

    Returns BeatRepeat

  • Creates a new instance of MsRepeat.

    Returns

    Parameters

    • msCount: number

      How many milliseconds the repetition should run for.

    • action: ((args: FiniteRepeatArgs) => void)

      The action to perform for every update that the repeat is active.

    Returns MsRepeat

  • Creates a new instance of ConditionalRepeat.

    Returns

    Parameters

    • condition: (() => boolean)

      The condition which must be satisfied for the repeat to automatically finish.

        • (): boolean
        • Returns boolean

    • action: ((args: RepeatArgs) => void)

      The action to perform for every update that the repeat is active.

    Returns ConditionalRepeat

Generated using TypeDoc