-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathwheen.d.ts
More file actions
181 lines (154 loc) · 3.69 KB
/
Copy pathwheen.d.ts
File metadata and controls
181 lines (154 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
declare class WheenChain {
/**
* set the starting point.
* @param args attributes for starting point
*/
from(args: any): WheenChain;
/**
* lerp to given attributes
* @param args target attributes
* @param time total time, milliseconds
* @param easing easing function
* @param options options
*
*/
to(args: any, time: number | object, easing?: EasingFunction | object, options?: object): WheenChain;
/**
* lerp to given attributes based on real-time values
* @param args target attributes
* @param time total time, milliseconds
* @param easing easing function
* @param options options
*
*/
by(args: any, time: number | object, easing?: EasingFunction | object, options?: object): WheenChain;
/**
* event system
* @param event event name
* @param func function needs to be called
* @param self caller
* @param args extra arguments
*
*/
on(event: 'start' | 'finish' | 'update', func: Function, self?: any, ...args?: any): WheenChain;
/**
* wait a specific time
* @param delay target attributes
*/
wait(delay: number): WheenChain;
/**
* set a flag for looping
* @param flag flag name
*/
setFlag(flag: string | number | symbol): WheenChain;
/**
* loop animation
* @param count loop count, if less or equal 0, it's infinite
* @param flag flag name
*/
loop(count?: number, flag?: string | number | symbol): WheenChain;
/**
* call a function
* @param func the function need to be called
* @param self this context
* @param args arguments
*/
invoke(func: Function, self?: any, ...args: any): WheenChain;
/**
* start the animation
*/
start(): WheenChain;
/**
* pause the animation
*/
pause(): WheenChain;
/**
* resume the animation
*/
resume(): WheenChain;
/**
* stop the animation
*/
stop(): WheenChain;
}
declare class Wheen {
/**
* stop all animations from an object
* @param target target
*/
static stop(target: any);
/**
* start all animations from an object
* @param target target
*/
static start(target: any);
/**
* pause all animations from an object
* @param target target
*/
static pause(target: any);
/**
* resume all animations from an object
* @param target target
*/
static resume(target: any);
static Easing: {
static Linear: EasingFunction;
static Quad: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Cubic: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Quart: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Quint: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Sine: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Expo: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Circ: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Elastic: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Back: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
static Bounce: {
static easeIn: EasingFunction;
static easeOut: EasingFunction;
static easeInOut: EasingFunction;
}
}
}
/**
* create a new animation with given target.
* @param target target
* @param options extra options
*/
declare function wheen(target: any, options?: object): WheenChain;