Path3D

Represents a 3D path made up of multiple 3D points

Hierarchy

  • Path3D

Index

Constructors

constructor

Find examples in Playground
  • new Path3D(path, normal, raw) Creates a Path3D. A Path3D is a logical math object, so not a mesh. please read the description in the tutorial : https://doc.babylonjs.com/how_to/how_to_use_path3d

    Parameters

    • path: Vector3[]

      an array of Vector3, the curve axis of the Path3D

    • Optional firstNormal: Nullable<Vector3>
    • Optional raw: boolean

      (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.

    Returns Path3D

Properties

path

Find examples in Playground
path: Vector3[]

an array of Vector3, the curve axis of the Path3D

Methods

getBinormals

Find examples in Playground
  • Returns an array populated with binormal vectors on each Path3D curve point.

    Returns Vector3[]

    an array populated with binormal vectors on each Path3D curve point.

getCurve

Find examples in Playground
  • Returns the Path3D array of successive Vector3 designing its curve.

    Returns Vector3[]

    the Path3D array of successive Vector3 designing its curve.

getDistances

Find examples in Playground
  • getDistances(): number[]
  • Returns an array populated with distances (float) of the i-th point from the first curve point.

    Returns number[]

    an array populated with distances (float) of the i-th point from the first curve point.

getNormals

Find examples in Playground
  • Returns an array populated with normal vectors on each Path3D curve point.

    Returns Vector3[]

    an array populated with normal vectors on each Path3D curve point.

getTangents

Find examples in Playground
  • Returns an array populated with tangent vectors on each Path3D curve point.

    Returns Vector3[]

    an array populated with tangent vectors on each Path3D curve point.

update

Find examples in Playground
  • Forces the Path3D tangent, normal, binormal and distance recomputation.

    Parameters

    • path: Vector3[]

      path which all values are copied into the curves points

    • Optional firstNormal: Nullable<Vector3>

      which should be projected onto the curve

    Returns Path3D

    the same object updated.

Generated using TypeDoc