@motion-script/core / PathSampler
Interface: PathSampler
Defined in: attributes/shape/path/sampler.ts:39
Properties
length
readonlylength:number
Defined in: attributes/shape/path/sampler.ts:41
Total arc length across all subpaths.
Methods
frameAt()
frameAt(
d):PathFrame|null
Defined in: attributes/shape/path/sampler.ts:48
Point and unit tangent at arc-length distance d from the path start.
d is clamped to [0, length]. Returns null only for a degenerate
(zero-length) path. Keeps an internal cursor so repeated calls with
non-decreasing d are amortized O(1).
Parameters
d
number
Returns
PathFrame | null