import { Vector3, Color3 } from 'babylonjs'; /** * Constructor for the tween * @param {number} startValue What value does the tween start at * @param {number} distance How far does the tween's value advance from the startValue? * @param {number} durationMS Amount of time in milliseconds the tween runs for * @param {Function} animate What easing function should be used from the easing library? * See EasingLibrary for a list of potential easing equations. * @param {string} loop Can be left blank, set to loop, or repeat. Loop repeats repeats the animation * in reverse every time. Repeat will run the original tween from the beginning * @returns {self} */ export declare class Tween { promise: Promise; promiseResolve: Function; name: string; startTime: number; timeStamp: number; durationMS: number; animationFunction: Function; updateFunction: Function; minimum: number; isCancelled: boolean; tweenType: 'move' | 'turn' | 'size' | 'color' | 'opacity' | 'misc'; /** * Has the tween expired yet? * @returns {boolean} True if the tween has expired */ expired: Function; constructor(name?: string); commonStart(timeStamp: number, seconds: number, animate: '1-Begin And End Normally' | '2-Begin Slow, End Fast' | '3-Begin Fast, End Slow' | '4-Begin And End Fast' | '5-Begin And End Slow', updateFunction: Function): Tween; /** * Rounds the passed number to two decimal places. Prevents large float * numbers from being multiplied * @param {number} num number you want to round * @returns {number} Rounded number */ round(num: number): number; /** * Retrieves the start time relative to the time passed from the previous start time * @returns {number} Start time of the tween relative to time passed */ getStartTime(): number; /** * Resets the tween and runs it relative to the current time * @returns {self} */ reset(): Tween; } export declare class NullTween extends Tween { constructor(name: string); doTween(): Tween; } /** a promise that resolves true when the update function returns true */ export declare class MiscTween extends Tween { constructor(name: string); start(updateFunction: Function): Tween; doTween(): Tween; } export declare class V3Tween extends Tween { startValue: Vector3; endValue: Vector3; moveValue: Vector3; lastDistance: Vector3; constructor(name: string); start(tweenType: 'move' | 'turn' | 'size' | 'color' | 'opacity' | 'misc', startValue: Vector3, endValue: Vector3, timeStamp: number, seconds: number, animate: '1-Begin And End Normally' | '2-Begin Slow, End Fast' | '3-Begin Fast, End Slow' | '4-Begin And End Fast' | '5-Begin And End Slow', updateFunction: Function): Tween; /** * Run the tween computation and update whatever it is supposed to * @param {number} dateNow is 'Date.now' from the caller (more accurate) * @returns {number} Current value of the tween */ doTween(): Tween; } export declare class ScalarTween extends Tween { startValue: number; endValue: number; moveValue: number; lastDistance: number; constructor(name: string); start(tweenType: 'move' | 'turn' | 'size' | 'color' | 'opacity' | 'misc', startValue: number, endValue: number, timeStamp: number, seconds: number, animate: '1-Begin And End Normally' | '2-Begin Slow, End Fast' | '3-Begin Fast, End Slow' | '4-Begin And End Fast' | '5-Begin And End Slow', updateFunction: Function): Tween; /** * Run the tween computation and update whatever it is supposed to * @param {number} dateNow is 'Date.now' from the caller (more accurate) * @returns {number} Current value of the tween */ doTween(): Tween; } export declare class ColorTween extends Tween { startValue: Color3; distance: Color3; lastDistance: Color3; constructor(name: string); start(tweenType: 'move' | 'turn' | 'size' | 'color' | 'opacity' | 'misc', startValue: Color3, distance: Color3, timeStamp: number, seconds: number, animate: '1-Begin And End Normally' | '2-Begin Slow, End Fast' | '3-Begin Fast, End Slow' | '4-Begin And End Fast' | '5-Begin And End Slow', updateFunction: Function): Tween; /** Run the tween computation and update whatever it is supposed to */ doTween(): Tween; }