export default SpringTween; /** * @class SpringTween * Represents a transition between two values based on spring physics. * * This is very similar to `Tween`, except that it does not have a fixed duration. Instead, it advances a simple * spring physics simulation on each call to `gotoElapsedTime`. Since it depends on being advanced in forward-time * order, it cannot be repeated or run in a reverse direction. It is also not usable as a member of a `MultiTween`. * * The `toValue` property can be modified at any time while the simulation is running, and the velocity will be * maintained; this makes spring tweens more useful than duration-based tweens for objects whose target values are * changed rapidly over time, e.g. drag-drop. * * Non-numeric interpolations are not yet supported. * * @param callback {Function} a function that will be called with the current tween value at a given point in time. * @param {number} fromValue - the beginning value * @param {number} toValue - the initial ending value; this can be modified later by setting the `toValue` property * @param {string|object} springConfig - the physical configuration of the spring physics simulation. Either an object * with `mass`, `tension`, and `friction` properties, or a string corresponding to one of the presets defined * in `SpringPresets.js`. Defaults to the "default" preset. * @param {number} springConfig.mass - the mass of the simulated object being moved * @param {number} springConfig.tension - the spring's tension constant accelerating the simulated object * @param {number} springConfig.friction - the friction force decelerating the simulated object * @param {number} [initialVelocity] - velocity of the object at the start of the simulation * @param {number} [delay] optional time in milliseconds to wait before starting the simulation */ declare class SpringTween extends AbstractTween { constructor(callback: any, fromValue: any, toValue: any, springConfig: any, initialVelocity?: number, delay?: number); isSpring: boolean; callback: any; currentValue: any; toValue: any; velocity: number; delay: number; mass: number; tension: number; friction: number; minAcceleration: number; $lastTime: number; $endTime: number; gotoElapsedTime(time: any): void; isDoneAtElapsedTime(time: any): boolean; } import AbstractTween from './AbstractTween.js';