UNPKG

@launchmenu/core

Version:

An environment for visual keyboard controlled applets

46 lines 1.59 kB
import Bezier from "bezier-js"; /** * A simple bezier curve wrapper that can be used for transitions (x axis represents time) */ export declare class TransitionBezier { protected bezier: Bezier; protected start: number; protected duration: number; /** * Creates a new transition bezier curve with the given easing * @param data The transition data */ constructor({ bezier, start, duration, inEase, outEase, }: { /** A custom bezier to use */ bezier?: Bezier; /** The start time of the transition */ start?: number; /** The duration of the transition */ duration: number; /** The amount of easing into the transition (0-1) */ inEase?: number; /** The amount of easing out of the transition (0-1) */ outEase?: number; }); /** * Retrieves the value for the given time * @param time The time * @returns The value */ get(time: number): number; /** * Creates a new bezier that branches from this bezier with the same velocity * @param time The time to branch at * @param data The new bezier data * @returns The created bezier */ branch(time: number, data: { /** The start time of the transition */ start?: number; /** The duration of the transition */ duration: number; /** The amount of easing out of the transition (0-1) */ outEase?: number; }): TransitionBezier; } //# sourceMappingURL=TransitionBezier.d.ts.map