Curve3

A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space. A Curve3 is designed from a series of successive Vector3.

see

https://doc.babylonjs.com/how_to/how_to_use_curve3

Hierarchy

  • Curve3

Index

Constructors

constructor

Find examples in Playground

Methods

continue

Find examples in Playground
  • Returns a new instance of Curve3 object : var curve = curveA.continue(curveB); This new Curve3 is built by translating and sticking the curveB at the end of the curveA. curveA and curveB keep unchanged.

    Parameters

    • curve: Curve3

      the curve to continue from this curve

    Returns Curve3

    the newly constructed curve

getPoints

Find examples in Playground
  • Returns Vector3[]

    the Curve3 stored array of successive Vector3

length

Find examples in Playground
  • length(): number
  • Returns number

    the computed length (float) of the curve.

Static CreateCatmullRomSpline

Find examples in Playground
  • CreateCatmullRomSpline(points: Vector3[], nbPoints: number, closed?: boolean): Curve3
  • Returns a Curve3 object along a CatmullRom Spline curve :

    Parameters

    • points: Vector3[]

      (array of Vector3) the points the spline must pass through. At least, four points required

    • nbPoints: number

      (integer) the wanted number of points between each curve control points

    • Optional closed: boolean

      (boolean) optional with default false, when true forms a closed loop from the points

    Returns Curve3

    the created Curve3

Static CreateCubicBezier

Find examples in Playground

Static CreateHermiteSpline

Find examples in Playground

Static CreateQuadraticBezier

Find examples in Playground

Generated using TypeDoc