Options
All
  • Public
  • Public/Protected
  • All
Menu

A manager for a control point.

Type Parameters

Hierarchy

Index

Constructors

Properties

defaultControlPoint: T

The default control point for this type.

Accessors

  • get points(): readonly T[]
  • The control points in this manager.

    Returns readonly T[]

Methods

  • add(controlPoint: T): boolean
  • Adds a new control point.

    Note that the provided control point may not be added if the correct state is already present at the control point's time.

    Additionally, any control point that exists in the same time will be removed.

    Parameters

    • controlPoint: T

      The control point to add.

    Returns boolean

    Whether the control point was added.

  • controlPointAt(time: number): T
  • Finds the control point that is active at a given time.

    Parameters

    • time: number

      The time.

    Returns T

    The active control point at the given time.

  • remove(controlPoint: T): boolean
  • Removes a control point.

    This method will remove the earliest control point in the array that is equal to the given control point.

    Parameters

    • controlPoint: T

      The control point to remove.

    Returns boolean

    Whether the control point was removed.

  • removeAt(index: number): T
  • Removes a control point at an index.

    Parameters

    • index: number

      The index of the control point to remove.

    Returns T

    The control point that was removed.

Generated using TypeDoc