threejs-worldgen
    Preparing search index...

    A polyline with arc-length lookup: rails, flight paths, shipping lanes, roads without a graph. Closed paths loop; open paths are driven back and forth (vehicles turn round at the ends).

    Index
    • Builds a path through points; smooth > 1 runs a Catmull-Rom spline with that many samples per segment.

      Parameters

      • points: readonly (readonly number[])[]
      • closed: boolean = true
      • smooth: number = 8

      Returns Path

    closed: boolean

    Whether the path loops.

    distances: Float64Array

    Distance from the start to each vertex.

    length: number

    Total length, metres (closed paths include the closing segment).

    points: Float64Array

    xyz per vertex.