@oliversalzburg/js-utils 0.0.27-dev.10 → 0.0.27-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/graphics/canvas-sandbox.js +1 -1
- package/graphics/canvas-sandbox.js.map +1 -1
- package/math/easing.d.ts +306 -0
- package/math/easing.js +434 -0
- package/math/easing.js.map +1 -0
- package/math/index.d.ts +1 -0
- package/math/index.js +1 -0
- package/math/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -257,7 +257,7 @@ export class CanvasSandbox {
|
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
259
|
// Make canvas fullscreen.
|
|
260
|
-
if (!this.document.fullscreenElement) {
|
|
260
|
+
if (!this.document.fullscreenElement && event.target === this.document.body) {
|
|
261
261
|
if (this.sandboxOptions.devMode) {
|
|
262
262
|
console.info("CanvasSandbox: Canvas is entering fullscreen mode...");
|
|
263
263
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-sandbox.js","sourceRoot":"","sources":["../../source/graphics/canvas-sandbox.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,KAA2B,EAAU,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDvD,CAAC;AAqFF;;;;;;;;;;;;;;;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ACgB,CAAC,CAAC;QACnC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
package/math/easing.d.ts
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates an easing multiplier for: Quad In
|
|
3
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
4
|
+
* @returns The easing multiplier for the position.
|
|
5
|
+
* @group Math
|
|
6
|
+
* @group Easing
|
|
7
|
+
* @group Animation
|
|
8
|
+
*/
|
|
9
|
+
export declare const easeInQuad: (position: number) => number;
|
|
10
|
+
/**
|
|
11
|
+
* Calculates an easing multiplier for: Quad Out
|
|
12
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
13
|
+
* @returns The easing multiplier for the position.
|
|
14
|
+
* @group Math
|
|
15
|
+
* @group Easing
|
|
16
|
+
* @group Animation
|
|
17
|
+
*/
|
|
18
|
+
export declare const easeOutQuad: (position: number) => number;
|
|
19
|
+
/**
|
|
20
|
+
* Calculates an easing multiplier for: Quad In+Out
|
|
21
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
22
|
+
* @returns The easing multiplier for the position.
|
|
23
|
+
* @group Math
|
|
24
|
+
* @group Easing
|
|
25
|
+
* @group Animation
|
|
26
|
+
*/
|
|
27
|
+
export declare const easeInOutQuad: (position: number) => number;
|
|
28
|
+
/**
|
|
29
|
+
* Calculates an easing multiplier for: Cubic In
|
|
30
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
31
|
+
* @returns The easing multiplier for the position.
|
|
32
|
+
* @group Math
|
|
33
|
+
* @group Easing
|
|
34
|
+
* @group Animation
|
|
35
|
+
*/
|
|
36
|
+
export declare const easeInCubic: (position: number) => number;
|
|
37
|
+
/**
|
|
38
|
+
* Calculates an easing multiplier for: Cubic Out
|
|
39
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
40
|
+
* @returns The easing multiplier for the position.
|
|
41
|
+
* @group Math
|
|
42
|
+
* @group Easing
|
|
43
|
+
* @group Animation
|
|
44
|
+
*/
|
|
45
|
+
export declare const easeOutCubic: (position: number) => number;
|
|
46
|
+
/**
|
|
47
|
+
* Calculates an easing multiplier for: Cubic In+Out
|
|
48
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
49
|
+
* @returns The easing multiplier for the position.
|
|
50
|
+
* @group Math
|
|
51
|
+
* @group Easing
|
|
52
|
+
* @group Animation
|
|
53
|
+
*/
|
|
54
|
+
export declare const easeInOutCubic: (position: number) => number;
|
|
55
|
+
/**
|
|
56
|
+
* Calculates an easing multiplier for: Quart In
|
|
57
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
58
|
+
* @returns The easing multiplier for the position.
|
|
59
|
+
* @group Math
|
|
60
|
+
* @group Easing
|
|
61
|
+
* @group Animation
|
|
62
|
+
*/
|
|
63
|
+
export declare const easeInQuart: (position: number) => number;
|
|
64
|
+
/**
|
|
65
|
+
* Calculates an easing multiplier for: Quad Out
|
|
66
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
67
|
+
* @returns The easing multiplier for the position.
|
|
68
|
+
* @group Math
|
|
69
|
+
* @group Easing
|
|
70
|
+
* @group Animation
|
|
71
|
+
*/
|
|
72
|
+
export declare const easeOutQuart: (position: number) => number;
|
|
73
|
+
/**
|
|
74
|
+
* Calculates an easing multiplier for: Quart In+Out
|
|
75
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
76
|
+
* @returns The easing multiplier for the position.
|
|
77
|
+
* @group Math
|
|
78
|
+
* @group Easing
|
|
79
|
+
* @group Animation
|
|
80
|
+
*/
|
|
81
|
+
export declare const easeInOutQuart: (position: number) => number;
|
|
82
|
+
/**
|
|
83
|
+
* Calculates an easing multiplier for: Quint In
|
|
84
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
85
|
+
* @returns The easing multiplier for the position.
|
|
86
|
+
* @group Math
|
|
87
|
+
* @group Easing
|
|
88
|
+
* @group Animation
|
|
89
|
+
*/
|
|
90
|
+
export declare const easeInQuint: (position: number) => number;
|
|
91
|
+
/**
|
|
92
|
+
* Calculates an easing multiplier for: Quint Out
|
|
93
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
94
|
+
* @returns The easing multiplier for the position.
|
|
95
|
+
* @group Math
|
|
96
|
+
* @group Easing
|
|
97
|
+
* @group Animation
|
|
98
|
+
*/
|
|
99
|
+
export declare const easeOutQuint: (position: number) => number;
|
|
100
|
+
/**
|
|
101
|
+
* Calculates an easing multiplier for: Quint In+Out
|
|
102
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
103
|
+
* @returns The easing multiplier for the position.
|
|
104
|
+
* @group Math
|
|
105
|
+
* @group Easing
|
|
106
|
+
* @group Animation
|
|
107
|
+
*/
|
|
108
|
+
export declare const easeInOutQuint: (position: number) => number;
|
|
109
|
+
/**
|
|
110
|
+
* Calculates an easing multiplier for: Sine In
|
|
111
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
112
|
+
* @returns The easing multiplier for the position.
|
|
113
|
+
* @group Math
|
|
114
|
+
* @group Easing
|
|
115
|
+
* @group Animation
|
|
116
|
+
*/
|
|
117
|
+
export declare const easeInSine: (position: number) => number;
|
|
118
|
+
/**
|
|
119
|
+
* Calculates an easing multiplier for: Sine Out
|
|
120
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
121
|
+
* @returns The easing multiplier for the position.
|
|
122
|
+
* @group Math
|
|
123
|
+
* @group Easing
|
|
124
|
+
* @group Animation
|
|
125
|
+
*/
|
|
126
|
+
export declare const easeOutSine: (position: number) => number;
|
|
127
|
+
/**
|
|
128
|
+
* Calculates an easing multiplier for: Sine In+Out
|
|
129
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
130
|
+
* @returns The easing multiplier for the position.
|
|
131
|
+
* @group Math
|
|
132
|
+
* @group Easing
|
|
133
|
+
* @group Animation
|
|
134
|
+
*/
|
|
135
|
+
export declare const easeInOutSine: (position: number) => number;
|
|
136
|
+
/**
|
|
137
|
+
* Calculates an easing multiplier for: Expo In
|
|
138
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
139
|
+
* @returns The easing multiplier for the position.
|
|
140
|
+
* @group Math
|
|
141
|
+
* @group Easing
|
|
142
|
+
* @group Animation
|
|
143
|
+
*/
|
|
144
|
+
export declare const easeInExpo: (position: number) => number;
|
|
145
|
+
/**
|
|
146
|
+
* Calculates an easing multiplier for: Expo Out
|
|
147
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
148
|
+
* @returns The easing multiplier for the position.
|
|
149
|
+
* @group Math
|
|
150
|
+
* @group Easing
|
|
151
|
+
* @group Animation
|
|
152
|
+
*/
|
|
153
|
+
export declare const easeOutExpo: (position: number) => number;
|
|
154
|
+
/**
|
|
155
|
+
* Calculates an easing multiplier for: Expo In+Out
|
|
156
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
157
|
+
* @returns The easing multiplier for the position.
|
|
158
|
+
* @group Math
|
|
159
|
+
* @group Easing
|
|
160
|
+
* @group Animation
|
|
161
|
+
*/
|
|
162
|
+
export declare const easeInOutExpo: (position: number) => number;
|
|
163
|
+
/**
|
|
164
|
+
* Calculates an easing multiplier for: Circ In
|
|
165
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
166
|
+
* @returns The easing multiplier for the position.
|
|
167
|
+
* @group Math
|
|
168
|
+
* @group Easing
|
|
169
|
+
* @group Animation
|
|
170
|
+
*/
|
|
171
|
+
export declare const easeInCirc: (position: number) => number;
|
|
172
|
+
/**
|
|
173
|
+
* Calculates an easing multiplier for: Circ Out
|
|
174
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
175
|
+
* @returns The easing multiplier for the position.
|
|
176
|
+
* @group Math
|
|
177
|
+
* @group Easing
|
|
178
|
+
* @group Animation
|
|
179
|
+
*/
|
|
180
|
+
export declare const easeOutCirc: (position: number) => number;
|
|
181
|
+
/**
|
|
182
|
+
* Calculates an easing multiplier for: Circ In+Out
|
|
183
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
184
|
+
* @returns The easing multiplier for the position.
|
|
185
|
+
* @group Math
|
|
186
|
+
* @group Easing
|
|
187
|
+
* @group Animation
|
|
188
|
+
*/
|
|
189
|
+
export declare const easeInOutCirc: (position: number) => number;
|
|
190
|
+
/**
|
|
191
|
+
* Calculates an easing multiplier for: Bounce Out
|
|
192
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
193
|
+
* @returns The easing multiplier for the position.
|
|
194
|
+
* @group Math
|
|
195
|
+
* @group Easing
|
|
196
|
+
* @group Animation
|
|
197
|
+
*/
|
|
198
|
+
export declare const easeOutBounce: (position: number) => number;
|
|
199
|
+
/**
|
|
200
|
+
* Calculates an easing multiplier for: Back In
|
|
201
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
202
|
+
* @returns The easing multiplier for the position.
|
|
203
|
+
* @group Math
|
|
204
|
+
* @group Easing
|
|
205
|
+
* @group Animation
|
|
206
|
+
*/
|
|
207
|
+
export declare const easeInBack: (position: number) => number;
|
|
208
|
+
/**
|
|
209
|
+
* Calculates an easing multiplier for: Back Out
|
|
210
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
211
|
+
* @returns The easing multiplier for the position.
|
|
212
|
+
* @group Math
|
|
213
|
+
* @group Easing
|
|
214
|
+
* @group Animation
|
|
215
|
+
*/
|
|
216
|
+
export declare const easeOutBack: (position: number) => number;
|
|
217
|
+
/**
|
|
218
|
+
* Calculates an easing multiplier for: Back In+Out
|
|
219
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
220
|
+
* @returns The easing multiplier for the position.
|
|
221
|
+
* @group Math
|
|
222
|
+
* @group Easing
|
|
223
|
+
* @group Animation
|
|
224
|
+
*/
|
|
225
|
+
export declare const easeInOutBack: (position: number) => number;
|
|
226
|
+
/**
|
|
227
|
+
* Calculates an easing multiplier for: Elastic
|
|
228
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
229
|
+
* @returns The easing multiplier for the position.
|
|
230
|
+
* @group Math
|
|
231
|
+
* @group Easing
|
|
232
|
+
* @group Animation
|
|
233
|
+
*/
|
|
234
|
+
export declare const easeElastic: (position: number) => number;
|
|
235
|
+
/**
|
|
236
|
+
* Calculates an easing multiplier for: Swing In+Out
|
|
237
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
238
|
+
* @returns The easing multiplier for the position.
|
|
239
|
+
* @group Math
|
|
240
|
+
* @group Easing
|
|
241
|
+
* @group Animation
|
|
242
|
+
*/
|
|
243
|
+
export declare const swingInOut: (position: number) => number;
|
|
244
|
+
/**
|
|
245
|
+
* Calculates an easing multiplier for: Swing In
|
|
246
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
247
|
+
* @returns The easing multiplier for the position.
|
|
248
|
+
* @group Math
|
|
249
|
+
* @group Easing
|
|
250
|
+
* @group Animation
|
|
251
|
+
*/
|
|
252
|
+
export declare const easeSwingIn: (position: number) => number;
|
|
253
|
+
/**
|
|
254
|
+
* Calculates an easing multiplier for: Swing Out
|
|
255
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
256
|
+
* @returns The easing multiplier for the position.
|
|
257
|
+
* @group Math
|
|
258
|
+
* @group Easing
|
|
259
|
+
* @group Animation
|
|
260
|
+
*/
|
|
261
|
+
export declare const easeSwingOut: (position: number) => number;
|
|
262
|
+
/**
|
|
263
|
+
* Calculates an easing multiplier for: Bounce
|
|
264
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
265
|
+
* @returns The easing multiplier for the position.
|
|
266
|
+
* @group Math
|
|
267
|
+
* @group Easing
|
|
268
|
+
* @group Animation
|
|
269
|
+
*/
|
|
270
|
+
export declare const easeBounce: (position: number) => number;
|
|
271
|
+
/**
|
|
272
|
+
* Calculates an easing multiplier for: Bounce Past
|
|
273
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
274
|
+
* @returns The easing multiplier for the position.
|
|
275
|
+
* @group Math
|
|
276
|
+
* @group Easing
|
|
277
|
+
* @group Animation
|
|
278
|
+
*/
|
|
279
|
+
export declare const easeBouncePast: (position: number) => number;
|
|
280
|
+
/**
|
|
281
|
+
* Calculates an easing multiplier for: Simple In+Out
|
|
282
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
283
|
+
* @returns The easing multiplier for the position.
|
|
284
|
+
* @group Math
|
|
285
|
+
* @group Easing
|
|
286
|
+
* @group Animation
|
|
287
|
+
*/
|
|
288
|
+
export declare const easeFromTo: (position: number) => number;
|
|
289
|
+
/**
|
|
290
|
+
* Calculates an easing multiplier for: Simple In
|
|
291
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
292
|
+
* @returns The easing multiplier for the position.
|
|
293
|
+
* @group Math
|
|
294
|
+
* @group Easing
|
|
295
|
+
* @group Animation
|
|
296
|
+
*/
|
|
297
|
+
export declare const easeFrom: (position: number) => number;
|
|
298
|
+
/**
|
|
299
|
+
* Calculates an easing multiplier for: Simple Out
|
|
300
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
301
|
+
* @returns The easing multiplier for the position.
|
|
302
|
+
* @group Math
|
|
303
|
+
* @group Easing
|
|
304
|
+
* @group Animation
|
|
305
|
+
*/
|
|
306
|
+
export declare const easeTo: (position: number) => number;
|
package/math/easing.js
ADDED
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
// http://robertpenner.com/easing_terms_of_use.html
|
|
2
|
+
/**
|
|
3
|
+
* Calculates an easing multiplier for: Quad In
|
|
4
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
5
|
+
* @returns The easing multiplier for the position.
|
|
6
|
+
* @group Math
|
|
7
|
+
* @group Easing
|
|
8
|
+
* @group Animation
|
|
9
|
+
*/
|
|
10
|
+
export const easeInQuad = (position) => {
|
|
11
|
+
return Math.pow(position, 2);
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Calculates an easing multiplier for: Quad Out
|
|
15
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
16
|
+
* @returns The easing multiplier for the position.
|
|
17
|
+
* @group Math
|
|
18
|
+
* @group Easing
|
|
19
|
+
* @group Animation
|
|
20
|
+
*/
|
|
21
|
+
export const easeOutQuad = (position) => {
|
|
22
|
+
return -(Math.pow(position - 1, 2) - 1);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Calculates an easing multiplier for: Quad In+Out
|
|
26
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
27
|
+
* @returns The easing multiplier for the position.
|
|
28
|
+
* @group Math
|
|
29
|
+
* @group Easing
|
|
30
|
+
* @group Animation
|
|
31
|
+
*/
|
|
32
|
+
export const easeInOutQuad = (position) => {
|
|
33
|
+
if ((position /= 0.5) < 1) {
|
|
34
|
+
return 0.5 * Math.pow(position, 2);
|
|
35
|
+
}
|
|
36
|
+
return -0.5 * ((position -= 2) * position - 2);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Calculates an easing multiplier for: Cubic In
|
|
40
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
41
|
+
* @returns The easing multiplier for the position.
|
|
42
|
+
* @group Math
|
|
43
|
+
* @group Easing
|
|
44
|
+
* @group Animation
|
|
45
|
+
*/
|
|
46
|
+
export const easeInCubic = (position) => {
|
|
47
|
+
return Math.pow(position, 3);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Calculates an easing multiplier for: Cubic Out
|
|
51
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
52
|
+
* @returns The easing multiplier for the position.
|
|
53
|
+
* @group Math
|
|
54
|
+
* @group Easing
|
|
55
|
+
* @group Animation
|
|
56
|
+
*/
|
|
57
|
+
export const easeOutCubic = (position) => {
|
|
58
|
+
return Math.pow(position - 1, 3) + 1;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Calculates an easing multiplier for: Cubic In+Out
|
|
62
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
63
|
+
* @returns The easing multiplier for the position.
|
|
64
|
+
* @group Math
|
|
65
|
+
* @group Easing
|
|
66
|
+
* @group Animation
|
|
67
|
+
*/
|
|
68
|
+
export const easeInOutCubic = (position) => {
|
|
69
|
+
if ((position /= 0.5) < 1)
|
|
70
|
+
return 0.5 * Math.pow(position, 3);
|
|
71
|
+
return 0.5 * (Math.pow(position - 2, 3) + 2);
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Calculates an easing multiplier for: Quart In
|
|
75
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
76
|
+
* @returns The easing multiplier for the position.
|
|
77
|
+
* @group Math
|
|
78
|
+
* @group Easing
|
|
79
|
+
* @group Animation
|
|
80
|
+
*/
|
|
81
|
+
export const easeInQuart = (position) => {
|
|
82
|
+
return Math.pow(position, 4);
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Calculates an easing multiplier for: Quad Out
|
|
86
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
87
|
+
* @returns The easing multiplier for the position.
|
|
88
|
+
* @group Math
|
|
89
|
+
* @group Easing
|
|
90
|
+
* @group Animation
|
|
91
|
+
*/
|
|
92
|
+
export const easeOutQuart = (position) => {
|
|
93
|
+
return -(Math.pow(position - 1, 4) - 1);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Calculates an easing multiplier for: Quart In+Out
|
|
97
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
98
|
+
* @returns The easing multiplier for the position.
|
|
99
|
+
* @group Math
|
|
100
|
+
* @group Easing
|
|
101
|
+
* @group Animation
|
|
102
|
+
*/
|
|
103
|
+
export const easeInOutQuart = (position) => {
|
|
104
|
+
if ((position /= 0.5) < 1)
|
|
105
|
+
return 0.5 * Math.pow(position, 4);
|
|
106
|
+
return -0.5 * ((position -= 2) * Math.pow(position, 3) - 2);
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Calculates an easing multiplier for: Quint In
|
|
110
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
111
|
+
* @returns The easing multiplier for the position.
|
|
112
|
+
* @group Math
|
|
113
|
+
* @group Easing
|
|
114
|
+
* @group Animation
|
|
115
|
+
*/
|
|
116
|
+
export const easeInQuint = (position) => {
|
|
117
|
+
return Math.pow(position, 5);
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Calculates an easing multiplier for: Quint Out
|
|
121
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
122
|
+
* @returns The easing multiplier for the position.
|
|
123
|
+
* @group Math
|
|
124
|
+
* @group Easing
|
|
125
|
+
* @group Animation
|
|
126
|
+
*/
|
|
127
|
+
export const easeOutQuint = (position) => {
|
|
128
|
+
return Math.pow(position - 1, 5) + 1;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Calculates an easing multiplier for: Quint In+Out
|
|
132
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
133
|
+
* @returns The easing multiplier for the position.
|
|
134
|
+
* @group Math
|
|
135
|
+
* @group Easing
|
|
136
|
+
* @group Animation
|
|
137
|
+
*/
|
|
138
|
+
export const easeInOutQuint = (position) => {
|
|
139
|
+
if ((position /= 0.5) < 1)
|
|
140
|
+
return 0.5 * Math.pow(position, 5);
|
|
141
|
+
return 0.5 * (Math.pow(position - 2, 5) + 2);
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Calculates an easing multiplier for: Sine In
|
|
145
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
146
|
+
* @returns The easing multiplier for the position.
|
|
147
|
+
* @group Math
|
|
148
|
+
* @group Easing
|
|
149
|
+
* @group Animation
|
|
150
|
+
*/
|
|
151
|
+
export const easeInSine = (position) => {
|
|
152
|
+
return -Math.cos(position * (Math.PI / 2)) + 1;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Calculates an easing multiplier for: Sine Out
|
|
156
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
157
|
+
* @returns The easing multiplier for the position.
|
|
158
|
+
* @group Math
|
|
159
|
+
* @group Easing
|
|
160
|
+
* @group Animation
|
|
161
|
+
*/
|
|
162
|
+
export const easeOutSine = (position) => {
|
|
163
|
+
return Math.sin(position * (Math.PI / 2));
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Calculates an easing multiplier for: Sine In+Out
|
|
167
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
168
|
+
* @returns The easing multiplier for the position.
|
|
169
|
+
* @group Math
|
|
170
|
+
* @group Easing
|
|
171
|
+
* @group Animation
|
|
172
|
+
*/
|
|
173
|
+
export const easeInOutSine = (position) => {
|
|
174
|
+
return -0.5 * (Math.cos(Math.PI * position) - 1);
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Calculates an easing multiplier for: Expo In
|
|
178
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
179
|
+
* @returns The easing multiplier for the position.
|
|
180
|
+
* @group Math
|
|
181
|
+
* @group Easing
|
|
182
|
+
* @group Animation
|
|
183
|
+
*/
|
|
184
|
+
export const easeInExpo = (position) => {
|
|
185
|
+
return position === 0 ? 0 : Math.pow(2, 10 * (position - 1));
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Calculates an easing multiplier for: Expo Out
|
|
189
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
190
|
+
* @returns The easing multiplier for the position.
|
|
191
|
+
* @group Math
|
|
192
|
+
* @group Easing
|
|
193
|
+
* @group Animation
|
|
194
|
+
*/
|
|
195
|
+
export const easeOutExpo = (position) => {
|
|
196
|
+
return position === 1 ? 1 : -Math.pow(2, -10 * position) + 1;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Calculates an easing multiplier for: Expo In+Out
|
|
200
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
201
|
+
* @returns The easing multiplier for the position.
|
|
202
|
+
* @group Math
|
|
203
|
+
* @group Easing
|
|
204
|
+
* @group Animation
|
|
205
|
+
*/
|
|
206
|
+
export const easeInOutExpo = (position) => {
|
|
207
|
+
if (position === 0)
|
|
208
|
+
return 0;
|
|
209
|
+
if (position === 1)
|
|
210
|
+
return 1;
|
|
211
|
+
if ((position /= 0.5) < 1)
|
|
212
|
+
return 0.5 * Math.pow(2, 10 * (position - 1));
|
|
213
|
+
return 0.5 * (-Math.pow(2, -10 * --position) + 2);
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Calculates an easing multiplier for: Circ In
|
|
217
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
218
|
+
* @returns The easing multiplier for the position.
|
|
219
|
+
* @group Math
|
|
220
|
+
* @group Easing
|
|
221
|
+
* @group Animation
|
|
222
|
+
*/
|
|
223
|
+
export const easeInCirc = (position) => {
|
|
224
|
+
return -(Math.sqrt(1 - position * position) - 1);
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Calculates an easing multiplier for: Circ Out
|
|
228
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
229
|
+
* @returns The easing multiplier for the position.
|
|
230
|
+
* @group Math
|
|
231
|
+
* @group Easing
|
|
232
|
+
* @group Animation
|
|
233
|
+
*/
|
|
234
|
+
export const easeOutCirc = (position) => {
|
|
235
|
+
return Math.sqrt(1 - Math.pow(position - 1, 2));
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Calculates an easing multiplier for: Circ In+Out
|
|
239
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
240
|
+
* @returns The easing multiplier for the position.
|
|
241
|
+
* @group Math
|
|
242
|
+
* @group Easing
|
|
243
|
+
* @group Animation
|
|
244
|
+
*/
|
|
245
|
+
export const easeInOutCirc = (position) => {
|
|
246
|
+
if ((position /= 0.5) < 1)
|
|
247
|
+
return -0.5 * (Math.sqrt(1 - position * position) - 1);
|
|
248
|
+
return 0.5 * (Math.sqrt(1 - (position -= 2) * position) + 1);
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Calculates an easing multiplier for: Bounce Out
|
|
252
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
253
|
+
* @returns The easing multiplier for the position.
|
|
254
|
+
* @group Math
|
|
255
|
+
* @group Easing
|
|
256
|
+
* @group Animation
|
|
257
|
+
*/
|
|
258
|
+
export const easeOutBounce = (position) => {
|
|
259
|
+
if (position < 1 / 2.75) {
|
|
260
|
+
return 7.5625 * position * position;
|
|
261
|
+
}
|
|
262
|
+
else if (position < 2 / 2.75) {
|
|
263
|
+
return 7.5625 * (position -= 1.5 / 2.75) * position + 0.75;
|
|
264
|
+
}
|
|
265
|
+
else if (position < 2.5 / 2.75) {
|
|
266
|
+
return 7.5625 * (position -= 2.25 / 2.75) * position + 0.9375;
|
|
267
|
+
}
|
|
268
|
+
return 7.5625 * (position -= 2.625 / 2.75) * position + 0.984375;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Calculates an easing multiplier for: Back In
|
|
272
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
273
|
+
* @returns The easing multiplier for the position.
|
|
274
|
+
* @group Math
|
|
275
|
+
* @group Easing
|
|
276
|
+
* @group Animation
|
|
277
|
+
*/
|
|
278
|
+
export const easeInBack = (position) => {
|
|
279
|
+
const s = 1.70158;
|
|
280
|
+
return position * position * ((s + 1) * position - s);
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Calculates an easing multiplier for: Back Out
|
|
284
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
285
|
+
* @returns The easing multiplier for the position.
|
|
286
|
+
* @group Math
|
|
287
|
+
* @group Easing
|
|
288
|
+
* @group Animation
|
|
289
|
+
*/
|
|
290
|
+
export const easeOutBack = (position) => {
|
|
291
|
+
const s = 1.70158;
|
|
292
|
+
return (position = position - 1) * position * ((s + 1) * position + s) + 1;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Calculates an easing multiplier for: Back In+Out
|
|
296
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
297
|
+
* @returns The easing multiplier for the position.
|
|
298
|
+
* @group Math
|
|
299
|
+
* @group Easing
|
|
300
|
+
* @group Animation
|
|
301
|
+
*/
|
|
302
|
+
export const easeInOutBack = (position) => {
|
|
303
|
+
let s = 1.70158;
|
|
304
|
+
if ((position /= 0.5) < 1) {
|
|
305
|
+
return 0.5 * (position * position * (((s *= 1.525) + 1) * position - s));
|
|
306
|
+
}
|
|
307
|
+
return 0.5 * ((position -= 2) * position * (((s *= 1.525) + 1) * position + s) + 2);
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Calculates an easing multiplier for: Elastic
|
|
311
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
312
|
+
* @returns The easing multiplier for the position.
|
|
313
|
+
* @group Math
|
|
314
|
+
* @group Easing
|
|
315
|
+
* @group Animation
|
|
316
|
+
*/
|
|
317
|
+
export const easeElastic = (position) => {
|
|
318
|
+
return -1 * Math.pow(4, -8 * position) * Math.sin(((position * 6 - 1) * (2 * Math.PI)) / 2) + 1;
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Calculates an easing multiplier for: Swing In+Out
|
|
322
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
323
|
+
* @returns The easing multiplier for the position.
|
|
324
|
+
* @group Math
|
|
325
|
+
* @group Easing
|
|
326
|
+
* @group Animation
|
|
327
|
+
*/
|
|
328
|
+
export const swingInOut = (position) => {
|
|
329
|
+
let s = 1.70158;
|
|
330
|
+
return (position /= 0.5) < 1
|
|
331
|
+
? 0.5 * (position * position * (((s *= 1.525) + 1) * position - s))
|
|
332
|
+
: 0.5 * ((position -= 2) * position * (((s *= 1.525) + 1) * position + s) + 2);
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Calculates an easing multiplier for: Swing In
|
|
336
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
337
|
+
* @returns The easing multiplier for the position.
|
|
338
|
+
* @group Math
|
|
339
|
+
* @group Easing
|
|
340
|
+
* @group Animation
|
|
341
|
+
*/
|
|
342
|
+
export const easeSwingIn = (position) => {
|
|
343
|
+
const s = 1.70158;
|
|
344
|
+
return position * position * ((s + 1) * position - s);
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Calculates an easing multiplier for: Swing Out
|
|
348
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
349
|
+
* @returns The easing multiplier for the position.
|
|
350
|
+
* @group Math
|
|
351
|
+
* @group Easing
|
|
352
|
+
* @group Animation
|
|
353
|
+
*/
|
|
354
|
+
export const easeSwingOut = (position) => {
|
|
355
|
+
const s = 1.70158;
|
|
356
|
+
return (position -= 1) * position * ((s + 1) * position + s) + 1;
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Calculates an easing multiplier for: Bounce
|
|
360
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
361
|
+
* @returns The easing multiplier for the position.
|
|
362
|
+
* @group Math
|
|
363
|
+
* @group Easing
|
|
364
|
+
* @group Animation
|
|
365
|
+
*/
|
|
366
|
+
export const easeBounce = (position) => {
|
|
367
|
+
if (position < 1 / 2.75) {
|
|
368
|
+
return 7.5625 * position * position;
|
|
369
|
+
}
|
|
370
|
+
else if (position < 2 / 2.75) {
|
|
371
|
+
return 7.5625 * (position -= 1.5 / 2.75) * position + 0.75;
|
|
372
|
+
}
|
|
373
|
+
else if (position < 2.5 / 2.75) {
|
|
374
|
+
return 7.5625 * (position -= 2.25 / 2.75) * position + 0.9375;
|
|
375
|
+
}
|
|
376
|
+
return 7.5625 * (position -= 2.625 / 2.75) * position + 0.984375;
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* Calculates an easing multiplier for: Bounce Past
|
|
380
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
381
|
+
* @returns The easing multiplier for the position.
|
|
382
|
+
* @group Math
|
|
383
|
+
* @group Easing
|
|
384
|
+
* @group Animation
|
|
385
|
+
*/
|
|
386
|
+
export const easeBouncePast = (position) => {
|
|
387
|
+
if (position < 1 / 2.75) {
|
|
388
|
+
return 7.5625 * position * position;
|
|
389
|
+
}
|
|
390
|
+
else if (position < 2 / 2.75) {
|
|
391
|
+
return 2 - (7.5625 * (position -= 1.5 / 2.75) * position + 0.75);
|
|
392
|
+
}
|
|
393
|
+
else if (position < 2.5 / 2.75) {
|
|
394
|
+
return 2 - (7.5625 * (position -= 2.25 / 2.75) * position + 0.9375);
|
|
395
|
+
}
|
|
396
|
+
return 2 - (7.5625 * (position -= 2.625 / 2.75) * position + 0.984375);
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* Calculates an easing multiplier for: Simple In+Out
|
|
400
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
401
|
+
* @returns The easing multiplier for the position.
|
|
402
|
+
* @group Math
|
|
403
|
+
* @group Easing
|
|
404
|
+
* @group Animation
|
|
405
|
+
*/
|
|
406
|
+
export const easeFromTo = (position) => {
|
|
407
|
+
if ((position /= 0.5) < 1) {
|
|
408
|
+
return 0.5 * Math.pow(position, 4);
|
|
409
|
+
}
|
|
410
|
+
return -0.5 * ((position -= 2) * Math.pow(position, 3) - 2);
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* Calculates an easing multiplier for: Simple In
|
|
414
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
415
|
+
* @returns The easing multiplier for the position.
|
|
416
|
+
* @group Math
|
|
417
|
+
* @group Easing
|
|
418
|
+
* @group Animation
|
|
419
|
+
*/
|
|
420
|
+
export const easeFrom = (position) => {
|
|
421
|
+
return Math.pow(position, 4);
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* Calculates an easing multiplier for: Simple Out
|
|
425
|
+
* @param position - The current position between start and end (from `0` to `1`)
|
|
426
|
+
* @returns The easing multiplier for the position.
|
|
427
|
+
* @group Math
|
|
428
|
+
* @group Easing
|
|
429
|
+
* @group Animation
|
|
430
|
+
*/
|
|
431
|
+
export const easeTo = (position) => {
|
|
432
|
+
return Math.pow(position, 0.25);
|
|
433
|
+
};
|
|
434
|
+
//# sourceMappingURL=easing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"easing.js","sourceRoot":"","sources":["../../source/math/easing.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAEnD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE;IACrD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAU,EAAE;IACtD,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAU,EAAE;IACxD,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAU,EAAE;IACtD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAgB,EA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
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/math/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED