import type { Game } from './game.js'; import type { Tween } from './tween.js'; import type { EasingFunction, InterpolationFunction } from './callback.js'; /** The properties a tween drives, each holding either a single target or a list of waypoints. */ export type TweenValues = Record; export declare class TweenData { parent: Tween; game: Game; vStart: TweenValues; vStartCache: TweenValues; vEnd: TweenValues; vEndCache: TweenValues; duration: number; percent: number; value: number; repeatCounter: number; repeatDelay: number; repeatTotal: number; interpolate: boolean; yoyo: boolean; yoyoDelay: number; inReverse: boolean; delay: number; dt: number; startTime: number | null; easingFunction: (k: number) => number; interpolationFunction: InterpolationFunction; interpolationContext: unknown; isRunning: boolean; isFrom: boolean; yoyoCounter: number; /** * Creates a new TweenData instance. * @param {Tween} parent - The parent Tween instance. */ constructor(parent: Tween); /** * Sets the target properties to tween to. * @param {object} properties - The properties to tween to. * @param {number} duration - The duration of the tween in milliseconds. * @param {(number) => number} ease - The easing function to use. * @param {number} delay - The delay before starting the tween in milliseconds. * @param {number} repeat - The number of times to repeat the tween (0 = no repeat, -1 = infinite). * @param {boolean} yoyo - Whether to reverse the tween on each repeat. * @returns {TweenData} This TweenData object for chaining. */ to(properties: TweenValues, duration: number, ease: EasingFunction, delay: number, repeat: number, yoyo: boolean): this; /** * Sets the target properties to tween from (in reverse). * @param {object} properties - The properties to tween from. * @param {number} duration - The duration of the tween in milliseconds. * @param {(number) => number} ease - The easing function to use. * @param {number} delay - The delay before starting the tween in milliseconds. * @param {number} repeat - The number of times to repeat the tween (0 = no repeat, -1 = infinite). * @param {boolean} yoyo - Whether to reverse the tween on each repeat. * @returns {TweenData} This TweenData object for chaining. */ from(properties: TweenValues, duration: number, ease: EasingFunction, delay: number, repeat: number, yoyo: boolean): this; /** * Starts the tween. * @returns {TweenData} This TweenData object for chaining. */ start(): this; /** * Loads the tween values from the parent object. * @returns {TweenData} This TweenData object for chaining. */ loadValues(): this; /** * Updates the tween at a given time. * @param {number} time - The current time in milliseconds. * @returns {number} The tween status (TWEEN_PENDING, TWEEN_RUNNING, or TWEEN_COMPLETE). */ update(time: number): 1 | 0 | 3 | 2; /** * Generates an array of tween data points for a given frame rate. * @param {number} frameRate - The frame rate to generate data for. * @returns {object[]} An array of tween data points. */ generateData(frameRate: number): Record[]; /** * Handles tween repetition logic. * @returns {number} The tween status (TWEEN_LOOPED or TWEEN_COMPLETE). */ repeat(): 3 | 2; } //# sourceMappingURL=tween_data.d.ts.map