konva
Version:
<p align="center"> <img src="https://raw.githubusercontent.com/konvajs/konvajs.github.io/master/apple-touch-icon-180x180.png" alt="Konva logo" height="180" /> </p>
226 lines (225 loc) • 5.16 kB
TypeScript
import { Animation } from './Animation';
import { Node } from './Node';
declare class TweenEngine {
prop: string;
propFunc: Function;
begin: number;
_pos: number;
duration: number;
prevPos: number;
yoyo: boolean;
_time: number;
_position: number;
_startTime: number;
_finish: number;
func: Function;
_change: number;
state: number;
onPlay: Function;
onReverse: Function;
onPause: Function;
onReset: Function;
onFinish: Function;
constructor(prop: any, propFunc: any, func: any, begin: any, finish: any, duration: any, yoyo: any);
fire(str: any): void;
setTime(t: any): void;
getTime(): number;
setPosition(p: any): void;
getPosition(t: any): any;
play(): void;
reverse(): void;
seek(t: any): void;
reset(): void;
finish(): void;
update(): void;
onEnterFrame(): void;
pause(): void;
getTimer(): number;
}
/**
* Tween constructor. Tweens enable you to animate a node between the current state and a new state.
* You can play, pause, reverse, seek, reset, and finish tweens. By default, tweens are animated using
* a linear easing. For more tweening options, check out {@link Konva.Easings}
* @constructor
* @memberof Konva
* @example
* // instantiate new tween which fully rotates a node in 1 second
* var tween = new Konva.Tween({
* node: node,
* rotationDeg: 360,
* duration: 1,
* easing: Konva.Easings.EaseInOut
* });
*
* // play tween
* tween.play();
*
* // pause tween
* tween.pause();
*/
export declare class Tween {
static attrs: {};
static tweens: {};
node: Node;
anim: Animation;
tween: TweenEngine;
_id: number;
onFinish: Function;
onReset: Function;
constructor(config: any);
_addAttr(key: any, end: any): void;
_tweenFunc(i: any): void;
_addListeners(): void;
/**
* play
* @method
* @name Konva.Tween#play
* @returns {Tween}
*/
play(): this;
/**
* reverse
* @method
* @name Konva.Tween#reverse
* @returns {Tween}
*/
reverse(): this;
/**
* reset
* @method
* @name Konva.Tween#reset
* @returns {Tween}
*/
reset(): this;
/**
* seek
* @method
* @name Konva.Tween#seek(
* @param {Integer} t time in seconds between 0 and the duration
* @returns {Tween}
*/
seek(t: any): this;
/**
* pause
* @method
* @name Konva.Tween#pause
* @returns {Tween}
*/
pause(): this;
/**
* finish
* @method
* @name Konva.Tween#finish
* @returns {Tween}
*/
finish(): this;
/**
* destroy
* @method
* @name Konva.Tween#destroy
*/
destroy(): void;
}
/**
* @namespace Easings
* @memberof Konva
*/
export declare const Easings: {
/**
* back ease in
* @function
* @memberof Konva.Easings
*/
BackEaseIn(t: any, b: any, c: any, d: any): any;
/**
* back ease out
* @function
* @memberof Konva.Easings
*/
BackEaseOut(t: any, b: any, c: any, d: any): any;
/**
* back ease in out
* @function
* @memberof Konva.Easings
*/
BackEaseInOut(t: any, b: any, c: any, d: any): any;
/**
* elastic ease in
* @function
* @memberof Konva.Easings
*/
ElasticEaseIn(t: any, b: any, c: any, d: any, a: any, p: any): any;
/**
* elastic ease out
* @function
* @memberof Konva.Easings
*/
ElasticEaseOut(t: any, b: any, c: any, d: any, a: any, p: any): any;
/**
* elastic ease in out
* @function
* @memberof Konva.Easings
*/
ElasticEaseInOut(t: any, b: any, c: any, d: any, a: any, p: any): any;
/**
* bounce ease out
* @function
* @memberof Konva.Easings
*/
BounceEaseOut(t: any, b: any, c: any, d: any): any;
/**
* bounce ease in
* @function
* @memberof Konva.Easings
*/
BounceEaseIn(t: any, b: any, c: any, d: any): any;
/**
* bounce ease in out
* @function
* @memberof Konva.Easings
*/
BounceEaseInOut(t: any, b: any, c: any, d: any): any;
/**
* ease in
* @function
* @memberof Konva.Easings
*/
EaseIn(t: any, b: any, c: any, d: any): any;
/**
* ease out
* @function
* @memberof Konva.Easings
*/
EaseOut(t: any, b: any, c: any, d: any): any;
/**
* ease in out
* @function
* @memberof Konva.Easings
*/
EaseInOut(t: any, b: any, c: any, d: any): any;
/**
* strong ease in
* @function
* @memberof Konva.Easings
*/
StrongEaseIn(t: any, b: any, c: any, d: any): any;
/**
* strong ease out
* @function
* @memberof Konva.Easings
*/
StrongEaseOut(t: any, b: any, c: any, d: any): any;
/**
* strong ease in out
* @function
* @memberof Konva.Easings
*/
StrongEaseInOut(t: any, b: any, c: any, d: any): any;
/**
* linear
* @function
* @memberof Konva.Easings
*/
Linear(t: any, b: any, c: any, d: any): any;
};
export {};