@benev/math 0.3.0-2 → 0.3.0-3

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 (98) hide show
  1. package/package.json +1 -1
  2. package/x/index.d.ts +1 -0
  3. package/x/index.js +1 -0
  4. package/x/index.js.map +1 -1
  5. package/x/tools/make-noise.d.ts +2 -0
  6. package/x/tools/make-noise.js +9 -0
  7. package/x/tools/make-noise.js.map +1 -0
  8. package/x/concepts/angles.d.ts +0 -29
  9. package/x/concepts/angles.js +0 -62
  10. package/x/concepts/angles.js.map +0 -1
  11. package/x/concepts/circular.d.ts +0 -17
  12. package/x/concepts/circular.js +0 -70
  13. package/x/concepts/circular.js.map +0 -1
  14. package/x/concepts/noise.d.ts +0 -9
  15. package/x/concepts/noise.js +0 -20
  16. package/x/concepts/noise.js.map +0 -1
  17. package/x/concepts/quat.d.ts +0 -35
  18. package/x/concepts/quat.js +0 -110
  19. package/x/concepts/quat.js.map +0 -1
  20. package/x/concepts/randy.d.ts +0 -39
  21. package/x/concepts/randy.js +0 -95
  22. package/x/concepts/randy.js.map +0 -1
  23. package/x/concepts/scalar.d.ts +0 -51
  24. package/x/concepts/scalar.js +0 -219
  25. package/x/concepts/scalar.js.map +0 -1
  26. package/x/concepts/spline.d.ts +0 -9
  27. package/x/concepts/spline.js +0 -59
  28. package/x/concepts/spline.js.map +0 -1
  29. package/x/concepts/vec2.d.ts +0 -114
  30. package/x/concepts/vec2.js +0 -314
  31. package/x/concepts/vec2.js.map +0 -1
  32. package/x/concepts/vec3.d.ts +0 -117
  33. package/x/concepts/vec3.js +0 -357
  34. package/x/concepts/vec3.js.map +0 -1
  35. package/x/concepts/vec4.d.ts +0 -21
  36. package/x/concepts/vec4.js +0 -62
  37. package/x/concepts/vec4.js.map +0 -1
  38. package/x/helpers/angles.d.ts +0 -19
  39. package/x/helpers/angles.js +0 -41
  40. package/x/helpers/angles.js.map +0 -1
  41. package/x/helpers/circular.d.ts +0 -17
  42. package/x/helpers/circular.js +0 -71
  43. package/x/helpers/circular.js.map +0 -1
  44. package/x/helpers/noise.d.ts +0 -9
  45. package/x/helpers/noise.js +0 -20
  46. package/x/helpers/noise.js.map +0 -1
  47. package/x/helpers/randy.d.ts +0 -31
  48. package/x/helpers/randy.js +0 -85
  49. package/x/helpers/randy.js.map +0 -1
  50. package/x/helpers/scalar.d.ts +0 -51
  51. package/x/helpers/scalar.js +0 -219
  52. package/x/helpers/scalar.js.map +0 -1
  53. package/x/helpers/spline.d.ts +0 -9
  54. package/x/helpers/spline.js +0 -61
  55. package/x/helpers/spline.js.map +0 -1
  56. package/x/importmap.json +0 -7
  57. package/x/primitives/circular.d.ts +0 -17
  58. package/x/primitives/circular.js +0 -70
  59. package/x/primitives/circular.js.map +0 -1
  60. package/x/primitives/quat.d.ts +0 -35
  61. package/x/primitives/quat.js +0 -110
  62. package/x/primitives/quat.js.map +0 -1
  63. package/x/primitives/scalar.d.ts +0 -51
  64. package/x/primitives/scalar.js +0 -219
  65. package/x/primitives/scalar.js.map +0 -1
  66. package/x/primitives/vec2.d.ts +0 -114
  67. package/x/primitives/vec2.js +0 -319
  68. package/x/primitives/vec2.js.map +0 -1
  69. package/x/primitives/vec3.d.ts +0 -117
  70. package/x/primitives/vec3.js +0 -363
  71. package/x/primitives/vec3.js.map +0 -1
  72. package/x/primitives/vec4.d.ts +0 -21
  73. package/x/primitives/vec4.js +0 -62
  74. package/x/primitives/vec4.js.map +0 -1
  75. package/x/tools/circular.d.ts +0 -17
  76. package/x/tools/circular.js +0 -71
  77. package/x/tools/circular.js.map +0 -1
  78. package/x/tools/scalar.d.ts +0 -51
  79. package/x/tools/scalar.js +0 -219
  80. package/x/tools/scalar.js.map +0 -1
  81. package/x/utils/angles.d.ts +0 -19
  82. package/x/utils/angles.js +0 -41
  83. package/x/utils/angles.js.map +0 -1
  84. package/x/utils/circular.d.ts +0 -17
  85. package/x/utils/circular.js +0 -70
  86. package/x/utils/circular.js.map +0 -1
  87. package/x/utils/noise.d.ts +0 -9
  88. package/x/utils/noise.js +0 -20
  89. package/x/utils/noise.js.map +0 -1
  90. package/x/utils/randy.d.ts +0 -31
  91. package/x/utils/randy.js +0 -85
  92. package/x/utils/randy.js.map +0 -1
  93. package/x/utils/scalar.d.ts +0 -51
  94. package/x/utils/scalar.js +0 -219
  95. package/x/utils/scalar.js.map +0 -1
  96. package/x/utils/spline.d.ts +0 -9
  97. package/x/utils/spline.js +0 -61
  98. package/x/utils/spline.js.map +0 -1
@@ -1,363 +0,0 @@
1
- import { Scalar } from "./scalar.js";
2
- export class Vec3 {
3
- x;
4
- y;
5
- z;
6
- constructor(x, y, z) {
7
- this.x = x;
8
- this.y = y;
9
- this.z = z;
10
- }
11
- ///////////////////////////////////////////////////////////////////////
12
- static new(x, y, z) {
13
- return new this(x, y, z);
14
- }
15
- static zero() {
16
- return new this(0, 0, 0);
17
- }
18
- static all(value) {
19
- return new this(value, value, value);
20
- }
21
- static array(v) {
22
- return new this(...v);
23
- }
24
- static import({ x, y, z }) {
25
- return new this(x, y, z);
26
- }
27
- static from(v) {
28
- return Array.isArray(v)
29
- ? this.array(v)
30
- : this.import(v);
31
- }
32
- static magnitudeSquared(x, y, z) {
33
- return (x ** 2) + (y ** 2) + (z ** 2);
34
- }
35
- static magnitude(x, y, z) {
36
- return Math.sqrt(this.magnitudeSquared(x, y, z));
37
- }
38
- static average(...vecs) {
39
- return this.zero()
40
- .add(...vecs)
41
- .divideBy(vecs.length);
42
- }
43
- static min(...vecs) {
44
- return new Vec3(Math.min(...vecs.map(v => v.x)), Math.min(...vecs.map(v => v.y)), Math.min(...vecs.map(v => v.z)));
45
- }
46
- static max(...vecs) {
47
- return new Vec3(Math.max(...vecs.map(v => v.x)), Math.max(...vecs.map(v => v.y)), Math.max(...vecs.map(v => v.z)));
48
- }
49
- static hexColor(hex) {
50
- if (hex.startsWith("#") && hex.length === 7) {
51
- const r = parseInt(hex.slice(1, 3), 16) / 255;
52
- const g = parseInt(hex.slice(3, 5), 16) / 255;
53
- const b = parseInt(hex.slice(5, 7), 16) / 255;
54
- return new this(r, g, b);
55
- }
56
- else {
57
- throw new Error("invalid hex color format");
58
- }
59
- }
60
- ///////////////////////////////////////////////////////////////////////
61
- clone() {
62
- return new Vec3(this.x, this.y, this.z);
63
- }
64
- array() {
65
- return [this.x, this.y, this.z];
66
- }
67
- toString() {
68
- return `(Vec3 x${this.x.toFixed(2)}, y${this.y.toFixed(2)}, z${this.z.toFixed(2)})`;
69
- }
70
- set_(x, y, z) {
71
- this.x = x;
72
- this.y = y;
73
- this.z = z;
74
- return this;
75
- }
76
- set({ x, y, z }) {
77
- this.x = x;
78
- this.y = y;
79
- this.z = z;
80
- return this;
81
- }
82
- ///////////////////////////////////////////////////////////////////////
83
- magnitudeSquared() {
84
- return Vec3.magnitudeSquared(this.x, this.y, this.z);
85
- }
86
- magnitude() {
87
- return Vec3.magnitude(this.x, this.y, this.z);
88
- }
89
- hexColor() {
90
- const to255 = (val) => Math.round(val * 255);
91
- const toHex = (val) => to255(val).toString(16).padStart(2, '0');
92
- return `#${toHex(this.x)}${toHex(this.y)}${toHex(this.z)}`;
93
- }
94
- ///////////////////////////////////////////////////////////////////////
95
- equals_(x, y, z) {
96
- return (this.x === x &&
97
- this.y === y &&
98
- this.z === z);
99
- }
100
- equals(...vecs) {
101
- return vecs.every(v => this.equals_(v.x, v.y, v.z));
102
- }
103
- distanceSquared_(x, y, z) {
104
- const dx = this.x - x;
105
- const dy = this.y - y;
106
- const dz = this.z - z;
107
- return (dx ** 2) + (dy ** 2) + (dz ** 2);
108
- }
109
- distanceSquared({ x, y, z }) {
110
- return this.distanceSquared_(x, y, z);
111
- }
112
- distance_(x, y, z) {
113
- return Math.sqrt(this.distanceSquared_(x, y, z));
114
- }
115
- distance({ x, y, z }) {
116
- return this.distance_(x, y, z);
117
- }
118
- dot_(x, y, z) {
119
- return (this.x * x) + (this.y * y) + (this.z * z);
120
- }
121
- dot({ x, y, z }) {
122
- return this.dot_(x, y, z);
123
- }
124
- inRange_(x, y, z, radius) {
125
- const d2 = this.distanceSquared_(x, y, z);
126
- return d2 < (radius ** 2);
127
- }
128
- inRange({ x, y, z }, radius) {
129
- return this.inRange_(x, y, z, radius);
130
- }
131
- angleBetween_(x, y, z) {
132
- const dotProduct = this.dot_(x, y, z);
133
- const magnitudes = this.magnitude() * Vec3.new(x, y, z).magnitude();
134
- if (magnitudes === 0)
135
- return 0;
136
- const ratio = Scalar.clamp(dotProduct / magnitudes, -1, 1);
137
- return Math.acos(ratio);
138
- }
139
- angleBetween({ x, y, z }) {
140
- return this.angleBetween_(x, y, z);
141
- }
142
- ///////////////////////////////////////////////////////////////////////
143
- /** mutator */
144
- add_(x, y, z) {
145
- this.x += x;
146
- this.y += y;
147
- this.z += z;
148
- return this;
149
- }
150
- /** mutator */
151
- add(...vecs) {
152
- for (const { x, y, z } of vecs)
153
- this.add_(x, y, z);
154
- return this;
155
- }
156
- /** mutator */
157
- subtract_(x, y, z) {
158
- this.x -= x;
159
- this.y -= y;
160
- this.z -= z;
161
- return this;
162
- }
163
- /** mutator */
164
- subtract(...vecs) {
165
- for (const { x, y, z } of vecs)
166
- this.subtract_(x, y, z);
167
- return this;
168
- }
169
- /** mutator */
170
- multiply_(x, y, z) {
171
- this.x *= x;
172
- this.y *= y;
173
- this.z *= z;
174
- return this;
175
- }
176
- /** mutator */
177
- multiply(...vecs) {
178
- for (const { x, y, z } of vecs)
179
- this.multiply_(x, y, z);
180
- return this;
181
- }
182
- /** mutator */
183
- divide_(x, y, z) {
184
- if (x !== 0)
185
- this.x /= x;
186
- if (y !== 0)
187
- this.y /= y;
188
- if (z !== 0)
189
- this.z /= z;
190
- return this;
191
- }
192
- /** mutator */
193
- divide(...vecs) {
194
- for (const { x, y, z } of vecs)
195
- this.divide_(x, y, z);
196
- return this;
197
- }
198
- ///////////////////////////////////////////////////////////////////////
199
- /** mutator */
200
- half() {
201
- return this.divideBy(2);
202
- }
203
- /** mutator */
204
- double() {
205
- return this.multiplyBy(2);
206
- }
207
- /** mutator */
208
- abs() {
209
- return this.map(x => Math.abs(x));
210
- }
211
- /** mutator */
212
- map(fn) {
213
- this.x = fn(this.x, 0);
214
- this.y = fn(this.y, 1);
215
- this.z = fn(this.z, 2);
216
- return this;
217
- }
218
- /** mutator */
219
- negate() {
220
- this.x = -this.x;
221
- this.y = -this.y;
222
- this.z = -this.z;
223
- return this;
224
- }
225
- /** mutator */
226
- addBy(delta) {
227
- this.x += delta;
228
- this.y += delta;
229
- this.z += delta;
230
- return this;
231
- }
232
- /** mutator */
233
- multiplyBy(delta) {
234
- this.x *= delta;
235
- this.y *= delta;
236
- this.z *= delta;
237
- return this;
238
- }
239
- /** mutator */
240
- divideBy(divisor) {
241
- if (divisor === 0)
242
- return this;
243
- this.x /= divisor;
244
- this.y /= divisor;
245
- this.z /= divisor;
246
- return this;
247
- }
248
- /** mutator */
249
- normalize() {
250
- return this.divideBy(this.magnitude());
251
- }
252
- /** mutator */
253
- clampMagnitude(max) {
254
- const magnitude = this.magnitude();
255
- if (magnitude > max)
256
- this.normalize().multiplyBy(max);
257
- return this;
258
- }
259
- /** mutator */
260
- floor() {
261
- this.x = Math.floor(this.x);
262
- this.y = Math.floor(this.y);
263
- this.z = Math.floor(this.z);
264
- return this;
265
- }
266
- /** mutator */
267
- ceil() {
268
- this.x = Math.ceil(this.x);
269
- this.y = Math.ceil(this.y);
270
- this.z = Math.ceil(this.z);
271
- return this;
272
- }
273
- /** mutator */
274
- round() {
275
- this.x = Math.round(this.x);
276
- this.y = Math.round(this.y);
277
- this.z = Math.round(this.z);
278
- return this;
279
- }
280
- ///////////////////////////////////////////////////////////////////////
281
- /** mutator */
282
- cross_(x2, y2, z2) {
283
- const { x: x1, y: y1, z: z1 } = this;
284
- this.x = (y1 * z2) - (z1 * y2);
285
- this.y = (z1 * x2) - (x1 * z2);
286
- this.z = (x1 * y2) - (y1 * x2);
287
- return this;
288
- }
289
- /** mutator */
290
- cross({ x, y, z }) {
291
- return this.cross_(x, y, z);
292
- }
293
- /** mutator */
294
- lerp_(x, y, z, fraction) {
295
- this.x += (x - this.x) * fraction;
296
- this.y += (y - this.y) * fraction;
297
- this.z += (z - this.z) * fraction;
298
- return this;
299
- }
300
- /** mutator */
301
- lerp({ x, y, z }, fraction) {
302
- return this.lerp_(x, y, z, fraction);
303
- }
304
- approach_(x, y, z, speed, deltaTime, speedLimit) {
305
- this.x = Scalar.approach(this.x, x, speed, deltaTime, speedLimit);
306
- this.y = Scalar.approach(this.y, y, speed, deltaTime, speedLimit);
307
- this.z = Scalar.approach(this.z, z, speed, deltaTime, speedLimit);
308
- return this;
309
- }
310
- approach({ x, y, z }, speed, deltaTime, speedLimit) {
311
- return this.approach_(x, y, z, speed, deltaTime, speedLimit);
312
- }
313
- /** mutator */
314
- projectOnto_(x, y, z) {
315
- const scalar = this.dot_(x, y, z) / Vec3.magnitudeSquared(x, y, z);
316
- this.x = scalar * x;
317
- this.y = scalar * y;
318
- this.z = scalar * z;
319
- return this;
320
- }
321
- /** mutator */
322
- projectOnto({ x, y, z }) {
323
- return this.projectOnto_(x, y, z);
324
- }
325
- /** mutator */
326
- reflect_(x, y, z) {
327
- const dot = this.dot_(x, y, z) * 2;
328
- this.x -= dot * x;
329
- this.y -= dot * y;
330
- this.z -= dot * z;
331
- return this;
332
- }
333
- /** mutator */
334
- reflect({ x, y, z }) {
335
- return this.reflect_(x, y, z);
336
- }
337
- /** mutator */
338
- rotateAroundAxis_(ux, uy, uz, angle) {
339
- const cos = Math.cos(angle);
340
- const sin = Math.sin(angle);
341
- const { x, y, z } = this;
342
- this.x = (cos + (1 - cos) * ux * ux) * x + ((1 - cos) * ux * uy - uz * sin) * y + ((1 - cos) * ux * uz + uy * sin) * z;
343
- this.y = ((1 - cos) * uy * ux + uz * sin) * x + (cos + (1 - cos) * uy * uy) * y + ((1 - cos) * uy * uz - ux * sin) * z;
344
- this.z = ((1 - cos) * uz * ux - uy * sin) * x + ((1 - cos) * uz * uy + ux * sin) * y + (cos + (1 - cos) * uz * uz) * z;
345
- return this;
346
- }
347
- /** mutator */
348
- rotateAroundAxis({ x, y, z }, angle) {
349
- return this.rotateAroundAxis_(x, y, z, angle);
350
- }
351
- /** mutator */
352
- smooth_(x, y, z, smoothing) {
353
- this.x = Scalar.smooth(this.x, x, smoothing);
354
- this.y = Scalar.smooth(this.y, y, smoothing);
355
- this.z = Scalar.smooth(this.z, z, smoothing);
356
- return this;
357
- }
358
- /** mutator */
359
- smooth({ x, y, z }, smoothing) {
360
- return this.smooth_(x, y, z, smoothing);
361
- }
362
- }
363
- //# sourceMappingURL=vec3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vec3.js","sourceRoot":"","sources":["../../s/primitives/vec3.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAQlC,MAAM,OAAO,IAAI;IAER;IACA;IACA;IAHR,YACQ,CAAS,EACT,CAAS,EACT,CAAS;QAFT,MAAC,GAAD,CAAC,CAAQ;QACT,MAAC,GAAD,CAAC,CAAQ;QACT,MAAC,GAAD,CAAC,CAAQ;IACd,CAAC;IAEJ,uEAAuE;IAEvE,MAAM,CAAC,GAAG,CAAkC,CAAS,EAAE,CAAS,EAAE,CAAS;QAC1E,OAAO,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACzB,CAAC;IAED,MAAM,CAAC,IAAI;QACV,OAAO,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACzB,CAAC;IAED,MAAM,CAAC,GAAG,CAAkC,KAAa;QACxD,OAAO,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IACrC,CAAC;IAED,MAAM,CAAC,KAAK,CAAkC,CAAY;QACzD,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IACtB,CAAC;IAED,MAAM,CAAC,MAAM,CAAkC,EAAC,CAA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IAC9C,CAAC;IAED,cAAc;IACd,OAAO,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,SAAiB;QACzD,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;QAC5C,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;QAC5C,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;QAC5C,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,cAAc;IACd,MAAM,CAAC,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAM,EAAE,SAAiB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAA;IACxC,CAAC;CACD"}
@@ -1,21 +0,0 @@
1
- import { Xyzw } from "./quat.js";
2
- export type Vec4Array = [number, number, number, number];
3
- export declare class Vec4 {
4
- x: number;
5
- y: number;
6
- z: number;
7
- w: number;
8
- constructor(x: number, y: number, z: number, w: number);
9
- static new(x: number, y: number, z: number, w: number): Vec4;
10
- static zero(): Vec4;
11
- static array(v: Vec4Array): Vec4;
12
- static import({ x, y, z, w }: Xyzw): Vec4;
13
- static from(v: Vec4Array | Xyzw): Vec4;
14
- array(): Vec4Array;
15
- toString(): string;
16
- clone(): Vec4;
17
- set_(x: number, y: number, z: number, w: number): this;
18
- set({ x, y, z, w }: Xyzw): this;
19
- /** mutator */
20
- map(fn: (a: number, index: number) => number): this;
21
- }
@@ -1,62 +0,0 @@
1
- export class Vec4 {
2
- x;
3
- y;
4
- z;
5
- w;
6
- constructor(x, y, z, w) {
7
- this.x = x;
8
- this.y = y;
9
- this.z = z;
10
- this.w = w;
11
- }
12
- static new(x, y, z, w) {
13
- return new this(x, y, z, w);
14
- }
15
- static zero() {
16
- return new this(0, 0, 0, 0);
17
- }
18
- static array(v) {
19
- return new this(...v);
20
- }
21
- static import({ x, y, z, w }) {
22
- return new this(x, y, z, w);
23
- }
24
- static from(v) {
25
- return Array.isArray(v)
26
- ? this.array(v)
27
- : this.import(v);
28
- }
29
- array() {
30
- const { x, y, z, w } = this;
31
- return [x, y, z, w];
32
- }
33
- toString() {
34
- return `(Vec4 x${this.x.toFixed(2)}, y${this.y.toFixed(2)}, z${this.z.toFixed(2)}, w${this.w.toFixed(2)})`;
35
- }
36
- clone() {
37
- return new Vec4(...this.array());
38
- }
39
- set_(x, y, z, w) {
40
- this.x = x;
41
- this.y = y;
42
- this.z = z;
43
- this.w = w;
44
- return this;
45
- }
46
- set({ x, y, z, w }) {
47
- this.x = x;
48
- this.y = y;
49
- this.z = z;
50
- this.w = w;
51
- return this;
52
- }
53
- /** mutator */
54
- map(fn) {
55
- this.x = fn(this.x, 0);
56
- this.y = fn(this.y, 1);
57
- this.z = fn(this.z, 2);
58
- this.w = fn(this.w, 3);
59
- return this;
60
- }
61
- }
62
- //# sourceMappingURL=vec4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vec4.js","sourceRoot":"","sources":["../../s/primitives/vec4.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,IAAI;IAER;IACA;IACA;IACA;IAJR,YACQ,CAAS,EACT,CAAS,EACT,CAAS,EACT,CAAS;QAHT,MAAC,GAAD,CAAC,CAAQ;QACT,MAAC,GAAD,CAAC,CAAQ;QACT,MAAC,GAAD,CAAC,CAAQ;QACT,MAAC,GAAD,CAAC,CAAQ;IACd,CAAC;IAEJ,MAAM,CAAC,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;QACpD,OAAO,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAC5B,CAAC;IAED,MAAM,CAAC,I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AA;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,GAAG,CAAC,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAO;QACrB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACV,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,cAAc;IACd,GAAG,CAAC,EAAwC;QAC3C,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACtB,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACtB,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACtB,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACtB,OAAO,IAAI,CAAA;IACZ,CAAC;CACD"}
@@ -1,17 +0,0 @@
1
- export declare class Circular {
2
- x: number;
3
- constructor(x: number);
4
- clone(): Circular;
5
- set(x: number): this;
6
- static value(x: number | Circular): number;
7
- static normalize(x: number): number;
8
- normalize(): this;
9
- static difference(x: number, y: number): number;
10
- difference(y: number | Circular): number;
11
- static lerp(x: number, y: number, fraction: number, max?: number): number;
12
- lerp(y: number | Circular, fraction: number, max?: number): this;
13
- static step(x: number, y: number, delta: number): number;
14
- step(y: number | Circular, delta: number): this;
15
- static approach(x: number, y: number, speed: number, deltaTime: number, speedLimit?: number): number;
16
- approach(y: number | Circular, speed: number, deltaTime: number, speedLimit?: number): this;
17
- }
@@ -1,71 +0,0 @@
1
- import { Scalar } from "./scalar.js";
2
- const circle = 2 * Math.PI;
3
- export class Circular {
4
- x;
5
- constructor(x) {
6
- this.x = x;
7
- }
8
- clone() {
9
- return new Circular(this.x);
10
- }
11
- set(x) {
12
- this.x = x;
13
- return this;
14
- }
15
- static value(x) {
16
- return typeof x === "number"
17
- ? x
18
- : x.x;
19
- }
20
- static normalize(x) {
21
- return Scalar.wrap(x, 0, circle);
22
- }
23
- normalize() {
24
- this.x = Circular.normalize(this.x);
25
- return this;
26
- }
27
- static difference(x, y) {
28
- x = this.normalize(x);
29
- y = this.normalize(y);
30
- let delta = y - x;
31
- if (delta > Math.PI)
32
- delta -= circle;
33
- if (delta < -Math.PI)
34
- delta += circle;
35
- return delta;
36
- }
37
- difference(y) {
38
- return Circular.difference(this.x, Circular.value(y));
39
- }
40
- static lerp(x, y, fraction, max) {
41
- const difference = this.difference(x, y);
42
- let delta = difference * fraction;
43
- if (max !== undefined && Math.abs(delta) > max)
44
- delta = Math.sign(delta) * max;
45
- return this.normalize(x + delta);
46
- }
47
- lerp(y, fraction, max) {
48
- this.x = Circular.lerp(this.x, Circular.value(y), fraction, max);
49
- return this;
50
- }
51
- static step(x, y, delta) {
52
- const difference = this.difference(x, y);
53
- return this.normalize(Math.abs(difference) <= delta
54
- ? y
55
- : x + (Math.sign(difference) * delta));
56
- }
57
- step(y, delta) {
58
- this.x = Circular.step(this.x, Circular.value(y), delta);
59
- return this;
60
- }
61
- static approach(x, y, speed, deltaTime, speedLimit) {
62
- const difference = this.difference(x, y);
63
- const change = Scalar.creep(difference, speed, deltaTime, speedLimit);
64
- return this.normalize(x + change);
65
- }
66
- approach(y, speed, deltaTime, speedLimit) {
67
- this.x = Circular.approach(this.x, Circular.value(y), speed, deltaTime, speedLimit);
68
- return this;
69
- }
70
- }
71
- //# sourceMappingURL=circular.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"circular.js","sourceRoot":"","sources":["../../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AAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACxD,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,SAAiB,EAAE,UAAmB;QAC1F,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACxC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;QACrE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,CAAA;IAClC,CAAC;IAAC,QAAQ,CAAC,CAAoB,EAAE,KAAa,EAAE,SAAiB,EAAE,UAAmB;QACrF,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;QACnF,OAAO,IAAI,CAAA;IACZ,CAAC;CACD"}
@@ -1,51 +0,0 @@
1
- export declare class Scalar {
2
- x: number;
3
- constructor(x: number);
4
- static new(x: number): Scalar;
5
- clone(): Scalar;
6
- set(x: number): this;
7
- static isBetween(x: number, a?: number, b?: number): boolean;
8
- isBetween(a?: number, b?: number): boolean;
9
- static isNear(x: number, y: number, epsilon?: number): boolean;
10
- isNear(y: number, epsilon?: number): boolean;
11
- static add(...nums: number[]): number;
12
- add(...nums: number[]): this;
13
- subtract(...nums: number[]): this;
14
- static atLeast(x: number, least?: number): number;
15
- atLeast(least?: number): this;
16
- static atMost(x: number, most?: number): number;
17
- atMost(most?: number): this;
18
- static clamp(x: number, a?: number, b?: number): number;
19
- clamp(a?: number, b?: number): this;
20
- static lerp(x: number, y: number, fraction: number, max?: number): number;
21
- lerp(y: number, fraction: number, max?: number): this;
22
- static step(x: number, y: number, delta: number): number;
23
- step(y: number, delta: number): this;
24
- static creep(difference: number, speed: number, deltaTime: number, speedLimit?: number): number;
25
- static approach(x: number, y: number, speed: number, deltaTime: number, speedLimit?: number): number;
26
- approach(y: number, speed: number, deltaTime: number, speedLimit?: number): this;
27
- static wrap(x: number, a?: number, b?: number): number;
28
- wrap(a?: number, b?: number): this;
29
- static constrainProximity(x: number, y: number, range: number): number;
30
- constrainProximity(y: number, range: number): this;
31
- static inverse(x: number): number;
32
- inverse(): this;
33
- static center(x: number): number;
34
- center(): this;
35
- static uncenter(x: number): number;
36
- uncenter(): this;
37
- static map(x: number, a: number, b: number): number;
38
- map(a: number, b: number): this;
39
- static remap(x: number, a1: number, a2: number, b1?: number, b2?: number, clamp?: boolean): number;
40
- remap(a1: number, a2: number, b1?: number, b2?: number, clamp?: boolean): this;
41
- static magnify(x: number): number;
42
- magnify(): this;
43
- static floor(x: number): number;
44
- floor(): this;
45
- static ceil(x: number): number;
46
- ceil(): this;
47
- static round(x: number): number;
48
- round(): this;
49
- static smooth(x: number, y: number, smoothing: number): number;
50
- smooth(y: number, smoothing: number): this;
51
- }