Skip to content

Documentation / @ripl/core / InterpolatePointsOptions

Interface: InterpolatePointsOptions

Defined in: packages/core/src/interpolators/path.ts:83

Options controlling how interpolatePoints reconciles two point sets.

Properties

PropertyTypeDescriptionDefined in
resolveKeys?(setA, setB) => number[]Reconciles the two sets by identity: given the source (setA) and target (setB) point arrays, returns for each target point the index of the source point it continues from, or -1 for a point that has no predecessor (an "entering" point). When provided, the interpolator matches points by this correspondence instead of upsampling both sets to a common resolution with straight-line waypoints. That blind upsampling makes a curved renderer (monotoneX, catmullRom, …) drawn through the densely collinear points look linear for the whole morph; matching by identity keeps the sparse real points, so the curve is preserved while a point is added or removed.packages/core/src/interpolators/path.ts:95