Class SceneBuilder

Constructors

  • Creates a new SceneBuilder to help construct scenes with automatic timing.

    Parameters

    • totalDuration: number

      The total duration of the animation sequence in milliseconds.

    Returns SceneBuilder

Accessors

  • get totalScenesDuration(): number
  • Gets the total duration of all scenes added to the builder.

    Returns number

    The total duration in milliseconds.

Methods

  • Adds a scene to the builder with a specified name and duration.

    Parameters

    • name: string

      The name of the scene.

    • duration: number

      The duration of the scene in milliseconds.

    Returns SceneBuilder

    The SceneBuilder instance for chaining.

  • Adds a scene to the builder with a specified name and a duration that extends to the end of the total duration.

    Parameters

    • name: string

      The name of the scene.

    Returns SceneBuilder

    The SceneBuilder instance for chaining.

  • Gets the array of scenes with their timing configured.

    Returns Scene[]

    The array of Scene objects.