@adobe/data 0.5.14 → 0.5.17
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/dist/ecs/database/create-database.test.js +11 -0
- package/dist/ecs/database/create-database.test.js.map +1 -1
- package/dist/math/aabb/aabb.d.ts +42 -42
- package/dist/math/aabb/aabb.js +65 -62
- package/dist/math/aabb/aabb.js.map +1 -1
- package/dist/math/aabb-face/aabb-face.d.ts +59 -0
- package/dist/math/aabb-face/aabb-face.js +145 -0
- package/dist/math/aabb-face/aabb-face.js.map +1 -0
- package/dist/math/aabb-face/aabb-face.test.d.ts +1 -0
- package/dist/math/aabb-face/aabb-face.test.js +54 -0
- package/dist/math/aabb-face/aabb-face.test.js.map +1 -0
- package/dist/math/f32/f32.d.ts +8 -6
- package/dist/math/f32/f32.js +4 -1
- package/dist/math/f32/f32.js.map +1 -1
- package/dist/math/i32/i32.d.ts +9 -6
- package/dist/math/i32/i32.js +5 -2
- package/dist/math/i32/i32.js.map +1 -1
- package/dist/math/index.d.ts +13 -22
- package/dist/math/index.js +13 -22
- package/dist/math/index.js.map +1 -1
- package/dist/math/line2/line2.d.ts +36 -36
- package/dist/math/line2/line2.js +55 -52
- package/dist/math/line2/line2.js.map +1 -1
- package/dist/math/line3/line3.d.ts +48 -43
- package/dist/math/line3/line3.js +64 -52
- package/dist/math/line3/line3.js.map +1 -1
- package/dist/math/mat4x4/mat4x4.d.ts +34 -34
- package/dist/math/mat4x4/mat4x4.js +216 -213
- package/dist/math/mat4x4/mat4x4.js.map +1 -1
- package/dist/math/picking/get-closest-entity-to-line.d.ts +4 -0
- package/dist/math/picking/get-closest-entity-to-line.js +30 -0
- package/dist/math/picking/get-closest-entity-to-line.js.map +1 -0
- package/dist/math/picking/get-closest-entity-to-point.d.ts +4 -0
- package/dist/math/picking/get-closest-entity-to-point.js +27 -0
- package/dist/math/picking/get-closest-entity-to-point.js.map +1 -0
- package/dist/math/picking/get-intersecting-entities.d.ts +12 -0
- package/dist/math/picking/get-intersecting-entities.js +15 -0
- package/dist/math/picking/get-intersecting-entities.js.map +1 -0
- package/dist/math/picking/index.d.ts +4 -0
- package/dist/math/picking/index.js +4 -0
- package/dist/math/picking/index.js.map +1 -1
- package/dist/math/picking/pick-from-tables.d.ts +1 -0
- package/dist/math/picking/pick-from-tables.js +7 -98
- package/dist/math/picking/pick-from-tables.js.map +1 -1
- package/dist/math/picking/pick-result.d.ts +5 -2
- package/dist/math/plane/plane.d.ts +43 -0
- package/dist/math/plane/plane.js +70 -0
- package/dist/math/plane/plane.js.map +1 -0
- package/dist/math/plane/plane.test.d.ts +1 -0
- package/dist/math/plane/plane.test.js +132 -0
- package/dist/math/plane/plane.test.js.map +1 -0
- package/dist/math/quat/quat.d.ts +49 -39
- package/dist/math/quat/quat.js +225 -185
- package/dist/math/quat/quat.js.map +1 -1
- package/dist/math/u32/u32.d.ts +9 -7
- package/dist/math/u32/u32.js +4 -1
- package/dist/math/u32/u32.js.map +1 -1
- package/dist/math/vec2/vec2.d.ts +61 -61
- package/dist/math/vec2/vec2.js +93 -90
- package/dist/math/vec2/vec2.js.map +1 -1
- package/dist/math/vec3/vec3.d.ts +66 -63
- package/dist/math/vec3/vec3.js +137 -129
- package/dist/math/vec3/vec3.js.map +1 -1
- package/dist/math/vec4/vec4.d.ts +61 -61
- package/dist/math/vec4/vec4.js +132 -129
- package/dist/math/vec4/vec4.js.map +1 -1
- package/dist/observe/to-async-generator.js +4 -4
- package/dist/observe/to-async-generator.js.map +1 -1
- package/dist/old-ecs/action-ecs/action-ecs.test.js +1 -1
- package/dist/old-ecs/action-ecs/action-ecs.test.js.map +1 -1
- package/dist/old-ecs/action-ecs/action-types.d.ts +7 -0
- package/dist/old-ecs/action-ecs/action-types.js.map +1 -1
- package/dist/old-ecs/core-ecs/core-ecs-serialization.test.js +205 -1
- package/dist/old-ecs/core-ecs/core-ecs-serialization.test.js.map +1 -1
- package/dist/old-ecs/core-ecs/core-ecs-types.d.ts +4 -1
- package/dist/old-ecs/core-ecs/core-ecs.d.ts +2 -0
- package/dist/old-ecs/core-ecs/core-ecs.js +23 -9
- package/dist/old-ecs/core-ecs/core-ecs.js.map +1 -1
- package/dist/old-ecs/ecs/ecs-types.d.ts +7 -0
- package/dist/old-ecs/ecs/ecs.test.js +1 -1
- package/dist/old-ecs/ecs/ecs.test.js.map +1 -1
- package/dist/old-ecs/privacy/helper-functions.d.ts +43 -0
- package/dist/old-ecs/privacy/helper-functions.js +76 -0
- package/dist/old-ecs/privacy/helper-functions.js.map +1 -0
- package/dist/old-ecs/privacy/helper-functions.test.d.ts +1 -0
- package/dist/old-ecs/privacy/helper-functions.test.js +173 -0
- package/dist/old-ecs/privacy/helper-functions.test.js.map +1 -0
- package/dist/old-ecs/transaction-ecs/transaction-ecs.test.js +1 -1
- package/dist/old-ecs/transaction-ecs/transaction-ecs.test.js.map +1 -1
- package/dist/old-ecs/transaction-ecs/transaction-types.d.ts +7 -0
- package/dist/samples/todo/services/state-service/create-todo-database.d.ts +2 -2
- package/dist/samples/todo/services/state-service/create-todo-store.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -3
|
@@ -1,49 +1,54 @@
|
|
|
1
1
|
import { FromSchema } from "../../schema/index.js";
|
|
2
2
|
import { Vec3 } from "../index.js";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
readonly type: "
|
|
10
|
-
readonly
|
|
11
|
-
|
|
3
|
+
export type Line3 = FromSchema<typeof Line3.schema>;
|
|
4
|
+
export declare namespace Line3 {
|
|
5
|
+
const schema: {
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly a: {
|
|
9
|
+
readonly type: "array";
|
|
10
|
+
readonly items: {
|
|
11
|
+
readonly type: "number";
|
|
12
|
+
readonly precision: 1;
|
|
13
|
+
readonly default: number;
|
|
14
|
+
};
|
|
15
|
+
readonly minItems: 3;
|
|
16
|
+
readonly maxItems: 3;
|
|
17
|
+
readonly default: readonly [0, 0, 0];
|
|
12
18
|
};
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly default:
|
|
19
|
+
readonly b: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly items: {
|
|
22
|
+
readonly type: "number";
|
|
23
|
+
readonly precision: 1;
|
|
24
|
+
readonly default: number;
|
|
25
|
+
};
|
|
26
|
+
readonly minItems: 3;
|
|
27
|
+
readonly maxItems: 3;
|
|
28
|
+
readonly default: readonly [0, 0, 0];
|
|
23
29
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
};
|
|
31
|
+
readonly required: readonly ["a", "b"];
|
|
32
|
+
readonly additionalProperties: false;
|
|
33
|
+
readonly default: {
|
|
34
|
+
readonly a: readonly [0, 0, 0];
|
|
35
|
+
readonly b: readonly [0, 0, 0];
|
|
27
36
|
};
|
|
28
37
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
*/
|
|
47
|
-
export declare const closestPointOnLine: (line: Line3, point: Vec3) => number;
|
|
48
|
-
export declare const subLine: (line: Line3, alpha: number, beta: number) => Line3;
|
|
49
|
-
export {};
|
|
38
|
+
const layout: import("../../typed-buffer/index.js").StructLayout;
|
|
39
|
+
const interpolate: (line: Line3, alpha: number) => Vec3;
|
|
40
|
+
/**
|
|
41
|
+
* Calculates the alpha value (0-1) representing the closest point on a line to a given point.
|
|
42
|
+
*
|
|
43
|
+
* @param line - The line segment
|
|
44
|
+
* @param point - The point in 3D space
|
|
45
|
+
* @returns Alpha value, usually between 0 and 1, where 0 is line.a and 1 is line.b
|
|
46
|
+
*/
|
|
47
|
+
const closestPointOnLine: (line: Line3, point: Vec3) => number;
|
|
48
|
+
const subLine: (line: Line3, alpha: number, beta: number) => Line3;
|
|
49
|
+
/**
|
|
50
|
+
* Returns a unit vector pointing from line.a to line.b. If the line has zero length,
|
|
51
|
+
* returns the provided default direction (defaults to [0,0,1]).
|
|
52
|
+
*/
|
|
53
|
+
const direction: (line: Line3) => Vec3;
|
|
54
|
+
}
|
package/dist/math/line3/line3.js
CHANGED
|
@@ -21,57 +21,69 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
21
21
|
SOFTWARE.*/
|
|
22
22
|
import { getStructLayout } from "../../typed-buffer/index.js";
|
|
23
23
|
import { Vec3 } from "../index.js";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Line3 utility functions
|
|
40
|
-
export const interpolate = (line, alpha) => {
|
|
41
|
-
const a = line.a;
|
|
42
|
-
const b = line.b;
|
|
43
|
-
return [a[0] + alpha * (b[0] - a[0]), a[1] + alpha * (b[1] - a[1]), a[2] + alpha * (b[2] - a[2])];
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Calculates the alpha value (0-1) representing the closest point on a line to a given point.
|
|
47
|
-
*
|
|
48
|
-
* @param line - The line segment
|
|
49
|
-
* @param point - The point in 3D space
|
|
50
|
-
* @returns Alpha value, usually between 0 and 1, where 0 is line.a and 1 is line.b
|
|
51
|
-
*/
|
|
52
|
-
export const closestPointOnLine = (line, point) => {
|
|
53
|
-
const { a, b } = line;
|
|
54
|
-
// Calculate the direction vector of the line
|
|
55
|
-
const lineDirection = Vec3.subtract(b, a);
|
|
56
|
-
// Calculate the vector from line start to the point
|
|
57
|
-
const pointToStart = Vec3.subtract(point, a);
|
|
58
|
-
// Calculate the dot product to find the projection
|
|
59
|
-
const dotProduct = Vec3.dot(pointToStart, lineDirection);
|
|
60
|
-
const lineLengthSquared = Vec3.dot(lineDirection, lineDirection);
|
|
61
|
-
// Avoid division by zero
|
|
62
|
-
if (lineLengthSquared === 0) {
|
|
63
|
-
return 0;
|
|
64
|
-
}
|
|
65
|
-
// Calculate alpha (projection parameter)
|
|
66
|
-
const alpha = dotProduct / lineLengthSquared;
|
|
67
|
-
// Do not clamp alpha, it can be outside of [0, 1]
|
|
68
|
-
// User can clamp after if they want to.
|
|
69
|
-
return alpha;
|
|
70
|
-
};
|
|
71
|
-
export const subLine = (line, alpha, beta) => {
|
|
72
|
-
return {
|
|
73
|
-
a: interpolate(line, alpha),
|
|
74
|
-
b: interpolate(line, beta),
|
|
24
|
+
export var Line3;
|
|
25
|
+
(function (Line3) {
|
|
26
|
+
const { schema: Vec3Schema } = Vec3;
|
|
27
|
+
Line3.schema = {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
a: Vec3Schema,
|
|
31
|
+
b: Vec3Schema,
|
|
32
|
+
},
|
|
33
|
+
required: ['a', 'b'],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
default: {
|
|
36
|
+
a: Vec3Schema.default,
|
|
37
|
+
b: Vec3Schema.default,
|
|
38
|
+
}
|
|
75
39
|
};
|
|
76
|
-
|
|
40
|
+
Line3.layout = getStructLayout(Line3.schema);
|
|
41
|
+
// Line3 utility functions
|
|
42
|
+
Line3.interpolate = (line, alpha) => {
|
|
43
|
+
const a = line.a;
|
|
44
|
+
const b = line.b;
|
|
45
|
+
return [a[0] + alpha * (b[0] - a[0]), a[1] + alpha * (b[1] - a[1]), a[2] + alpha * (b[2] - a[2])];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Calculates the alpha value (0-1) representing the closest point on a line to a given point.
|
|
49
|
+
*
|
|
50
|
+
* @param line - The line segment
|
|
51
|
+
* @param point - The point in 3D space
|
|
52
|
+
* @returns Alpha value, usually between 0 and 1, where 0 is line.a and 1 is line.b
|
|
53
|
+
*/
|
|
54
|
+
Line3.closestPointOnLine = (line, point) => {
|
|
55
|
+
const { a, b } = line;
|
|
56
|
+
// Calculate the direction vector of the line
|
|
57
|
+
const lineDirection = Vec3.subtract(b, a);
|
|
58
|
+
// Calculate the vector from line start to the point
|
|
59
|
+
const pointToStart = Vec3.subtract(point, a);
|
|
60
|
+
// Calculate the dot product to find the projection
|
|
61
|
+
const dotProduct = Vec3.dot(pointToStart, lineDirection);
|
|
62
|
+
const lineLengthSquared = Vec3.dot(lineDirection, lineDirection);
|
|
63
|
+
// Avoid division by zero
|
|
64
|
+
if (lineLengthSquared === 0) {
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
67
|
+
// Calculate alpha (projection parameter)
|
|
68
|
+
const alpha = dotProduct / lineLengthSquared;
|
|
69
|
+
// Do not clamp alpha, it can be outside of [0, 1]
|
|
70
|
+
// User can clamp after if they want to.
|
|
71
|
+
return alpha;
|
|
72
|
+
};
|
|
73
|
+
Line3.subLine = (line, alpha, beta) => {
|
|
74
|
+
return {
|
|
75
|
+
a: Line3.interpolate(line, alpha),
|
|
76
|
+
b: Line3.interpolate(line, beta),
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Returns a unit vector pointing from line.a to line.b. If the line has zero length,
|
|
81
|
+
* returns the provided default direction (defaults to [0,0,1]).
|
|
82
|
+
*/
|
|
83
|
+
Line3.direction = (line) => {
|
|
84
|
+
const delta = Vec3.subtract(line.b, line.a);
|
|
85
|
+
const len = Vec3.length(delta);
|
|
86
|
+
return len === 0 ? [0, 0, 1] : Vec3.normalize(delta);
|
|
87
|
+
};
|
|
88
|
+
})(Line3 || (Line3 = {}));
|
|
77
89
|
//# sourceMappingURL=line3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line3.js","sourceRoot":"","sources":["../../../src/math/line3/line3.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAGX,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"line3.js","sourceRoot":"","sources":["../../../src/math/line3/line3.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { FromSchema } from "../../schema/index.js";
|
|
2
2
|
import { Vec3, Vec4 } from "../index.js";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly type: "
|
|
7
|
-
readonly
|
|
8
|
-
|
|
3
|
+
export type Mat4x4 = FromSchema<typeof Mat4x4.schema>;
|
|
4
|
+
export declare namespace Mat4x4 {
|
|
5
|
+
const schema: {
|
|
6
|
+
readonly type: "array";
|
|
7
|
+
readonly items: {
|
|
8
|
+
readonly type: "number";
|
|
9
|
+
readonly precision: 1;
|
|
10
|
+
readonly default: number;
|
|
11
|
+
};
|
|
12
|
+
readonly minItems: 16;
|
|
13
|
+
readonly maxItems: 16;
|
|
14
|
+
readonly default: readonly [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
|
9
15
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare const rotationY: (angle: number) => Mat4x4;
|
|
33
|
-
export declare const rotationZ: (angle: number) => Mat4x4;
|
|
34
|
-
export declare const perspective: (fovy: number, aspect: number, near: number, far: number) => Mat4x4;
|
|
35
|
-
export declare const orthographic: (left: number, right: number, bottom: number, top: number, near: number, far: number) => Mat4x4;
|
|
36
|
-
export declare const lookAt: (eye: Vec3, center: Vec3, up: Vec3) => Mat4x4;
|
|
37
|
-
export {};
|
|
16
|
+
const layout: import("../../typed-buffer/index.js").StructLayout;
|
|
17
|
+
type Index = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
18
|
+
const identity: Mat4x4;
|
|
19
|
+
const zero: Mat4x4;
|
|
20
|
+
const add: (a: Mat4x4, b: Mat4x4) => Mat4x4;
|
|
21
|
+
const subtract: (a: Mat4x4, b: Mat4x4) => Mat4x4;
|
|
22
|
+
const multiply: (a: Mat4x4, b: Mat4x4) => Mat4x4;
|
|
23
|
+
const scale: (m: Mat4x4, s: number) => Mat4x4;
|
|
24
|
+
const multiplyVec4: (m: Mat4x4, v: Vec4) => Vec4;
|
|
25
|
+
const multiplyVec3: (m: Mat4x4, v: Vec3) => Vec3;
|
|
26
|
+
const determinant: (m: Mat4x4) => number;
|
|
27
|
+
const inverse: (m: Mat4x4) => Mat4x4;
|
|
28
|
+
const transpose: (m: Mat4x4) => Mat4x4;
|
|
29
|
+
const translation: (x: number, y: number, z: number) => Mat4x4;
|
|
30
|
+
const scaling: (x: number, y: number, z: number) => Mat4x4;
|
|
31
|
+
const rotationX: (angle: number) => Mat4x4;
|
|
32
|
+
const rotationY: (angle: number) => Mat4x4;
|
|
33
|
+
const rotationZ: (angle: number) => Mat4x4;
|
|
34
|
+
const perspective: (fovy: number, aspect: number, near: number, far: number) => Mat4x4;
|
|
35
|
+
const orthographic: (left: number, right: number, bottom: number, top: number, near: number, far: number) => Mat4x4;
|
|
36
|
+
const lookAt: (eye: Vec3, center: Vec3, up: Vec3) => Mat4x4;
|
|
37
|
+
}
|