@benev/math 0.0.0-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 (48) hide show
  1. package/license +23 -0
  2. package/package.json +41 -0
  3. package/readme.md +3 -0
  4. package/s/concepts/angles.ts +74 -0
  5. package/s/concepts/circular.ts +72 -0
  6. package/s/concepts/noise.ts +23 -0
  7. package/s/concepts/quat.ts +131 -0
  8. package/s/concepts/randy.ts +116 -0
  9. package/s/concepts/scalar.ts +224 -0
  10. package/s/concepts/spline.ts +88 -0
  11. package/s/concepts/vec2.ts +392 -0
  12. package/s/concepts/vec3.ts +439 -0
  13. package/s/concepts/vec4.ts +74 -0
  14. package/s/index.ts +12 -0
  15. package/x/concepts/angles.d.ts +29 -0
  16. package/x/concepts/angles.js +62 -0
  17. package/x/concepts/angles.js.map +1 -0
  18. package/x/concepts/circular.d.ts +17 -0
  19. package/x/concepts/circular.js +70 -0
  20. package/x/concepts/circular.js.map +1 -0
  21. package/x/concepts/noise.d.ts +9 -0
  22. package/x/concepts/noise.js +20 -0
  23. package/x/concepts/noise.js.map +1 -0
  24. package/x/concepts/quat.d.ts +35 -0
  25. package/x/concepts/quat.js +110 -0
  26. package/x/concepts/quat.js.map +1 -0
  27. package/x/concepts/randy.d.ts +39 -0
  28. package/x/concepts/randy.js +95 -0
  29. package/x/concepts/randy.js.map +1 -0
  30. package/x/concepts/scalar.d.ts +51 -0
  31. package/x/concepts/scalar.js +219 -0
  32. package/x/concepts/scalar.js.map +1 -0
  33. package/x/concepts/spline.d.ts +9 -0
  34. package/x/concepts/spline.js +59 -0
  35. package/x/concepts/spline.js.map +1 -0
  36. package/x/concepts/vec2.d.ts +114 -0
  37. package/x/concepts/vec2.js +314 -0
  38. package/x/concepts/vec2.js.map +1 -0
  39. package/x/concepts/vec3.d.ts +117 -0
  40. package/x/concepts/vec3.js +357 -0
  41. package/x/concepts/vec3.js.map +1 -0
  42. package/x/concepts/vec4.d.ts +21 -0
  43. package/x/concepts/vec4.js +62 -0
  44. package/x/concepts/vec4.js.map +1 -0
  45. package/x/importmap.json +9 -0
  46. package/x/index.d.ts +10 -0
  47. package/x/index.js +11 -0
  48. package/x/index.js.map +1 -0
@@ -0,0 +1,357 @@
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
+ return Math.acos(dotProduct / magnitudes);
135
+ }
136
+ angleBetween({ x, y, z }) {
137
+ return this.angleBetween_(x, y, z);
138
+ }
139
+ ///////////////////////////////////////////////////////////////////////
140
+ /** mutator */
141
+ add_(x, y, z) {
142
+ this.x += x;
143
+ this.y += y;
144
+ this.z += z;
145
+ return this;
146
+ }
147
+ /** mutator */
148
+ add(...vecs) {
149
+ for (const { x, y, z } of vecs)
150
+ this.add_(x, y, z);
151
+ return this;
152
+ }
153
+ /** mutator */
154
+ subtract_(x, y, z) {
155
+ this.x -= x;
156
+ this.y -= y;
157
+ this.z -= z;
158
+ return this;
159
+ }
160
+ /** mutator */
161
+ subtract(...vecs) {
162
+ for (const { x, y, z } of vecs)
163
+ this.subtract_(x, y, z);
164
+ return this;
165
+ }
166
+ /** mutator */
167
+ multiply_(x, y, z) {
168
+ this.x *= x;
169
+ this.y *= y;
170
+ this.z *= z;
171
+ return this;
172
+ }
173
+ /** mutator */
174
+ multiply(...vecs) {
175
+ for (const { x, y, z } of vecs)
176
+ this.multiply_(x, y, z);
177
+ return this;
178
+ }
179
+ /** mutator */
180
+ divide_(x, y, z) {
181
+ this.x /= x;
182
+ this.y /= y;
183
+ this.z /= z;
184
+ return this;
185
+ }
186
+ /** mutator */
187
+ divide(...vecs) {
188
+ for (const { x, y, z } of vecs)
189
+ this.divide_(x, y, z);
190
+ return this;
191
+ }
192
+ ///////////////////////////////////////////////////////////////////////
193
+ /** mutator */
194
+ half() {
195
+ return this.divideBy(2);
196
+ }
197
+ /** mutator */
198
+ double() {
199
+ return this.multiplyBy(2);
200
+ }
201
+ /** mutator */
202
+ abs() {
203
+ return this.map(x => Math.abs(x));
204
+ }
205
+ /** mutator */
206
+ map(fn) {
207
+ this.x = fn(this.x, 0);
208
+ this.y = fn(this.y, 1);
209
+ this.z = fn(this.z, 2);
210
+ return this;
211
+ }
212
+ /** mutator */
213
+ negate() {
214
+ this.x = -this.x;
215
+ this.y = -this.y;
216
+ this.z = -this.z;
217
+ return this;
218
+ }
219
+ /** mutator */
220
+ addBy(delta) {
221
+ this.x += delta;
222
+ this.y += delta;
223
+ this.z += delta;
224
+ return this;
225
+ }
226
+ /** mutator */
227
+ multiplyBy(delta) {
228
+ this.x *= delta;
229
+ this.y *= delta;
230
+ this.z *= delta;
231
+ return this;
232
+ }
233
+ /** mutator */
234
+ divideBy(divisor) {
235
+ if (divisor === 0)
236
+ return this;
237
+ this.x /= divisor;
238
+ this.y /= divisor;
239
+ this.z /= divisor;
240
+ return this;
241
+ }
242
+ /** mutator */
243
+ normalize() {
244
+ return this.divideBy(this.magnitude());
245
+ }
246
+ /** mutator */
247
+ clampMagnitude(max) {
248
+ const magnitude = this.magnitude();
249
+ if (magnitude > max)
250
+ this.normalize().multiplyBy(max);
251
+ return this;
252
+ }
253
+ /** mutator */
254
+ floor() {
255
+ this.x = Math.floor(this.x);
256
+ this.y = Math.floor(this.y);
257
+ this.z = Math.floor(this.z);
258
+ return this;
259
+ }
260
+ /** mutator */
261
+ ceil() {
262
+ this.x = Math.ceil(this.x);
263
+ this.y = Math.ceil(this.y);
264
+ this.z = Math.ceil(this.z);
265
+ return this;
266
+ }
267
+ /** mutator */
268
+ round() {
269
+ this.x = Math.round(this.x);
270
+ this.y = Math.round(this.y);
271
+ this.z = Math.round(this.z);
272
+ return this;
273
+ }
274
+ ///////////////////////////////////////////////////////////////////////
275
+ /** mutator */
276
+ cross_(x2, y2, z2) {
277
+ const { x: x1, y: y1, z: z1 } = this;
278
+ this.x = (y1 * z2) - (z1 * y2);
279
+ this.y = (z1 * x2) - (x1 * z2);
280
+ this.z = (x1 * y2) - (y1 * x2);
281
+ return this;
282
+ }
283
+ /** mutator */
284
+ cross({ x, y, z }) {
285
+ return this.cross_(x, y, z);
286
+ }
287
+ /** mutator */
288
+ lerp_(x, y, z, fraction) {
289
+ this.x += (x - this.x) * fraction;
290
+ this.y += (y - this.y) * fraction;
291
+ this.z += (z - this.z) * fraction;
292
+ return this;
293
+ }
294
+ /** mutator */
295
+ lerp({ x, y, z }, fraction) {
296
+ return this.lerp_(x, y, z, fraction);
297
+ }
298
+ approach_(x, y, z, speed, deltaTime, speedLimit) {
299
+ this.x = Scalar.approach(this.x, x, speed, deltaTime, speedLimit);
300
+ this.y = Scalar.approach(this.y, y, speed, deltaTime, speedLimit);
301
+ this.z = Scalar.approach(this.z, z, speed, deltaTime, speedLimit);
302
+ return this;
303
+ }
304
+ approach({ x, y, z }, speed, deltaTime, speedLimit) {
305
+ return this.approach_(x, y, z, speed, deltaTime, speedLimit);
306
+ }
307
+ /** mutator */
308
+ projectOnto_(x, y, z) {
309
+ const scalar = this.dot_(x, y, z) / Vec3.magnitudeSquared(x, y, z);
310
+ this.x = scalar * x;
311
+ this.y = scalar * y;
312
+ this.z = scalar * z;
313
+ return this;
314
+ }
315
+ /** mutator */
316
+ projectOnto({ x, y, z }) {
317
+ return this.projectOnto_(x, y, z);
318
+ }
319
+ /** mutator */
320
+ reflect_(x, y, z) {
321
+ const dot = this.dot_(x, y, z) * 2;
322
+ this.x -= dot * x;
323
+ this.y -= dot * y;
324
+ this.z -= dot * z;
325
+ return this;
326
+ }
327
+ /** mutator */
328
+ reflect({ x, y, z }) {
329
+ return this.reflect_(x, y, z);
330
+ }
331
+ /** mutator */
332
+ rotateAroundAxis_(ux, uy, uz, angle) {
333
+ const cos = Math.cos(angle);
334
+ const sin = Math.sin(angle);
335
+ const { x, y, z } = this;
336
+ this.x = (cos + (1 - cos) * ux * ux) * x + ((1 - cos) * ux * uy - uz * sin) * y + ((1 - cos) * ux * uz + uy * sin) * z;
337
+ this.y = ((1 - cos) * uy * ux + uz * sin) * x + (cos + (1 - cos) * uy * uy) * y + ((1 - cos) * uy * uz - ux * sin) * z;
338
+ this.z = ((1 - cos) * uz * ux - uy * sin) * x + ((1 - cos) * uz * uy + ux * sin) * y + (cos + (1 - cos) * uz * uz) * z;
339
+ return this;
340
+ }
341
+ /** mutator */
342
+ rotateAroundAxis({ x, y, z }, angle) {
343
+ return this.rotateAroundAxis_(x, y, z, angle);
344
+ }
345
+ /** mutator */
346
+ smooth_(x, y, z, smoothing) {
347
+ this.x = Scalar.smooth(this.x, x, smoothing);
348
+ this.y = Scalar.smooth(this.y, y, smoothing);
349
+ this.z = Scalar.smooth(this.z, z, smoothing);
350
+ return this;
351
+ }
352
+ /** mutator */
353
+ smooth({ x, y, z }, smoothing) {
354
+ return this.smooth_(x, y, z, smoothing);
355
+ }
356
+ }
357
+ //# sourceMappingURL=vec3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec3.js","sourceRoot":"","sources":["../../s/concepts/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;IACr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,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"}
@@ -0,0 +1,21 @@
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
+ }
@@ -0,0 +1,62 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec4.js","sourceRoot":"","sources":["../../s/concepts/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,C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AC,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,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"}
@@ -0,0 +1,9 @@
1
+ {
2
+ "imports": {
3
+ "@e280/stz/": "/node_modules/@e280/stz/",
4
+ "@e280/stz": "/node_modules/@e280/stz/x/index.js",
5
+ "simplex-noise/": "/node_modules/simplex-noise/",
6
+ "simplex-noise": "/node_modules/simplex-noise/dist/esm/simplex-noise.js"
7
+ },
8
+ "scopes": {}
9
+ }
package/x/index.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export * from "./concepts/angles.js";
2
+ export * from "./concepts/circular.js";
3
+ export * from "./concepts/noise.js";
4
+ export * from "./concepts/quat.js";
5
+ export * from "./concepts/randy.js";
6
+ export * from "./concepts/scalar.js";
7
+ export * from "./concepts/spline.js";
8
+ export * from "./concepts/vec2.js";
9
+ export * from "./concepts/vec3.js";
10
+ export * from "./concepts/vec4.js";
package/x/index.js ADDED
@@ -0,0 +1,11 @@
1
+ export * from "./concepts/angles.js";
2
+ export * from "./concepts/circular.js";
3
+ export * from "./concepts/noise.js";
4
+ export * from "./concepts/quat.js";
5
+ export * from "./concepts/randy.js";
6
+ export * from "./concepts/scalar.js";
7
+ export * from "./concepts/spline.js";
8
+ export * from "./concepts/vec2.js";
9
+ export * from "./concepts/vec3.js";
10
+ export * from "./concepts/vec4.js";
11
+ //# sourceMappingURL=index.js.map
package/x/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../s/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA"}