mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
tween.js - more detailed definition of callback functions, added new yoyo() and repeat() function to Tween
This commit is contained in:
Vendored
+11
-9
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user