chainDistanceToFragment Method

Return the PathFragment object at the given distance along the chain.

chainDistanceToFragment(distance: number, allowExtrapolation: boolean = false): PathFragment | undefined

Parameter Type Description
distance number distance along the chain.
allowExtrapolation boolean if true, returns first fragment for negative distances and returns last fragment
for distances larger than curve length. If false returns undefined for those out of bound distances.

Returns - PathFragment | undefined

Defined in

Last Updated: 29 April, 2026