import { Base } from "./Base.js"; import type { ControlVar } from "./ControlVar.js"; import type { InterpolatedVarsOptions, Value } from "./types.js"; /** * Creates a list of interpolated values from a given list of {@link ControlVar}s. * * ```ts * * const v1 = new ControlVar(Units.num, 0) * const v2 = new ControlVar(Units.num, 100) * * const interpolated = new InterpolatedVars("spacing", Units.px, [v1, v2]) * // interpolates from 0-100 * * v1.set(50) // interpolated will now update to interpolate from 50-100 * ``` * * It can be passed multiple stops. * ```ts * const interpolated = new InterpolatedVars("spacing", Units.px, [v1, v2, v3]) * ``` * * ... or stops with positions (otherwise they are evenly spaced). * * ```ts * // positions should be in a 0-1 percentage range * const interpolated = new InterpolatedVars("spacing", Units.px, [[0, v1], [0.2, v2], [1, v3]]) * ``` * * * You can change interpolation control variables and any options using `set`: * * ```ts * interpolated.set("values", [vOther1, vOther2, vOther3]) * interpolated.set("options", {steps: 20}) * ``` */ export declare class InterpolatedVars = Record> extends Base { name: string; unit: (value: TUnit) => string; values: Value; ready: boolean; value: Record[]; interpolated: Record; options: InterpolatedVarsOptions>; constructor(name: string, unit: (value: TUnit) => string, values: Value, options?: Partial>>); setOpts(value: Partial>>): void; set(value: Value): void; protected notify(): void; protected recompute(): void; } //# sourceMappingURL=InterpolatedVars.d.ts.map