API

Class 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.

Index
  • Returns a Curve3 object along an arc through three vector3 points: The three points should not be colinear. When they are the Curve3 is empty.

    Parameters

    • first: Vector3

      (Vector3) the first point the arc must pass through.

    • second: Vector3

      (Vector3) the second point the arc must pass through.

    • third: Vector3

      (Vector3) the third point the arc must pass through.

    • steps: number = 32

      (number) the larger the number of steps the more detailed the arc.

    • closed: boolean = false

      (boolean) optional with default false, when true forms the chord from the first and third point

    • fullCircle: boolean = false

      Circle (boolean) optional with default false, when true forms the complete circle through the three points

    Returns Curve3

    the created Curve3

  • Returns a Curve3 object along a CatmullRom Spline curve :

    Parameters

    • points: DeepImmutableArray<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

    • Optionalclosed: boolean

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

    Returns Curve3

    the created Curve3