JME - Application Documentation
    Preparing search index...
    • Resamples a polyline so that consecutive output points are all exactly spacing apart. Works by walking along each input segment and emitting a new point each time the accumulated distance reaches spacing.

      This ensures vehicles that index into route points by step always advance a consistent physical distance per step, regardless of how the original points were distributed.

      Parameters

      • points: Vector3[]

        Input polyline as an array of THREE.Vector3.

      • spacing: number

        Desired distance between consecutive output points.

      Returns Vector3[]

      New array of THREE.Vector3 with uniform spacing.