Class CurvePath2

Hierarchy

  • CurvePath2

Constructors

Properties

Methods

Constructors

  • Constructor for the CurvePath2 class.

    Parameters

    • alpha: number = 0.5

      The alpha parameter for the curve calculation (default 0.5)

    • tension: number = 0

      The tension parameter for the curve calculation (default 0)

    Returns CurvePath2

Properties

alpha: number
controlPoints: Vector2[]
tension: number

Methods

  • Computes a point on the curve at a given segment and t value.

    Returns

    The point on the curve at the specified segment and t value

    Parameters

    • segment: number

      The index of the control point of the segment

    • t: number

      The parameter t in the range [0,1]

    Returns null | Vector2

Generated using TypeDoc