fatina
Version:
Lighweight Tweening Library for web / games
142 lines (141 loc) • 2.66 kB
TypeScript
import { ISequence } from '../core/interfaces/ISequence';
import { ITween } from '../core/interfaces/ITween';
import { EasingType } from '../easing/easingType';
import { BaseTween } from './baseTween';
/**
* Tween: Used to animate values of an object
*
* @export
* @class Tween
* @extends {BaseTween}
* @implements {ITween}
*/
export declare class Tween extends BaseTween<Tween> implements ITween {
/**
* @private
*/
private obj;
/**
* @private
*/
private readonly prop;
/**
* @private
*/
private f;
/**
* @private
*/
private t;
/**
* @private
*/
private cf;
/**
* @private
*/
private ct;
/**
* @private
*/
private steps;
/**
* @private
*/
private relative;
/**
* @private
*/
private ease;
/**
* @private
*/
private p;
/**
* @private
*/
private v;
/**
* @private
*/
private remains;
constructor(object: any);
/**
* @inheritdoc
*/
init(object: any): void;
/**
* Method used on start to check the values of this tween
*
* @protected
*/
protected validate(): void;
/**
* Method used to calculate currentFrom/currentTo based on the config
*
* @protected
*/
protected check(): void;
/**
* @private
*/
private tick;
/**
* @inheritdoc
*/
from(from: any): ITween;
/**
* @inheritdoc
*/
to(to: any, duration: number): ITween;
/**
* @inheritdoc
*/
toSpeed(to: any, speed: number): ITween;
/**
* Compute the properties
*
* @private
*/
private updateProp;
/**
* @inheritdoc
*/
setRelative(relative: boolean): ITween;
/**
* @inheritdoc
*/
modify(diff: any, updateTo: boolean): void;
/**
* Overwrite the Reset (just for yoyo)
*
* @param {boolean} [skipParent]
*/
reset(skipParent?: boolean): void;
/**
* @inheritdoc
*/
reverse(): void;
/**
* @inheritdoc
*/
yoyo(time: number): ITween;
/**
* @inheritdoc
*/
setSteps(steps: number): ITween;
/**
* @inheritdoc
*/
toSequence(): ISequence;
/**
* @inheritdoc
*/
setEasing(type: EasingType | string): ITween;
/**
* Method used when the tween is reset (loop)
*
* @protected
*/
protected loopInit(): void;
}