A Curve along which a 3D position can be animated.

  • A SplineCurve is defined by three or more control points.
  • You can sample a point and a tangent vector on a SplineCurve for any given value of t in the range [0..1].
  • When you set t on a SplineCurve, its point and tangent update accordingly.

Hierarchy (View Summary)

Constructors

Properties

__arcLengthDivisions?: number
_points: Vec3[] = []
_t: number = 0
cacheArcLengths?: number[]
needsUpdate?: boolean

Accessors

Methods

  • Returns cumulative sampled arc lengths for the curve.

    The returned array starts at 0 and ends at the total sampled length. Results are cached until invalidated.

    Parameters

    • Optionaldivisions: number

      Number of sampling divisions used to approximate arc length

    Returns number[]

    Cumulative arc lengths

  • Maps normalized arc-length parameter u to curve parameter t.

    This is useful when you want points spaced by distance along the curve instead of by raw parameter value.

    Parameters

    • u: number

      Normalized distance along the curve in the range [0..1]

    • Optionaldistance: number

      Absolute distance along the curve. When provided, overrides u.

    Returns number

    Curve parameter in the range [0..1]