@oliversalzburg/js-utils 0.0.27-dev.1 → 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/device/index.d.ts +1 -0
- package/device/index.js +2 -0
- package/device/index.js.map +1 -0
- package/device/shake.d.ts +92 -0
- package/device/shake.js +136 -0
- package/device/shake.js.map +1 -0
- package/dom/core.js +1 -1
- package/dom/core.js.map +1 -1
- package/error/AbstractError.js.map +1 -0
- package/error/InternalError.js.map +1 -0
- package/error/InvalidArgumentError.js.map +1 -0
- package/error/InvalidOperationError.js.map +1 -0
- package/error/NotImplementedError.js.map +1 -0
- package/error/PermissionViolationError.js.map +1 -0
- package/error/ResourceConflictError.js.map +1 -0
- package/error/UnknownError.js.map +1 -0
- package/error/index.js.map +1 -0
- package/error-serializer.d.ts +2 -1
- package/error-serializer.js +3 -3
- package/error-serializer.js.map +1 -1
- package/error-serializer.test.js +2 -2
- package/error-serializer.test.js.map +1 -1
- package/event.d.ts +11 -0
- package/event.js +11 -0
- package/event.js.map +1 -0
- package/graphics/canvas-sandbox.d.ts +9 -0
- package/graphics/canvas-sandbox.js +44 -9
- package/graphics/canvas-sandbox.js.map +1 -1
- package/graphics/canvas2d.js +1 -1
- package/graphics/canvas2d.js.map +1 -1
- package/graphics/canvas3d.js +1 -1
- package/graphics/canvas3d.js.map +1 -1
- package/graphics/shader.js +1 -1
- package/graphics/shader.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/log/report.js +1 -1
- package/log/report.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 +3 -3
- package/errors/AbstractError.js.map +0 -1
- package/errors/InternalError.js.map +0 -1
- package/errors/InvalidArgumentError.js.map +0 -1
- package/errors/InvalidOperationError.js.map +0 -1
- package/errors/NotImplementedError.js.map +0 -1
- package/errors/PermissionViolationError.js.map +0 -1
- package/errors/ResourceConflictError.js.map +0 -1
- package/errors/UnknownError.js.map +0 -1
- package/errors/index.js.map +0 -1
- /package/{errors → error}/AbstractError.d.ts +0 -0
- /package/{errors → error}/AbstractError.js +0 -0
- /package/{errors → error}/InternalError.d.ts +0 -0
- /package/{errors → error}/InternalError.js +0 -0
- /package/{errors → error}/InvalidArgumentError.d.ts +0 -0
- /package/{errors → error}/InvalidArgumentError.js +0 -0
- /package/{errors → error}/InvalidOperationError.d.ts +0 -0
- /package/{errors → error}/InvalidOperationError.js +0 -0
- /package/{errors → error}/NotImplementedError.d.ts +0 -0
- /package/{errors → error}/NotImplementedError.js +0 -0
- /package/{errors → error}/PermissionViolationError.d.ts +0 -0
- /package/{errors → error}/PermissionViolationError.js +0 -0
- /package/{errors → error}/ResourceConflictError.d.ts +0 -0
- /package/{errors → error}/ResourceConflictError.js +0 -0
- /package/{errors → error}/UnknownError.d.ts +0 -0
- /package/{errors → error}/UnknownError.js +0 -0
- /package/{errors → error}/index.d.ts +0 -0
- /package/{errors → error}/index.js +0 -0
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.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C,GAAG,CAAC,MAAM,GAAG,CAAC,QAAQ,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE;IACrD,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,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAU,EAAE;IACnD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,QAAgB,EAAU,EAAE;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC"}
|
package/math/index.d.ts
CHANGED
package/math/index.js
CHANGED
package/math/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@oliversalzburg/js-utils",
|
|
4
|
-
"version": "0.0.27-dev.
|
|
4
|
+
"version": "0.0.27-dev.11",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Oliver Salzburg <oliver.salzburg@gmail.com>",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/eslint": "8.44.8",
|
|
36
36
|
"@types/mocha": "10.0.6",
|
|
37
37
|
"@types/node": "20.10.4",
|
|
38
|
-
"@types/web": "0.0.
|
|
38
|
+
"@types/web": "0.0.126",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "6.13.2",
|
|
40
40
|
"@typescript-eslint/parser": "6.13.2",
|
|
41
41
|
"c8": "8.0.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
52
52
|
"typedoc": "0.25.4",
|
|
53
53
|
"typedoc-plugin-extras": "3.0.0",
|
|
54
|
-
"typedoc-plugin-mdn-links": "3.1.
|
|
54
|
+
"typedoc-plugin-mdn-links": "3.1.7",
|
|
55
55
|
"typescript": "5.3.3"
|
|
56
56
|
},
|
|
57
57
|
"packageManager": "yarn@4.0.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractError.js","sourceRoot":"","sources":["../../source/errors/AbstractError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC;;OAEG;IACH,MAAM,CAAS;IAEf;;OAEG;IACH,IAAI,CAAS;IAEb;;;;;OAKG;IACH,YAAY,IAAY,EAAE,OAAe,EAAE,MAAc;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qGAAqG;YACrG,yCAAyC;YACzC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CAAC,KAAc,EAAE,kBAAkB,GAAG,IAAI;QAC9D,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,gEAAgE;QAChE,sEAAsE;QACtE,cAAc;QACd,IAAI,kBAAkB,EAAE,CAAC;YACvB,MAAM,WAAW,GAAG,KAAgC,CAAC;YACrD,IACE,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK;gBACvB,MAAM,IAAI,WAAW;gBACrB,OAAO,WAAW,CAAC,IAAI,KAAK,QAAQ,EACpC,CAAC;gBACD,MAAM,UAAU,GAAG,KAAyB,CAAC;gBAC7C,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;oBACtC,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InternalError.js","sourceRoot":"","sources":["../../source/errors/InternalError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAa;IAC9C;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAM,GAAG,GAAG;QACvC,KAAK,CAAC,iBAAiB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAE1C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAE5B,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,KAAY;QAC3B,wEAAwE;QACxE,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvD,kEAAkE;QAClE,mEAAmE;QACnE,0BAA0B;QAC1B,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACtE,0CAA0C;QAC1C,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,OAAO,aAAa,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidArgumentError.js","sourceRoot":"","sources":["../../source/errors/InvalidArgumentError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAM,GAAG,GAAG;QACvC,KAAK,CAAC,yBAAyB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAElD,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QAEnC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidOperationError.js","sourceRoot":"","sources":["../../source/errors/InvalidOperationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAM,GAAG,GAAG;QACvC,KAAK,CAAC,0BAA0B,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QAEpC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotImplementedError.js","sourceRoot":"","sources":["../../source/errors/NotImplementedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IACpD;;;;OAIG;IACH,YAAY,OAAO,GAAG,kBAAkB,EAAE,MAAM,GAAG,GAAG;QACpD,KAAK,CAAC,wBAAwB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAEjD,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAElC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionViolationError.js","sourceRoot":"","sources":["../../source/errors/PermissionViolationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,OAAO,wBAAyB,SAAQ,aAAa;IACzD;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAM,GAAG,GAAG;QACvC,KAAK,CAAC,6BAA6B,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAEtD,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QAEvC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceConflictError.js","sourceRoot":"","sources":["../../source/errors/ResourceConflictError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,aAAa;IACtD;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAM,GAAG,GAAG;QACvC,KAAK,CAAC,0BAA0B,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAEnD,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QAEpC,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownError.js","sourceRoot":"","sources":["../../source/errors/UnknownError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC7C;;;;OAIG;IACH,YAAY,OAAe,EAAE,MAAM,GAAG,GAAG;QACvC,KAAK,CAAC,gBAAgB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAEzC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAE3B,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,WAAW,EAAE,CAAC;YACnD,qEAAqE;YACrE,yEAAyE;YACzE,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF"}
|
package/errors/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|