@oliversalzburg/js-utils 0.0.8 → 0.0.9
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/_site/assets/highlight.css +57 -0
- package/_site/assets/main.js +59 -0
- package/_site/assets/navigation.js +1 -0
- package/_site/assets/search.js +1 -0
- package/_site/assets/style.css +1383 -0
- package/_site/classes/AbstractError.html +28 -0
- package/_site/classes/Canvas.html +44 -0
- package/_site/classes/InternalError.html +32 -0
- package/_site/classes/InvalidArgumentError.html +28 -0
- package/_site/classes/InvalidOperationError.html +28 -0
- package/_site/classes/NotImplementedError.html +27 -0
- package/_site/classes/PermissionViolationError.html +28 -0
- package/_site/classes/Random.html +43 -0
- package/_site/classes/RenderLoop.html +30 -0
- package/_site/classes/ResourceConflictError.html +27 -0
- package/_site/classes/UnexpectedNilError.html +15 -0
- package/_site/classes/UnknownError.html +31 -0
- package/_site/classes/Vector2.html +113 -0
- package/_site/classes/Vector3.html +28 -0
- package/_site/functions/addVector2.html +5 -0
- package/_site/functions/blend.html +8 -0
- package/_site/functions/blendAdditive.html +8 -0
- package/_site/functions/blendSubtractive.html +8 -0
- package/_site/functions/cosDeg.html +4 -0
- package/_site/functions/deg2rad.html +4 -0
- package/_site/functions/difference.html +7 -0
- package/_site/functions/distance.html +7 -0
- package/_site/functions/errorToJSON.html +4 -0
- package/_site/functions/errorToRecord.html +4 -0
- package/_site/functions/errorToSimpleSerializable.html +4 -0
- package/_site/functions/filterType.html +7 -0
- package/_site/functions/formatString.html +7 -0
- package/_site/functions/formatStringTemplate.html +7 -0
- package/_site/functions/fromRGB.html +7 -0
- package/_site/functions/fromRGBA.html +7 -0
- package/_site/functions/getA.html +4 -0
- package/_site/functions/getB.html +4 -0
- package/_site/functions/getDocumentElementTypeById.html +9 -0
- package/_site/functions/getG.html +4 -0
- package/_site/functions/getR.html +4 -0
- package/_site/functions/intersect.html +8 -0
- package/_site/functions/is.html +7 -0
- package/_site/functions/isError.html +4 -0
- package/_site/functions/isInteger.html +4 -0
- package/_site/functions/isNil.html +5 -0
- package/_site/functions/isqrt.html +4 -0
- package/_site/functions/multiplyVector2.html +5 -0
- package/_site/functions/mustExist.html +6 -0
- package/_site/functions/nextPalette.html +2 -0
- package/_site/functions/putPixel32.html +7 -0
- package/_site/functions/putPixel32Add.html +7 -0
- package/_site/functions/putPixel32Sub.html +7 -0
- package/_site/functions/putSubPixel32.html +8 -0
- package/_site/functions/rad2deg.html +4 -0
- package/_site/functions/randomRange.html +6 -0
- package/_site/functions/safeRGBComponent.html +4 -0
- package/_site/functions/seedFromString.html +5 -0
- package/_site/functions/shuffleArray.html +5 -0
- package/_site/functions/sinDeg.html +4 -0
- package/_site/functions/sleep.html +4 -0
- package/_site/functions/somecolor.html +4 -0
- package/_site/functions/subtractVector2.html +5 -0
- package/_site/functions/toGrayScale.html +4 -0
- package/_site/functions/unknownToError.html +6 -0
- package/_site/index.html +1 -0
- package/_site/modules.html +72 -0
- package/_site/types/AnyConstructor.html +2 -0
- package/_site/types/AnyFunction.html +2 -0
- package/_site/types/ConstructorOf.html +2 -0
- package/_site/types/FunctionReturning.html +2 -0
- package/_site/types/Maybe.html +2 -0
- package/_site/types/Mixin.html +3 -0
- package/_site/types/Nil.html +3 -0
- package/_site/types/RenderLoopCallback.html +2 -0
- package/_site/types/SerializedError.html +2 -0
- package/_site/variables/PALETTES.html +2 -0
- package/_site/variables/TWO_PI.html +2 -0
- package/_site/variables/random-1.html +2 -0
- package/lib/array.d.ts +8 -0
- package/lib/array.js +8 -0
- package/lib/array.js.map +1 -1
- package/lib/dom/core.d.ts +3 -2
- package/lib/dom/core.js +3 -2
- package/lib/dom/core.js.map +1 -1
- package/lib/error-serializer.d.ts +12 -6
- package/lib/error-serializer.js +10 -5
- package/lib/error-serializer.js.map +1 -1
- package/lib/errors/AbstractError.d.ts +4 -16
- package/lib/errors/AbstractError.js +4 -16
- package/lib/errors/AbstractError.js.map +1 -1
- package/lib/errors/InternalError.d.ts +6 -5
- package/lib/errors/InternalError.js +6 -7
- package/lib/errors/InternalError.js.map +1 -1
- package/lib/errors/InvalidArgumentError.d.ts +2 -1
- package/lib/errors/InvalidArgumentError.js +2 -1
- package/lib/errors/InvalidArgumentError.js.map +1 -1
- package/lib/errors/InvalidOperationError.d.ts +2 -1
- package/lib/errors/InvalidOperationError.js +2 -1
- package/lib/errors/InvalidOperationError.js.map +1 -1
- package/lib/errors/NotImplementedError.d.ts +2 -1
- package/lib/errors/NotImplementedError.js +2 -1
- package/lib/errors/NotImplementedError.js.map +1 -1
- package/lib/errors/PermissionViolationError.d.ts +2 -1
- package/lib/errors/PermissionViolationError.js +2 -1
- package/lib/errors/PermissionViolationError.js.map +1 -1
- package/lib/errors/ResourceConflictError.d.ts +2 -1
- package/lib/errors/ResourceConflictError.js +2 -1
- package/lib/errors/ResourceConflictError.js.map +1 -1
- package/lib/errors/UnknownError.d.ts +6 -5
- package/lib/errors/UnknownError.js +6 -5
- package/lib/errors/UnknownError.js.map +1 -1
- package/lib/graphics/canvas.d.ts +40 -25
- package/lib/graphics/canvas.js +51 -24
- package/lib/graphics/canvas.js.map +1 -1
- package/lib/graphics/core.d.ts +18 -0
- package/lib/graphics/core.js +18 -0
- package/lib/graphics/core.js.map +1 -1
- package/lib/graphics/render-loop.d.ts +14 -2
- package/lib/graphics/render-loop.js +13 -2
- package/lib/graphics/render-loop.js.map +1 -1
- package/lib/math/core.d.ts +12 -1
- package/lib/math/core.js +12 -1
- package/lib/math/core.js.map +1 -1
- package/lib/math/vector2.d.ts +32 -1
- package/lib/math/vector2.js +45 -1
- package/lib/math/vector2.js.map +1 -1
- package/lib/math/vector3.d.ts +2 -1
- package/lib/math/vector3.js +2 -1
- package/lib/math/vector3.js.map +1 -1
- package/lib/nil.d.ts +1 -0
- package/lib/nil.js +1 -0
- package/lib/nil.js.map +1 -1
- package/lib/random.d.ts +34 -1
- package/lib/random.js +160 -2
- package/lib/random.js.map +1 -1
- package/lib/string-formatter.d.ts +2 -0
- package/lib/string-formatter.js +2 -0
- package/lib/string-formatter.js.map +1 -1
- package/package.json +2 -1
package/lib/math/core.d.ts
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PI` times 2.
|
|
3
|
+
* @group Math
|
|
4
|
+
*/
|
|
1
5
|
export declare const TWO_PI: number;
|
|
2
6
|
/**
|
|
3
7
|
* Converts the degrees to radians.
|
|
4
8
|
* @param degrees The degrees to convert to radians.
|
|
5
9
|
* @returns The degrees in radians.
|
|
10
|
+
* @group Math
|
|
6
11
|
*/
|
|
7
12
|
export declare const deg2rad: (degrees: number) => number;
|
|
8
13
|
/**
|
|
9
14
|
* Convertrs the radians to degrees.
|
|
10
15
|
* @param radians The radians to convert to degrees.
|
|
11
16
|
* @returns The radians as degrees.
|
|
17
|
+
* @group Math
|
|
12
18
|
*/
|
|
13
19
|
export declare const rad2deg: (radians: number) => number;
|
|
14
20
|
/**
|
|
15
21
|
* Calculates the sine for a given degree value.
|
|
16
22
|
* @param value The value in degrees to calculate the sine for.
|
|
17
23
|
* @returns The sine for the given value.
|
|
24
|
+
* @group Math
|
|
18
25
|
*/
|
|
19
26
|
export declare const sinDeg: (value: number) => number;
|
|
20
27
|
/**
|
|
21
28
|
* Calculates the cosine for a given degree value.
|
|
22
29
|
* @param value The value in degrees to calculate the cosine for.
|
|
23
30
|
* @returns The cosine for the given value.
|
|
31
|
+
* @group Math
|
|
24
32
|
*/
|
|
25
33
|
export declare const cosDeg: (value: number) => number;
|
|
26
34
|
/**
|
|
@@ -30,17 +38,20 @@ export declare const cosDeg: (value: number) => number;
|
|
|
30
38
|
* @param x2 The X component of the second vector.
|
|
31
39
|
* @param y2 The Y component of the second vector.
|
|
32
40
|
* @returns The distance between the two vectors.
|
|
41
|
+
* @group Math
|
|
33
42
|
*/
|
|
34
43
|
export declare const distance: (x1: number, y1: number, x2: number, y2: number) => number;
|
|
35
44
|
/**
|
|
36
45
|
* Finds the integer square root of a positive number.
|
|
37
46
|
* @param value The value to calcuate the square root for.
|
|
38
47
|
* @returns The square root for the given value.
|
|
48
|
+
* @group Math
|
|
39
49
|
*/
|
|
40
|
-
export declare const
|
|
50
|
+
export declare const isqrt: (value: number) => number;
|
|
41
51
|
/**
|
|
42
52
|
* Checks whether a number is an integer.
|
|
43
53
|
* @param value The value to check.
|
|
44
54
|
* @returns `true` when the value is an integer, `false` otherwise.
|
|
55
|
+
* @group Math
|
|
45
56
|
*/
|
|
46
57
|
export declare const isInteger: (value: number) => boolean;
|
package/lib/math/core.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PI` times 2.
|
|
3
|
+
* @group Math
|
|
4
|
+
*/
|
|
1
5
|
export const TWO_PI = /* @__PURE__ */ Math.PI * 2;
|
|
2
6
|
/**
|
|
3
7
|
* Converts the degrees to radians.
|
|
4
8
|
* @param degrees The degrees to convert to radians.
|
|
5
9
|
* @returns The degrees in radians.
|
|
10
|
+
* @group Math
|
|
6
11
|
*/
|
|
7
12
|
export const deg2rad = (degrees) => {
|
|
8
13
|
return degrees * (Math.PI / 180);
|
|
@@ -11,6 +16,7 @@ export const deg2rad = (degrees) => {
|
|
|
11
16
|
* Convertrs the radians to degrees.
|
|
12
17
|
* @param radians The radians to convert to degrees.
|
|
13
18
|
* @returns The radians as degrees.
|
|
19
|
+
* @group Math
|
|
14
20
|
*/
|
|
15
21
|
export const rad2deg = (radians) => {
|
|
16
22
|
return radians * (180 / Math.PI);
|
|
@@ -19,6 +25,7 @@ export const rad2deg = (radians) => {
|
|
|
19
25
|
* Calculates the sine for a given degree value.
|
|
20
26
|
* @param value The value in degrees to calculate the sine for.
|
|
21
27
|
* @returns The sine for the given value.
|
|
28
|
+
* @group Math
|
|
22
29
|
*/
|
|
23
30
|
export const sinDeg = (value) => {
|
|
24
31
|
return Math.sin(deg2rad(value));
|
|
@@ -27,6 +34,7 @@ export const sinDeg = (value) => {
|
|
|
27
34
|
* Calculates the cosine for a given degree value.
|
|
28
35
|
* @param value The value in degrees to calculate the cosine for.
|
|
29
36
|
* @returns The cosine for the given value.
|
|
37
|
+
* @group Math
|
|
30
38
|
*/
|
|
31
39
|
export const cosDeg = (value) => {
|
|
32
40
|
return Math.cos(deg2rad(value));
|
|
@@ -38,6 +46,7 @@ export const cosDeg = (value) => {
|
|
|
38
46
|
* @param x2 The X component of the second vector.
|
|
39
47
|
* @param y2 The Y component of the second vector.
|
|
40
48
|
* @returns The distance between the two vectors.
|
|
49
|
+
* @group Math
|
|
41
50
|
*/
|
|
42
51
|
export const distance = (x1, y1, x2, y2) => {
|
|
43
52
|
const distx = x2 - x1;
|
|
@@ -48,8 +57,9 @@ export const distance = (x1, y1, x2, y2) => {
|
|
|
48
57
|
* Finds the integer square root of a positive number.
|
|
49
58
|
* @param value The value to calcuate the square root for.
|
|
50
59
|
* @returns The square root for the given value.
|
|
60
|
+
* @group Math
|
|
51
61
|
*/
|
|
52
|
-
export const
|
|
62
|
+
export const isqrt = (value) => {
|
|
53
63
|
if (0 === value) {
|
|
54
64
|
return 0;
|
|
55
65
|
} // Avoid zero divide
|
|
@@ -65,6 +75,7 @@ export const Isqrt = (value) => {
|
|
|
65
75
|
* Checks whether a number is an integer.
|
|
66
76
|
* @param value The value to check.
|
|
67
77
|
* @returns `true` when the value is an integer, `false` otherwise.
|
|
78
|
+
* @group Math
|
|
68
79
|
*/
|
|
69
80
|
export const isInteger = (value) => {
|
|
70
81
|
return Math.trunc(value) === value;
|
package/lib/math/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../source/math/core.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../source/math/core.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,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AG,CAAC,GAAG,CAAC,CAAC,CAAC,8BAA8B;IACrD,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,GAAG,CAAC,EAAE;QACb,CAAC,GAAG,EAAE,CAAC;QACP,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;KAC1B;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AACrC,CAAC,CAAC"}
|
package/lib/math/vector2.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A vector with 2 components, labeled: `X`, `Y`.
|
|
3
|
+
* @group Math
|
|
3
4
|
*/
|
|
4
5
|
export declare class Vector2 {
|
|
5
6
|
/**
|
|
@@ -11,7 +12,7 @@ export declare class Vector2 {
|
|
|
11
12
|
*/
|
|
12
13
|
y: number;
|
|
13
14
|
/**
|
|
14
|
-
* Constructs a new {@
|
|
15
|
+
* Constructs a new {@linkcode Vector2}.
|
|
15
16
|
* @param x The X component.
|
|
16
17
|
* @param y The Y component.
|
|
17
18
|
*/
|
|
@@ -148,6 +149,12 @@ export declare class Vector2 {
|
|
|
148
149
|
* @returns This instance.
|
|
149
150
|
*/
|
|
150
151
|
lerp(vector: Readonly<Vector2>, t: number): this;
|
|
152
|
+
/**
|
|
153
|
+
* Rotates the vector by the given angle.
|
|
154
|
+
* @param angle The angle in degrees.
|
|
155
|
+
* @returns This instance.
|
|
156
|
+
*/
|
|
157
|
+
rotate(angle: number): this;
|
|
151
158
|
/**
|
|
152
159
|
* Returns the dot product between two vectors.
|
|
153
160
|
* @param vector The other vector.
|
|
@@ -162,3 +169,27 @@ export declare class Vector2 {
|
|
|
162
169
|
*/
|
|
163
170
|
dotXY(x: number, y: number): number;
|
|
164
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Adds two vectors and returns a new vector with the result.
|
|
174
|
+
* @param a The first input vector.
|
|
175
|
+
* @param b The second input vector.
|
|
176
|
+
* @returns A new {@linkcode Vector2}.
|
|
177
|
+
* @group Math
|
|
178
|
+
*/
|
|
179
|
+
export declare const addVector2: (a: Vector2, b: Vector2) => Vector2;
|
|
180
|
+
/**
|
|
181
|
+
* Multiplies two vectors and returns a new vector with the result.
|
|
182
|
+
* @param a The first input vector.
|
|
183
|
+
* @param b The second input vector.
|
|
184
|
+
* @returns A new {@linkcode Vector2}.
|
|
185
|
+
* @group Math
|
|
186
|
+
*/
|
|
187
|
+
export declare const multiplyVector2: (a: Vector2, b: Vector2) => Vector2;
|
|
188
|
+
/**
|
|
189
|
+
* Subtracts two vectors and returns a new vector with the result.
|
|
190
|
+
* @param a The first input vector.
|
|
191
|
+
* @param b The second input vector.
|
|
192
|
+
* @returns A new {@linkcode Vector2}.
|
|
193
|
+
* @group Math
|
|
194
|
+
*/
|
|
195
|
+
export declare const subtractVector2: (a: Vector2, b: Vector2) => Vector2;
|
package/lib/math/vector2.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A vector with 2 components, labeled: `X`, `Y`.
|
|
3
|
+
* @group Math
|
|
3
4
|
*/
|
|
4
5
|
export class Vector2 {
|
|
5
6
|
/**
|
|
@@ -11,7 +12,7 @@ export class Vector2 {
|
|
|
11
12
|
*/
|
|
12
13
|
y;
|
|
13
14
|
/**
|
|
14
|
-
* Constructs a new {@
|
|
15
|
+
* Constructs a new {@linkcode Vector2}.
|
|
15
16
|
* @param x The X component.
|
|
16
17
|
* @param y The Y component.
|
|
17
18
|
*/
|
|
@@ -234,6 +235,19 @@ export class Vector2 {
|
|
|
234
235
|
this.y = this.y * tn + vector.y * t;
|
|
235
236
|
return this;
|
|
236
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Rotates the vector by the given angle.
|
|
240
|
+
* @param angle The angle in degrees.
|
|
241
|
+
* @returns This instance.
|
|
242
|
+
*/
|
|
243
|
+
rotate(angle) {
|
|
244
|
+
angle = -angle * (Math.PI / 180);
|
|
245
|
+
const cos = Math.cos(angle);
|
|
246
|
+
const sin = Math.sin(angle);
|
|
247
|
+
this.x = this.x * cos - this.y * sin;
|
|
248
|
+
this.y = this.x * sin + this.y * cos;
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
237
251
|
/**
|
|
238
252
|
* Returns the dot product between two vectors.
|
|
239
253
|
* @param vector The other vector.
|
|
@@ -252,4 +266,34 @@ export class Vector2 {
|
|
|
252
266
|
return this.x * x + this.y * y;
|
|
253
267
|
}
|
|
254
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Adds two vectors and returns a new vector with the result.
|
|
271
|
+
* @param a The first input vector.
|
|
272
|
+
* @param b The second input vector.
|
|
273
|
+
* @returns A new {@linkcode Vector2}.
|
|
274
|
+
* @group Math
|
|
275
|
+
*/
|
|
276
|
+
export const addVector2 = (a, b) => {
|
|
277
|
+
return new Vector2(a.x * b.x, a.y * b.y);
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Multiplies two vectors and returns a new vector with the result.
|
|
281
|
+
* @param a The first input vector.
|
|
282
|
+
* @param b The second input vector.
|
|
283
|
+
* @returns A new {@linkcode Vector2}.
|
|
284
|
+
* @group Math
|
|
285
|
+
*/
|
|
286
|
+
export const multiplyVector2 = (a, b) => {
|
|
287
|
+
return new Vector2(a.x * b.x, a.y * b.y);
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Subtracts two vectors and returns a new vector with the result.
|
|
291
|
+
* @param a The first input vector.
|
|
292
|
+
* @param b The second input vector.
|
|
293
|
+
* @returns A new {@linkcode Vector2}.
|
|
294
|
+
* @group Math
|
|
295
|
+
*/
|
|
296
|
+
export const subtractVector2 = (a, b) => {
|
|
297
|
+
return new Vector2(a.x - b.x, a.y - b.y);
|
|
298
|
+
};
|
|
255
299
|
//# sourceMappingURL=vector2.js.map
|
package/lib/math/vector2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector2.js","sourceRoot":"","sources":["../../source/math/vector2.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vector2.js","sourceRoot":"","sources":["../../source/math/vector2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,OAAO;IAClB;;OAEG;IACH,CAAC,CAAS;IAEV;;OAEG;IACH,CAAC,CAAS;IAEV;;;;OAIG;IACH,YAAY,CAAS,EAAE,CAAS;QAC9B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,MAAe;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,CAAS,EAAE,CAAS;QACxB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,MAAe;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,CAAS,EAAE,CAAS;QACxB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,MAAe,EAAE,KAAa;QACxC,OAAO,IAAI,CAAC,aAAa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, `Y`, `Z`.
|
|
3
|
+
* @group Math
|
|
3
4
|
*/
|
|
4
5
|
export declare class Vector3 {
|
|
5
6
|
/**
|
|
@@ -15,7 +16,7 @@ export declare class Vector3 {
|
|
|
15
16
|
*/
|
|
16
17
|
z: number;
|
|
17
18
|
/**
|
|
18
|
-
* Constructs a new {@
|
|
19
|
+
* Constructs a new {@linkcode Vector3}.
|
|
19
20
|
* @param x The X component.
|
|
20
21
|
* @param y The Y component.
|
|
21
22
|
* @param z The Z component.
|
package/lib/math/vector3.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A vector with 3 components, labeled: `X`, `Y`, `Z`.
|
|
3
|
+
* @group Math
|
|
3
4
|
*/
|
|
4
5
|
export class Vector3 {
|
|
5
6
|
/**
|
|
@@ -15,7 +16,7 @@ export class Vector3 {
|
|
|
15
16
|
*/
|
|
16
17
|
z;
|
|
17
18
|
/**
|
|
18
|
-
* Constructs a new {@
|
|
19
|
+
* Constructs a new {@linkcode Vector3}.
|
|
19
20
|
* @param x The X component.
|
|
20
21
|
* @param y The Y component.
|
|
21
22
|
* @param z The Z component.
|
package/lib/math/vector3.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector3.js","sourceRoot":"","sources":["../../source/math/vector3.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vector3.js","sourceRoot":"","sources":["../../source/math/vector3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,OAAO;IAClB;;OAEG;IACH,CAAC,CAAS;IAEV;;OAEG;IACH,CAAC,CAAS;IAEV;;OAEG;IACH,CAAC,CAAS;IAEV;;;;;OAKG;IACH,YAAY,CAAS,EAAE,CAAS,EAAE,CAAS;QACzC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;QACpC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,MAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;QACpC,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
package/lib/nil.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare function isNil<T>(subject: Maybe<T>): subject is Nil;
|
|
|
26
26
|
export declare function is<T>(nilable: Maybe<T>, InstanceType: ConstructorOf<T>): nilable is T;
|
|
27
27
|
/**
|
|
28
28
|
* Thrown when an unexpected nil value was encountered.
|
|
29
|
+
* @group Errors
|
|
29
30
|
*/
|
|
30
31
|
export declare class UnexpectedNilError extends Error {
|
|
31
32
|
/**
|
package/lib/nil.js
CHANGED
package/lib/nil.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nil.js","sourceRoot":"","sources":["../source/nil.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAI,OAAiB;IACxC,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AACnD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,EAAE,CAAI,OAAiB,EAAE,YAA8B;IACrE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,YAAY,YAAY,CAAC;AAC5D,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"nil.js","sourceRoot":"","sources":["../source/nil.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAI,OAAiB;IACxC,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AACnD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,EAAE,CAAI,OAAiB,EAAE,YAA8B;IACrE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,YAAY,YAAY,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C;;;OAGG;IACH,YAAY,OAAO,GAAG,sBAAsB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAI,OAAiB,EAAE,YAAqB;IACnE,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE;QAClB,MAAM,IAAI,kBAAkB,CAAC,YAAY,CAAC,CAAC;KAC5C;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/lib/random.d.ts
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Helps with generating random numbers.
|
|
3
|
+
* @group Random
|
|
3
4
|
*/
|
|
4
5
|
export declare class Random {
|
|
6
|
+
/**
|
|
7
|
+
* The value this PRNG was seeded with.
|
|
8
|
+
*/
|
|
5
9
|
private _seed;
|
|
10
|
+
/**
|
|
11
|
+
* The permutation table for simplex noise.
|
|
12
|
+
*/
|
|
6
13
|
private _perm;
|
|
14
|
+
/**
|
|
15
|
+
* The gradient map for simplex noise.
|
|
16
|
+
*/
|
|
7
17
|
private _gradP;
|
|
18
|
+
/**
|
|
19
|
+
* Skewing and unskewing factors for 2, 3, and 4 dimensions.
|
|
20
|
+
*/
|
|
8
21
|
private _F2;
|
|
22
|
+
/**
|
|
23
|
+
* Skewing and unskewing factors for 2, 3, and 4 dimensions.
|
|
24
|
+
*/
|
|
9
25
|
private _G2;
|
|
10
26
|
/**
|
|
11
27
|
* Creates a pseudo-random value generator. The seed must be an integer.
|
|
@@ -40,13 +56,25 @@ export declare class Random {
|
|
|
40
56
|
* @returns The noise value for the input coordinates.
|
|
41
57
|
*/
|
|
42
58
|
simplex2(x: number, y: number): number;
|
|
59
|
+
/**
|
|
60
|
+
* Returns a 3D simplex noise value for a given input coordinate.
|
|
61
|
+
* @license ISC
|
|
62
|
+
* @author Joseph Gentle
|
|
63
|
+
* @see https://github.com/josephg/noisejs
|
|
64
|
+
* @param x The X input coordinate.
|
|
65
|
+
* @param y The Y input coordinate.
|
|
66
|
+
* @param z The Z input coordinate.
|
|
67
|
+
* @returns The noise value for the input coordinates.
|
|
68
|
+
*/
|
|
69
|
+
simplex3(x: number, y: number, z: number): number;
|
|
43
70
|
}
|
|
44
71
|
/**
|
|
45
72
|
* Returns a random value in a given range.
|
|
46
|
-
* Uses the JS-internal `Math.random()`. Use {
|
|
73
|
+
* Uses the JS-internal `Math.random()`. Use {@linkcode Random} for a PRNG with more features.
|
|
47
74
|
* @param min The lower bound.
|
|
48
75
|
* @param max The upper bound.
|
|
49
76
|
* @returns A random value between the lower and upper bound.
|
|
77
|
+
* @group Random
|
|
50
78
|
*/
|
|
51
79
|
export declare const randomRange: (min: number, max: number) => number;
|
|
52
80
|
/**
|
|
@@ -54,6 +82,11 @@ export declare const randomRange: (min: number, max: number) => number;
|
|
|
54
82
|
* from a string.
|
|
55
83
|
* @param input The string to use as a seed.
|
|
56
84
|
* @returns A numeric seed value for a PRNG.
|
|
85
|
+
* @group Random
|
|
57
86
|
*/
|
|
58
87
|
export declare const seedFromString: (input: string) => number;
|
|
88
|
+
/**
|
|
89
|
+
* A global PRNG instance that is ready-to-use.
|
|
90
|
+
* @group Random
|
|
91
|
+
*/
|
|
59
92
|
export declare const random: Random;
|
package/lib/random.js
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { Vector3 } from "./math/vector3.js";
|
|
2
2
|
/**
|
|
3
3
|
* Helps with generating random numbers.
|
|
4
|
+
* @group Random
|
|
4
5
|
*/
|
|
5
6
|
export class Random {
|
|
7
|
+
/**
|
|
8
|
+
* The value this PRNG was seeded with.
|
|
9
|
+
*/
|
|
6
10
|
_seed;
|
|
11
|
+
/**
|
|
12
|
+
* The permutation table for simplex noise.
|
|
13
|
+
*/
|
|
7
14
|
_perm;
|
|
15
|
+
/**
|
|
16
|
+
* The gradient map for simplex noise.
|
|
17
|
+
*/
|
|
8
18
|
_gradP;
|
|
19
|
+
/**
|
|
20
|
+
* Skewing and unskewing factors for 2, 3, and 4 dimensions.
|
|
21
|
+
*/
|
|
9
22
|
_F2;
|
|
23
|
+
/**
|
|
24
|
+
* Skewing and unskewing factors for 2, 3, and 4 dimensions.
|
|
25
|
+
*/
|
|
10
26
|
_G2;
|
|
11
27
|
/**
|
|
12
28
|
* Creates a pseudo-random value generator. The seed must be an integer.
|
|
@@ -62,7 +78,6 @@ export class Random {
|
|
|
62
78
|
this._perm[i] = this._perm[i + 256] = v;
|
|
63
79
|
this._gradP[i] = this._gradP[i + 256] = grad3[v % 12];
|
|
64
80
|
}
|
|
65
|
-
// Skewing and unskewing factors for 2, 3, and 4 dimensions
|
|
66
81
|
this._F2 = 0.5 * (Math.sqrt(3) - 1);
|
|
67
82
|
this._G2 = (3 - Math.sqrt(3)) / 6;
|
|
68
83
|
}
|
|
@@ -161,13 +176,151 @@ export class Random {
|
|
|
161
176
|
// The result is scaled to return values in the interval [-1,1].
|
|
162
177
|
return 70 * (n0 + n1 + n2);
|
|
163
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns a 3D simplex noise value for a given input coordinate.
|
|
181
|
+
* @license ISC
|
|
182
|
+
* @author Joseph Gentle
|
|
183
|
+
* @see https://github.com/josephg/noisejs
|
|
184
|
+
* @param x The X input coordinate.
|
|
185
|
+
* @param y The Y input coordinate.
|
|
186
|
+
* @param z The Z input coordinate.
|
|
187
|
+
* @returns The noise value for the input coordinates.
|
|
188
|
+
*/
|
|
189
|
+
simplex3(x, y, z) {
|
|
190
|
+
const F3 = 1 / 3;
|
|
191
|
+
const G3 = 1 / 6;
|
|
192
|
+
let n0, n1, n2, n3; // Noise contributions from the four corners
|
|
193
|
+
// Skew the input space to determine which simplex cell we're in
|
|
194
|
+
const s = (x + y + z) * F3; // Hairy factor for 2D
|
|
195
|
+
let i = Math.floor(x + s);
|
|
196
|
+
let j = Math.floor(y + s);
|
|
197
|
+
let k = Math.floor(z + s);
|
|
198
|
+
const t = (i + j + k) * G3;
|
|
199
|
+
const x0 = x - i + t; // The x,y distances from the cell origin, unskewed.
|
|
200
|
+
const y0 = y - j + t;
|
|
201
|
+
const z0 = z - k + t;
|
|
202
|
+
// For the 3D case, the simplex shape is a slightly irregular tetrahedron.
|
|
203
|
+
// Determine which simplex we are in.
|
|
204
|
+
let i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords
|
|
205
|
+
let i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords
|
|
206
|
+
if (x0 >= y0) {
|
|
207
|
+
if (y0 >= z0) {
|
|
208
|
+
i1 = 1;
|
|
209
|
+
j1 = 0;
|
|
210
|
+
k1 = 0;
|
|
211
|
+
i2 = 1;
|
|
212
|
+
j2 = 1;
|
|
213
|
+
k2 = 0;
|
|
214
|
+
}
|
|
215
|
+
else if (x0 >= z0) {
|
|
216
|
+
i1 = 1;
|
|
217
|
+
j1 = 0;
|
|
218
|
+
k1 = 0;
|
|
219
|
+
i2 = 1;
|
|
220
|
+
j2 = 0;
|
|
221
|
+
k2 = 1;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
i1 = 0;
|
|
225
|
+
j1 = 0;
|
|
226
|
+
k1 = 1;
|
|
227
|
+
i2 = 1;
|
|
228
|
+
j2 = 0;
|
|
229
|
+
k2 = 1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
if (y0 < z0) {
|
|
234
|
+
i1 = 0;
|
|
235
|
+
j1 = 0;
|
|
236
|
+
k1 = 1;
|
|
237
|
+
i2 = 0;
|
|
238
|
+
j2 = 1;
|
|
239
|
+
k2 = 1;
|
|
240
|
+
}
|
|
241
|
+
else if (x0 < z0) {
|
|
242
|
+
i1 = 0;
|
|
243
|
+
j1 = 1;
|
|
244
|
+
k1 = 0;
|
|
245
|
+
i2 = 0;
|
|
246
|
+
j2 = 1;
|
|
247
|
+
k2 = 1;
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
i1 = 0;
|
|
251
|
+
j1 = 1;
|
|
252
|
+
k1 = 0;
|
|
253
|
+
i2 = 1;
|
|
254
|
+
j2 = 1;
|
|
255
|
+
k2 = 0;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// A step of (1,0,0) in (i,j,k) means a step of (1-c,-c,-c) in (x,y,z),
|
|
259
|
+
// a step of (0,1,0) in (i,j,k) means a step of (-c,1-c,-c) in (x,y,z), and
|
|
260
|
+
// a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where
|
|
261
|
+
// c = 1/6.
|
|
262
|
+
const x1 = x0 - i1 + G3; // Offsets for second corner
|
|
263
|
+
const y1 = y0 - j1 + G3;
|
|
264
|
+
const z1 = z0 - k1 + G3;
|
|
265
|
+
const x2 = x0 - i2 + 2 * G3; // Offsets for third corner
|
|
266
|
+
const y2 = y0 - j2 + 2 * G3;
|
|
267
|
+
const z2 = z0 - k2 + 2 * G3;
|
|
268
|
+
const x3 = x0 - 1 + 3 * G3; // Offsets for fourth corner
|
|
269
|
+
const y3 = y0 - 1 + 3 * G3;
|
|
270
|
+
const z3 = z0 - 1 + 3 * G3;
|
|
271
|
+
// Work out the hashed gradient indices of the four simplex corners
|
|
272
|
+
i &= 255;
|
|
273
|
+
j &= 255;
|
|
274
|
+
k &= 255;
|
|
275
|
+
const gi0 = this._gradP[i + this._perm[j + this._perm[k]]];
|
|
276
|
+
const gi1 = this._gradP[i + i1 + this._perm[j + j1 + this._perm[k + k1]]];
|
|
277
|
+
const gi2 = this._gradP[i + i2 + this._perm[j + j2 + this._perm[k + k2]]];
|
|
278
|
+
const gi3 = this._gradP[i + 1 + this._perm[j + 1 + this._perm[k + 1]]];
|
|
279
|
+
// Calculate the contribution from the four corners
|
|
280
|
+
let t0 = 0.6 - x0 * x0 - y0 * y0 - z0 * z0;
|
|
281
|
+
if (t0 < 0) {
|
|
282
|
+
n0 = 0;
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
t0 *= t0;
|
|
286
|
+
n0 = t0 * t0 * gi0.dotXYZ(x0, y0, z0); // (x,y) of grad3 used for 2D gradient
|
|
287
|
+
}
|
|
288
|
+
let t1 = 0.6 - x1 * x1 - y1 * y1 - z1 * z1;
|
|
289
|
+
if (t1 < 0) {
|
|
290
|
+
n1 = 0;
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
t1 *= t1;
|
|
294
|
+
n1 = t1 * t1 * gi1.dotXYZ(x1, y1, z1);
|
|
295
|
+
}
|
|
296
|
+
let t2 = 0.6 - x2 * x2 - y2 * y2 - z2 * z2;
|
|
297
|
+
if (t2 < 0) {
|
|
298
|
+
n2 = 0;
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
t2 *= t2;
|
|
302
|
+
n2 = t2 * t2 * gi2.dotXYZ(x2, y2, z2);
|
|
303
|
+
}
|
|
304
|
+
let t3 = 0.6 - x3 * x3 - y3 * y3 - z3 * z3;
|
|
305
|
+
if (t3 < 0) {
|
|
306
|
+
n3 = 0;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
t3 *= t3;
|
|
310
|
+
n3 = t3 * t3 * gi3.dotXYZ(x3, y3, z3);
|
|
311
|
+
}
|
|
312
|
+
// Add contributions from each corner to get the final noise value.
|
|
313
|
+
// The result is scaled to return values in the interval [-1,1].
|
|
314
|
+
return 32 * (n0 + n1 + n2 + n3);
|
|
315
|
+
}
|
|
164
316
|
}
|
|
165
317
|
/**
|
|
166
318
|
* Returns a random value in a given range.
|
|
167
|
-
* Uses the JS-internal `Math.random()`. Use {
|
|
319
|
+
* Uses the JS-internal `Math.random()`. Use {@linkcode Random} for a PRNG with more features.
|
|
168
320
|
* @param min The lower bound.
|
|
169
321
|
* @param max The upper bound.
|
|
170
322
|
* @returns A random value between the lower and upper bound.
|
|
323
|
+
* @group Random
|
|
171
324
|
*/
|
|
172
325
|
export const randomRange = (min, max) => {
|
|
173
326
|
return Math.random() * (max - min) + min;
|
|
@@ -177,11 +330,16 @@ export const randomRange = (min, max) => {
|
|
|
177
330
|
* from a string.
|
|
178
331
|
* @param input The string to use as a seed.
|
|
179
332
|
* @returns A numeric seed value for a PRNG.
|
|
333
|
+
* @group Random
|
|
180
334
|
*/
|
|
181
335
|
export const seedFromString = (input) => {
|
|
182
336
|
return input
|
|
183
337
|
.split("")
|
|
184
338
|
.reduce((seed, char) => (seed = seed + ((char.charCodeAt(0) * 17989) % 2147483647)), 0);
|
|
185
339
|
};
|
|
340
|
+
/**
|
|
341
|
+
* A global PRNG instance that is ready-to-use.
|
|
342
|
+
* @group Random
|
|
343
|
+
*/
|
|
186
344
|
export const random = new Random();
|
|
187
345
|
//# sourceMappingURL=random.js.map
|
package/lib/random.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"random.js","sourceRoot":"","sources":["../source/random.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,MAAM;IACT,KAAK,CAAS;IACd,KAAK,CAAgB;IACrB,MAAM,CAAiB;IACvB,GAAG,CAAS;IACZ,GAAG,CAAS;IAEpB;;;;;;OAMG;IACH,YAAY,IAAI,GAAG,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAA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