Skip to main content

BezierCurve

BezierCurve that supports cubic Bezier curves.

Index

Constructors

constructor

Properties

readonlyquality

quality: number = 4

Accessors

publicarcLength

  • get arcLength(): number
  • Returns number

publiccontrolPoints

Methods

clone

getNormal

  • getNormal(time: number): Vector
  • Get the normal of the Bezier curve at a certain time


    Parameters

    • time: number

      Between 0-1

    Returns Vector

getPoint

  • getPoint(time: number): Vector
  • Get the point on the Bezier curve at a certain time


    Parameters

    • time: number

      Between 0-1

    Returns Vector

getTangent

  • getTangent(time: number): Vector
  • Get the tangent of the Bezier curve at a certain time


    Parameters

    • time: number

      Between 0-1

    Returns Vector

getUniformNormal

  • getUniformNormal(time: number): Vector
  • Get the normal of the Bezier curve where the distance is uniformly distributed over time


    Parameters

    • time: number

    Returns Vector

getUniformPoint

  • getUniformPoint(time: number): Vector
  • Points are spaced uniformly across the length of the curve over time


    Parameters

    • time: number

    Returns Vector

getUniformTangent

  • getUniformTangent(time: number): Vector
  • Get the tangent of the Bezier curve where the distance is uniformly distributed over time


    Parameters

    • time: number

    Returns Vector

setControlPoint

  • setControlPoint(index: 0 | 1 | 2 | 3, point: Vector): void
  • Parameters

    • index: 0 | 1 | 2 | 3
    • point: Vector

    Returns void