InterpolationRegistry

How animatable value kinds blend between keyframes: one Interpolator per interpolation kind.

@internote/canvas-sdkClass
On this page
import { InterpolationRegistry } from '@internote/canvas-sdk';

Environments never own timelines; they declare an attribute's kind, so this registry is the whole extension point for new value shapes. Interpolators run on refined values, never on source text. A kind with nothing registered snaps at the midpoint, as discrete and colour do on purpose: palette names are not blendable, and a surface that wants visual blending resolves them to CSS with blendedColourCss.

  • new InterpolationRegistry() starts with the built-in kinds; new InterpolationRegistry(false) starts empty.
  • register(kind, interpolator) sets the interpolator for a kind, replacing any already registered.
  • resolve(kind) returns the interpolator for a kind, or the midpoint snap when none is registered.

A host passes a registry of its own through its options; an environment adds its kinds through its definition's interpolations instead, and the host registers them.

#Signature

typeof InterpolationRegistry

Declared in packages/canvas-sdk/src/animation/interpolation.ts:179.

Last updated