import { Motion, MotionConfig, SetMotion } from './Actions.js'; import { RunningTween } from './RunningTween.js'; /** * A Tween represents a series of actions that can be applied to a target object to create animations or sequences of events. * @template T - The type of the target object. */ export declare class Tween { /** The object to apply the tween to. */ target: T; /** Tags used for filtering and management. */ tags: string[]; /** Unique identifier. If specified, the old tween with the same id will be stopped. */ id: string; /** * @param target - The object to apply the tween to. */ constructor(target: T); /** * Set a unique identifier for the Tween. If specified, stops the old tween with the same id. * @param id The identifier to assign to the Tween. * @returns The updated Tween instance. */ setId(id: string): this; /** * Set tags for the Tween, which can be used for filtering and management. * @param tags - Tags to associate with the Tween. * @returns The updated Tween instance. */ setTags(...tags: string[]): this; /** * Set the target object for the Tween. * @param target - The object to apply the tween to. * @returns The updated Tween instance. */ setTarget(target: T): this; /** * Define a motion from the current state to a new state over a specified time. * @param time - The duration of the motion in milliseconds. * @param action - The motion configuration. * @param config - Additional motion configuration options. * @returns The updated Tween instance. */ to(time: number, action: Motion, config?: MotionConfig): this; /** * Define a relative motion from the current state. * @param time - The duration of the motion in milliseconds. * @param action - The motion configuration. * @param config - Additional motion configuration options. * @returns The updated Tween instance. */ by(time: number, action: Motion, config?: MotionConfig): this; /** * Define a movement from the current state to a new state instantaneously. * @param action - The motion configuration. * @returns The updated Tween instance. */ set(action: SetMotion): this; /** * Add a callback action to the Tween. * @param callback - The callback function to execute. * @returns The updated Tween instance. */ call(callback: () => void): this; /** * Add a delay before executing the next action. * @param time - The duration of the delay in milliseconds. * @returns The updated Tween instance. */ delay(time: number): this; /** * Repeat the last action for a specific number of times. * @param times - The number of times to repeat the action. * @returns The updated Tween instance. */ repeat(times?: number): this; /** * Repeat the last action indefinitely. * @returns The updated Tween instance. */ repeatForever(): this; /** * Apply a yoyo effect to the last action, making it reverse its motion, for a specific number of times. * @param times - The number of times to yoyo the last action. * @returns The updated Tween instance. */ yoyo(times?: number): this; /** * Apply a yoyo effect to the last action, making it reverse its motion, indefinitely. * @returns The updated Tween instance. */ yoyoForever(): this; /** * Chain another Tween to execute after this Tween. * @param tween - The Tween to chain. * @returns The updated Tween instance. */ then(tween: Tween): this; /** * Run multiple Tweens in parallel. * @param tweens - The Tweens to run in parallel. * @returns The updated Tween instance. */ parallel(...tweens: Tween[]): this; /** * Run multiple Tweens in sequence. * @param tweens - The Tweens to run in sequence. * @returns The updated Tween instance. */ sequence(...tweens: Tween[]): this; /** * Chain actions from another Tween to this Tween. * @param tween - The Tween containing actions to chain. * @returns The updated Tween instance. */ chain(tween: Tween): this; /** * Clone the Tween instance. * @returns A new Tween instance with the same configuration. */ clone(): Tween; /** * Start the Tween and create a RunningTween instance. * @returns A RunningTween instance that controls the execution of the Tween. */ start(): RunningTween; } //# sourceMappingURL=Tween.d.ts.map