import type { Frame, IRamp, IReadonlyRamp, RampBounds, RampDomain, RampOpts } from "./api.js"; export type GroupImpl> = { [P in keyof T]: IRamp; }; /** * Creates a new nested ramp from given object of otherwise independent child * ramps (which can be groups themselves). * * @remarks * Similar to {@link nested}, but different in that groups are merely views of * independent timelines, each with their own set of keyframes, interpolation * logic, time domain functions. * * Groups can have their own time domain function (given via `opts`, default: * {@link unconstrained}), which will be applied _prior_ to evaluating any child ramps. * * @example * ```ts tangle:../export/group.ts * import { group, hermite, linear } from "@thi.ng/ramp"; * * const example = group({ * // named, independent child ramps/timelines * a: linear([[0.1, 0], [0.5, -10]]), * b: hermite([[0, 100], [1, 200]]), * }); * * console.log(example.at(0.2)); * // { a: -2.5, b: 110.4 } * * // set new keyframe for `b` ramp * // (in TS need to cast to proper type first) * (>example.children.b).setStopAt(0.5, 200); * * console.log(example.at(0.2)); * // { a: -2.5, b: 135.2 } * ``` * * @param children * @param opts */ export declare const group: >(children: GroupImpl, opts?: Partial) => Group; export declare class Group> implements IReadonlyRamp { children: GroupImpl; domain: RampDomain; protected childEntries: [keyof T, IReadonlyRamp][]; constructor(children: GroupImpl, opts?: Partial); at(t: number): T; samples(n?: number, start?: number, end?: number): Iterable>; bounds(): RampBounds; timeBounds(): [number, number]; } //# sourceMappingURL=group.d.ts.map