export default Tween; /** * @class Tween * Represents a transition between two values across a duration of time. * * Typically you will create a Tween between two values, with a callback function to handle the intermediate values, * and then start the Tween in a {@link Runner} which will start invoking the tween on each animation frame until * it reaches the end of its duration. * * @param callback {Function} a function that will be called with the current tween value at a given point in time. * @param fromValue {*} the beginning value * @param toValue {*} the ending value * @param duration {Number} the duration of the tween in milliseconds * @param [delay] {Number} optional time in milliseconds to wait before starting the tween * @param [easing] {Function|String} optional easing to be applied to the tween values. Can either be a function * that takes a value from 0 to 1 and returns a corresponding "eased" value, or a string that matches the * name of one of the common Penner easing functions - see http://easings.net/ Defaults to linear easing. * @param [iterations] {Number} optional number of times to repeat the tween animation. For endless repeating, * specify `Infinity`. * @param [direction] {String} direction to run the tween; one of 'forward', 'reverse', or 'alternate'. For * 'alternate', it will toggle between forward and reverse on each iteration. * @param [interpolate] {String|Function} how tweened values should be calculated between the fromValue and toValue. * Can be the string name for one of the built-in interpolators in Interpolators.js, or a custom function that * will be passed 3 arguments: `fromValue`, `toValue`, and `progress` from 0 to 1. */ declare class Tween extends AbstractTween { constructor(callback: any, fromValue: any, toValue: any, duration?: number, delay?: number, easing?: (v: any) => any, iterations?: number, direction?: string, interpolate?: string); callback: any; fromValue: any; toValue: any; duration: number; delay: number; easing: (v: any) => any; iterations: number; direction: string; interpolate: any; /** * @property totalElapsed * @type {number} * The total duration of this tween from 0 to its completion, taking into account its `duration`, `delay`, and * `iterations`. This is calculated once upon instantiation, and may be used to determine whether the tween is * finished or not at a given time. */ totalElapsed: number; } import AbstractTween from './AbstractTween.js';