@oliversalzburg/js-utils 0.6.0 → 0.7.0

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.
Files changed (172) hide show
  1. package/package.json +5 -5
  2. package/lib/async/async.d.ts +0 -44
  3. package/lib/async/async.js +0 -76
  4. package/lib/async/async.js.map +0 -1
  5. package/lib/async/async.test.d.ts +0 -1
  6. package/lib/async/async.test.js +0 -26
  7. package/lib/async/async.test.js.map +0 -1
  8. package/lib/core.d.ts +0 -43
  9. package/lib/core.js +0 -2
  10. package/lib/core.js.map +0 -1
  11. package/lib/data/array.d.ts +0 -45
  12. package/lib/data/array.js +0 -70
  13. package/lib/data/array.js.map +0 -1
  14. package/lib/data/nil.d.ts +0 -92
  15. package/lib/data/nil.js +0 -131
  16. package/lib/data/nil.js.map +0 -1
  17. package/lib/data/random.d.ts +0 -111
  18. package/lib/data/random.js +0 -377
  19. package/lib/data/random.js.map +0 -1
  20. package/lib/data/string.d.ts +0 -30
  21. package/lib/data/string.js +0 -52
  22. package/lib/data/string.js.map +0 -1
  23. package/lib/data/tree.d.ts +0 -28
  24. package/lib/data/tree.js +0 -45
  25. package/lib/data/tree.js.map +0 -1
  26. package/lib/device/shake.d.ts +0 -79
  27. package/lib/device/shake.js +0 -135
  28. package/lib/device/shake.js.map +0 -1
  29. package/lib/dom/core.d.ts +0 -21
  30. package/lib/dom/core.js +0 -41
  31. package/lib/dom/core.js.map +0 -1
  32. package/lib/errors/AbstractError.d.ts +0 -29
  33. package/lib/errors/AbstractError.js +0 -59
  34. package/lib/errors/AbstractError.js.map +0 -1
  35. package/lib/errors/InternalError.d.ts +0 -19
  36. package/lib/errors/InternalError.js +0 -38
  37. package/lib/errors/InternalError.js.map +0 -1
  38. package/lib/errors/InvalidArgumentError.d.ts +0 -13
  39. package/lib/errors/InvalidArgumentError.js +0 -22
  40. package/lib/errors/InvalidArgumentError.js.map +0 -1
  41. package/lib/errors/InvalidOperationError.d.ts +0 -13
  42. package/lib/errors/InvalidOperationError.js +0 -22
  43. package/lib/errors/InvalidOperationError.js.map +0 -1
  44. package/lib/errors/NotImplementedError.d.ts +0 -12
  45. package/lib/errors/NotImplementedError.js +0 -21
  46. package/lib/errors/NotImplementedError.js.map +0 -1
  47. package/lib/errors/PermissionViolationError.d.ts +0 -13
  48. package/lib/errors/PermissionViolationError.js +0 -22
  49. package/lib/errors/PermissionViolationError.js.map +0 -1
  50. package/lib/errors/ResourceConflictError.d.ts +0 -12
  51. package/lib/errors/ResourceConflictError.js +0 -21
  52. package/lib/errors/ResourceConflictError.js.map +0 -1
  53. package/lib/errors/UnknownError.d.ts +0 -16
  54. package/lib/errors/UnknownError.js +0 -25
  55. package/lib/errors/UnknownError.js.map +0 -1
  56. package/lib/errors/console.d.ts +0 -7
  57. package/lib/errors/console.js +0 -13
  58. package/lib/errors/console.js.map +0 -1
  59. package/lib/errors/error-serializer.d.ts +0 -45
  60. package/lib/errors/error-serializer.js +0 -71
  61. package/lib/errors/error-serializer.js.map +0 -1
  62. package/lib/errors/error-serializer.test.d.ts +0 -1
  63. package/lib/errors/error-serializer.test.js +0 -109
  64. package/lib/errors/error-serializer.test.js.map +0 -1
  65. package/lib/errors/stream.d.ts +0 -7
  66. package/lib/errors/stream.js +0 -15
  67. package/lib/errors/stream.js.map +0 -1
  68. package/lib/errors/tools.d.ts +0 -10
  69. package/lib/errors/tools.js +0 -13
  70. package/lib/errors/tools.js.map +0 -1
  71. package/lib/events/event.d.ts +0 -9
  72. package/lib/events/event.js +0 -10
  73. package/lib/events/event.js.map +0 -1
  74. package/lib/format/bytes.d.ts +0 -118
  75. package/lib/format/bytes.js +0 -99
  76. package/lib/format/bytes.js.map +0 -1
  77. package/lib/format/bytes.test.d.ts +0 -1
  78. package/lib/format/bytes.test.js +0 -138
  79. package/lib/format/bytes.test.js.map +0 -1
  80. package/lib/format/count.d.ts +0 -14
  81. package/lib/format/count.js +0 -50
  82. package/lib/format/count.js.map +0 -1
  83. package/lib/format/count.test.d.ts +0 -1
  84. package/lib/format/count.test.js +0 -42
  85. package/lib/format/count.test.js.map +0 -1
  86. package/lib/format/milliseconds.d.ts +0 -100
  87. package/lib/format/milliseconds.js +0 -192
  88. package/lib/format/milliseconds.js.map +0 -1
  89. package/lib/format/milliseconds.test.d.ts +0 -1
  90. package/lib/format/milliseconds.test.js +0 -343
  91. package/lib/format/milliseconds.test.js.map +0 -1
  92. package/lib/format/string.d.ts +0 -24
  93. package/lib/format/string.js +0 -30
  94. package/lib/format/string.js.map +0 -1
  95. package/lib/format/string.test.d.ts +0 -1
  96. package/lib/format/string.test.js +0 -17
  97. package/lib/format/string.test.js.map +0 -1
  98. package/lib/graphics/canvas-sandbox-mp.d.ts +0 -258
  99. package/lib/graphics/canvas-sandbox-mp.js +0 -279
  100. package/lib/graphics/canvas-sandbox-mp.js.map +0 -1
  101. package/lib/graphics/canvas-sandbox.d.ts +0 -255
  102. package/lib/graphics/canvas-sandbox.js +0 -361
  103. package/lib/graphics/canvas-sandbox.js.map +0 -1
  104. package/lib/graphics/canvas.d.ts +0 -57
  105. package/lib/graphics/canvas.js +0 -37
  106. package/lib/graphics/canvas.js.map +0 -1
  107. package/lib/graphics/canvas2d-headless.d.ts +0 -85
  108. package/lib/graphics/canvas2d-headless.js +0 -193
  109. package/lib/graphics/canvas2d-headless.js.map +0 -1
  110. package/lib/graphics/canvas2d.d.ts +0 -162
  111. package/lib/graphics/canvas2d.js +0 -328
  112. package/lib/graphics/canvas2d.js.map +0 -1
  113. package/lib/graphics/canvas3d.d.ts +0 -41
  114. package/lib/graphics/canvas3d.js +0 -67
  115. package/lib/graphics/canvas3d.js.map +0 -1
  116. package/lib/graphics/color.d.ts +0 -22
  117. package/lib/graphics/color.js +0 -42
  118. package/lib/graphics/color.js.map +0 -1
  119. package/lib/graphics/core.d.ts +0 -89
  120. package/lib/graphics/core.js +0 -146
  121. package/lib/graphics/core.js.map +0 -1
  122. package/lib/graphics/palette-sampler.d.ts +0 -7
  123. package/lib/graphics/palette-sampler.js +0 -21
  124. package/lib/graphics/palette-sampler.js.map +0 -1
  125. package/lib/graphics/palette.d.ts +0 -120
  126. package/lib/graphics/palette.js +0 -494
  127. package/lib/graphics/palette.js.map +0 -1
  128. package/lib/graphics/palette.test.d.ts +0 -1
  129. package/lib/graphics/palette.test.js +0 -43
  130. package/lib/graphics/palette.test.js.map +0 -1
  131. package/lib/graphics/render-loop.d.ts +0 -80
  132. package/lib/graphics/render-loop.js +0 -120
  133. package/lib/graphics/render-loop.js.map +0 -1
  134. package/lib/graphics/shader.d.ts +0 -56
  135. package/lib/graphics/shader.js +0 -80
  136. package/lib/graphics/shader.js.map +0 -1
  137. package/lib/log/log.d.ts +0 -11
  138. package/lib/log/log.js +0 -2
  139. package/lib/log/log.js.map +0 -1
  140. package/lib/log/report.d.ts +0 -57
  141. package/lib/log/report.js +0 -88
  142. package/lib/log/report.js.map +0 -1
  143. package/lib/math/core.d.ts +0 -85
  144. package/lib/math/core.js +0 -125
  145. package/lib/math/core.js.map +0 -1
  146. package/lib/math/easing.d.ts +0 -204
  147. package/lib/math/easing.js +0 -332
  148. package/lib/math/easing.js.map +0 -1
  149. package/lib/math/euler.d.ts +0 -18
  150. package/lib/math/euler.js +0 -22
  151. package/lib/math/euler.js.map +0 -1
  152. package/lib/math/matrix3.d.ts +0 -217
  153. package/lib/math/matrix3.js +0 -508
  154. package/lib/math/matrix3.js.map +0 -1
  155. package/lib/math/quaternion.d.ts +0 -119
  156. package/lib/math/quaternion.js +0 -270
  157. package/lib/math/quaternion.js.map +0 -1
  158. package/lib/math/transformation.d.ts +0 -26
  159. package/lib/math/transformation.js +0 -31
  160. package/lib/math/transformation.js.map +0 -1
  161. package/lib/math/vector2.d.ts +0 -202
  162. package/lib/math/vector2.js +0 -310
  163. package/lib/math/vector2.js.map +0 -1
  164. package/lib/math/vector3.d.ts +0 -293
  165. package/lib/math/vector3.js +0 -492
  166. package/lib/math/vector3.js.map +0 -1
  167. package/lib/math/vector4.d.ts +0 -182
  168. package/lib/math/vector4.js +0 -302
  169. package/lib/math/vector4.js.map +0 -1
  170. package/lib/measurement/performance.d.ts +0 -13
  171. package/lib/measurement/performance.js +0 -19
  172. package/lib/measurement/performance.js.map +0 -1
@@ -1,302 +0,0 @@
1
- /**
2
- * A vector with 4 components, labeled: `X`, `Y`, `Z`, `W`.
3
- */
4
- export class Vector4 {
5
- /**
6
- * The components of the vector.
7
- */
8
- k = [0, 0, 0, 0];
9
- /**
10
- * Get the X component of the vector.
11
- * @returns The X component of the vector.
12
- */
13
- get x() {
14
- return this.k[0];
15
- }
16
- /**
17
- * Set the X component of the vector.
18
- */
19
- set x(value) {
20
- this.k[0] = value;
21
- }
22
- /**
23
- * Get the Y component of the vector.
24
- * @returns The Y component of the vector.
25
- */
26
- get y() {
27
- return this.k[1];
28
- }
29
- /**
30
- * Set the Y component of the vector.
31
- */
32
- set y(value) {
33
- this.k[1] = value;
34
- }
35
- /**
36
- * Get the Z component of the vector.
37
- * @returns The Z component of the vector.
38
- */
39
- get z() {
40
- return this.k[2];
41
- }
42
- /**
43
- * Set the Z component of the vector.
44
- */
45
- set z(value) {
46
- this.k[2] = value;
47
- }
48
- /**
49
- * Get the W component of the vector.
50
- * @returns The W component of the vector.
51
- */
52
- get w() {
53
- return this.k[3];
54
- }
55
- /**
56
- * Set the W component of the vector.
57
- */
58
- set w(value) {
59
- this.k[3] = value;
60
- }
61
- /**
62
- * Constructs a new {@linkcode Vector4}.
63
- * @param x - The X component.
64
- * @param y - The Y component.
65
- * @param z - The Z component.
66
- * @param w - The W component.
67
- */
68
- constructor(x, y, z, w) {
69
- this.x = x;
70
- this.y = y;
71
- this.z = z;
72
- this.w = w;
73
- }
74
- /**
75
- * Creates a copy of another {@linkcode Vector4}.
76
- * @param vector - The vector to copy.
77
- * @returns A new vector.
78
- */
79
- static fromVector4(vector) {
80
- return new Vector4(vector.x, vector.y, vector.z, vector.w);
81
- }
82
- /**
83
- * Sets the vector to new coordinates.
84
- * @param vector - The coordinates to set the vector to.
85
- * @returns This instance.
86
- */
87
- set(vector) {
88
- return this.setXYZW(vector.x, vector.y, vector.z, vector.w);
89
- }
90
- /**
91
- * Sets the vector to new coordinates.
92
- * @param x - The new X component for the vector.
93
- * @param y - The new Y component for the vector.
94
- * @param z - The new Z component for the vector.
95
- * @param w - The new W component for the vector.
96
- * @returns This instance.
97
- */
98
- setXYZW(x, y, z, w) {
99
- this.x = x;
100
- this.y = y;
101
- this.z = z;
102
- this.w = w;
103
- return this;
104
- }
105
- /**
106
- * Adds the XYZ components of another vector to this vector.
107
- * @param vector - The vector to add to this vector.
108
- * @returns This instance.
109
- */
110
- add3(vector) {
111
- return this.add3XYZ(vector.x, vector.y, vector.z);
112
- }
113
- /**
114
- * Adds the XYZ components of another vector to this vector.
115
- * @param x - The value to add to the X component.
116
- * @param y - The value to add to the Y component.
117
- * @param z - The value to add to the Z component.
118
- * @returns This instance.
119
- */
120
- add3XYZ(x, y, z) {
121
- this.x += x;
122
- this.y += y;
123
- this.z += z;
124
- return this;
125
- }
126
- /**
127
- * Scales another vector and adds its XYZ components to this vector.
128
- * @param vector - The vector to add to this vector.
129
- * @param scale - The scaling to apply to the input vector.
130
- * @returns This instance.
131
- */
132
- addMultiply3(vector, scale) {
133
- return this.addMultiply3XYZ(vector.x, vector.y, vector.z, scale);
134
- }
135
- /**
136
- * Scales another vector and adds its XYZ components to this vector.
137
- * @param x - The value to add to the X component.
138
- * @param y - The value to add to the Y component.
139
- * @param z - The value to add to the Z component.
140
- * @param scale - The scaling to apply to the input vector.
141
- * @returns This instance.
142
- */
143
- addMultiply3XYZ(x, y, z, scale) {
144
- this.x += x * scale;
145
- this.y += y * scale;
146
- this.z += z * scale;
147
- return this;
148
- }
149
- /**
150
- * Subtracts the XYZ components of another vector from this vector.
151
- * @param vector - The vector to subtract from this vector.
152
- * @returns This instance.
153
- */
154
- subtract3(vector) {
155
- return this.subtract3XYZ(vector.x, vector.y, vector.z);
156
- }
157
- /**
158
- * Subtracts the XYZ components of another vector from this vector.
159
- * @param x - The value to subtract from the X component.
160
- * @param y - The value to subtract from the Y component.
161
- * @param z - The value to subtract from the Z component.
162
- * @returns This instance.
163
- */
164
- subtract3XYZ(x, y, z) {
165
- this.x -= x;
166
- this.y -= y;
167
- this.z -= z;
168
- return this;
169
- }
170
- /**
171
- * Multiplies the XYZ components of this vector by another vector.
172
- * @param vector - The vector to multiply with this vector.
173
- * @returns This instance.
174
- */
175
- multiply3(vector) {
176
- return this.multiply3XYZ(vector.x, vector.y, vector.z);
177
- }
178
- /**
179
- * Multiplies the XYZ components of this vector by another vector.
180
- * @param x - The value to multiply with the X component.
181
- * @param y - The value to multiply with the Y component.
182
- * @param z - The value to multiply with the Z component.
183
- * @returns This instance.
184
- */
185
- multiply3XYZ(x, y, z) {
186
- this.x *= x;
187
- this.y *= y;
188
- this.z *= z;
189
- return this;
190
- }
191
- /**
192
- * Multiplies the XYZ components of the vector by the given scale.
193
- * @param scale - The scaling to apply to the vector.
194
- * @returns This instance.
195
- */
196
- multiply3Scale(scale) {
197
- this.x *= scale;
198
- this.y *= scale;
199
- this.z *= scale;
200
- return this;
201
- }
202
- /**
203
- * Divides the XYZ components of this vector by another vector.
204
- * @param vector - The vector to divide this vector with.
205
- * @returns This instance.
206
- */
207
- divide3(vector) {
208
- return this.divide3XYZ(vector.x, vector.y, vector.z);
209
- }
210
- /**
211
- * Divides the XYZ components of this vector by another vector.
212
- * @param x - The value to divide the X component with.
213
- * @param y - The value to divide the Y component with.
214
- * @param z - The value to divide the Z component with.
215
- * @returns This instance.
216
- */
217
- divide3XYZ(x, y, z) {
218
- this.x /= x;
219
- this.y /= y;
220
- this.z /= z;
221
- return this;
222
- }
223
- /**
224
- * Divides the XYZ components of the vector by the given scale.
225
- * @param scale - The scaling to apply to the vector.
226
- * @returns This instance.
227
- */
228
- divide3Scale(scale) {
229
- this.x /= scale;
230
- this.y /= scale;
231
- this.z /= scale;
232
- return this;
233
- }
234
- /**
235
- * Inverts the direction of the vector.
236
- * @returns This instance.
237
- */
238
- invertAdd3() {
239
- this.x = -this.x;
240
- this.y = -this.y;
241
- this.z = -this.z;
242
- return this;
243
- }
244
- /**
245
- * Inverts the vectors scale.
246
- * @returns This instance.
247
- */
248
- invertMultiply3() {
249
- this.x = 1 / this.x;
250
- this.y = 1 / this.y;
251
- this.z = 1 / this.z;
252
- return this;
253
- }
254
- /**
255
- * Clamps the components of the vector at the given boundary.
256
- * @param floor - The lowest value to allow.
257
- * @param ceil - The largest value to allow.
258
- * @returns This instance.
259
- */
260
- clamp(floor, ceil) {
261
- if (this.x < floor) {
262
- this.x = floor;
263
- }
264
- if (this.x > ceil) {
265
- this.x = ceil;
266
- }
267
- if (this.y < floor) {
268
- this.y = floor;
269
- }
270
- if (this.y > ceil) {
271
- this.y = ceil;
272
- }
273
- if (this.z < floor) {
274
- this.z = floor;
275
- }
276
- if (this.z > ceil) {
277
- this.z = ceil;
278
- }
279
- if (this.w < floor) {
280
- this.w = floor;
281
- }
282
- if (this.w > ceil) {
283
- this.w = ceil;
284
- }
285
- return this;
286
- }
287
- /**
288
- * Linearly moves this vector towards a target vector.
289
- * @param vector - The target vector.
290
- * @param t - The location on the scale, from `0` to `1`.
291
- * @returns This instance.
292
- */
293
- lerp(vector, t) {
294
- const tn = 1 - t;
295
- this.x = this.x * tn + vector.x * t;
296
- this.y = this.y * tn + vector.y * t;
297
- this.z = this.z * tn + vector.z * t;
298
- this.w = this.z * tn + vector.w * t;
299
- return this;
300
- }
301
- }
302
- //# sourceMappingURL=vector4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vector4.js","sourceRoot":"","sources":["../../source/math/vector4.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,OAAO;IAClB;;OAEG;IACH,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjB;;;OAGG;IACH,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,CAAC,CAAC,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2
- /**
3
- * Executes the given function and measures how long the execution takes.
4
- * @param context - The function of which the execution speed should be measured.
5
- * @returns A tuple with the result of the function, and the execution time in milliseconds.
6
- */
7
- export declare const measure: <TReturn>(context: AnyFunctionReturning<TReturn>) => [TReturn, number];
8
- /**
9
- * Executes the given async function and measures how long the execution takes.
10
- * @param context - The async function of which the execution speed should be measured.
11
- * @returns A tuple with the result of the function, and the execution time in milliseconds.
12
- */
13
- export declare const measureAsync: <TReturn>(context: AnyAsyncFunctionReturning<TReturn>) => Promise<[TReturn, number]>;
@@ -1,19 +0,0 @@
1
- /**
2
- * Executes the given function and measures how long the execution takes.
3
- * @param context - The function of which the execution speed should be measured.
4
- * @returns A tuple with the result of the function, and the execution time in milliseconds.
5
- */
6
- export const measure = (context) => {
7
- const entry = performance.now();
8
- return [context(), performance.now() - entry];
9
- };
10
- /**
11
- * Executes the given async function and measures how long the execution takes.
12
- * @param context - The async function of which the execution speed should be measured.
13
- * @returns A tuple with the result of the function, and the execution time in milliseconds.
14
- */
15
- export const measureAsync = async (context) => {
16
- const entry = performance.now();
17
- return [await context(), performance.now() - entry];
18
- };
19
- //# sourceMappingURL=performance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"performance.js","sourceRoot":"","sources":["../../source/measurement/performance.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAU,OAAsC,EAAqB,EAAE;IAC5F,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAChC,OAAO,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,OAA2C,EACf,EAAE;IAC9B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAChC,OAAO,CAAC,MAAM,OAAO,EAAE,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC"}