tween.js - more detailed definition of callback functions, added new yoyo() and repeat() function to Tween

This commit is contained in:
Jan Zarnikov
2013-12-05 12:31:53 +01:00
parent 47b04c5985
commit 5b34061540
+11 -9
View File
@@ -1,6 +1,6 @@
// Type definitions for tween.js r7
// Type definitions for tween.js r12
// Project: https://github.com/sole/tween.js/
// Definitions by: https://github.com/sunetos
// Definitions by: https://github.com/sunetos and https://github.com/jzarnikov
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module TWEEN {
@@ -9,7 +9,7 @@ declare module TWEEN {
export function removeAll(): void;
export function add(tween:Tween): void;
export function remove(tween:Tween): void;
export function update(time:number): boolean;
export function update(time?:number): boolean;
export class Tween {
constructor(object?:any);
@@ -17,13 +17,15 @@ declare module TWEEN {
start(time?:number): Tween;
stop(): Tween;
delay(amount:number): Tween;
easing(easing): Tween;
interpolation(interpolation:Function): Tween;
easing(easing: (k: number) => number): Tween;
interpolation(interpolation: (v:number[], k:number) => number): Tween;
chain(...tweens:Tween[]): Tween;
onStart(callback:Function): Tween;
onUpdate(callback:Function): Tween;
onComplete(callback:Function): Tween;
update(time: number): boolean;
onStart(callback: (object?: any) => void): Tween;
onUpdate(callback: (object?: any) => void): Tween;
onComplete(callback: (object?: any) => void): Tween;
update(time: number): boolean;
repeat(times: number): Tween;
yoyo(enable: boolean): Tween;
}
export var Easing: TweenEasing;
export var Interpolation: TweenInterpolation;