@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.
Files changed (94) hide show
  1. package/dist/ecs/database/create-database.test.js +11 -0
  2. package/dist/ecs/database/create-database.test.js.map +1 -1
  3. package/dist/math/aabb/aabb.d.ts +42 -42
  4. package/dist/math/aabb/aabb.js +65 -62
  5. package/dist/math/aabb/aabb.js.map +1 -1
  6. package/dist/math/aabb-face/aabb-face.d.ts +59 -0
  7. package/dist/math/aabb-face/aabb-face.js +145 -0
  8. package/dist/math/aabb-face/aabb-face.js.map +1 -0
  9. package/dist/math/aabb-face/aabb-face.test.d.ts +1 -0
  10. package/dist/math/aabb-face/aabb-face.test.js +54 -0
  11. package/dist/math/aabb-face/aabb-face.test.js.map +1 -0
  12. package/dist/math/f32/f32.d.ts +8 -6
  13. package/dist/math/f32/f32.js +4 -1
  14. package/dist/math/f32/f32.js.map +1 -1
  15. package/dist/math/i32/i32.d.ts +9 -6
  16. package/dist/math/i32/i32.js +5 -2
  17. package/dist/math/i32/i32.js.map +1 -1
  18. package/dist/math/index.d.ts +13 -22
  19. package/dist/math/index.js +13 -22
  20. package/dist/math/index.js.map +1 -1
  21. package/dist/math/line2/line2.d.ts +36 -36
  22. package/dist/math/line2/line2.js +55 -52
  23. package/dist/math/line2/line2.js.map +1 -1
  24. package/dist/math/line3/line3.d.ts +48 -43
  25. package/dist/math/line3/line3.js +64 -52
  26. package/dist/math/line3/line3.js.map +1 -1
  27. package/dist/math/mat4x4/mat4x4.d.ts +34 -34
  28. package/dist/math/mat4x4/mat4x4.js +216 -213
  29. package/dist/math/mat4x4/mat4x4.js.map +1 -1
  30. package/dist/math/picking/get-closest-entity-to-line.d.ts +4 -0
  31. package/dist/math/picking/get-closest-entity-to-line.js +30 -0
  32. package/dist/math/picking/get-closest-entity-to-line.js.map +1 -0
  33. package/dist/math/picking/get-closest-entity-to-point.d.ts +4 -0
  34. package/dist/math/picking/get-closest-entity-to-point.js +27 -0
  35. package/dist/math/picking/get-closest-entity-to-point.js.map +1 -0
  36. package/dist/math/picking/get-intersecting-entities.d.ts +12 -0
  37. package/dist/math/picking/get-intersecting-entities.js +15 -0
  38. package/dist/math/picking/get-intersecting-entities.js.map +1 -0
  39. package/dist/math/picking/index.d.ts +4 -0
  40. package/dist/math/picking/index.js +4 -0
  41. package/dist/math/picking/index.js.map +1 -1
  42. package/dist/math/picking/pick-from-tables.d.ts +1 -0
  43. package/dist/math/picking/pick-from-tables.js +7 -98
  44. package/dist/math/picking/pick-from-tables.js.map +1 -1
  45. package/dist/math/picking/pick-result.d.ts +5 -2
  46. package/dist/math/plane/plane.d.ts +43 -0
  47. package/dist/math/plane/plane.js +70 -0
  48. package/dist/math/plane/plane.js.map +1 -0
  49. package/dist/math/plane/plane.test.d.ts +1 -0
  50. package/dist/math/plane/plane.test.js +132 -0
  51. package/dist/math/plane/plane.test.js.map +1 -0
  52. package/dist/math/quat/quat.d.ts +49 -39
  53. package/dist/math/quat/quat.js +225 -185
  54. package/dist/math/quat/quat.js.map +1 -1
  55. package/dist/math/u32/u32.d.ts +9 -7
  56. package/dist/math/u32/u32.js +4 -1
  57. package/dist/math/u32/u32.js.map +1 -1
  58. package/dist/math/vec2/vec2.d.ts +61 -61
  59. package/dist/math/vec2/vec2.js +93 -90
  60. package/dist/math/vec2/vec2.js.map +1 -1
  61. package/dist/math/vec3/vec3.d.ts +66 -63
  62. package/dist/math/vec3/vec3.js +137 -129
  63. package/dist/math/vec3/vec3.js.map +1 -1
  64. package/dist/math/vec4/vec4.d.ts +61 -61
  65. package/dist/math/vec4/vec4.js +132 -129
  66. package/dist/math/vec4/vec4.js.map +1 -1
  67. package/dist/observe/to-async-generator.js +4 -4
  68. package/dist/observe/to-async-generator.js.map +1 -1
  69. package/dist/old-ecs/action-ecs/action-ecs.test.js +1 -1
  70. package/dist/old-ecs/action-ecs/action-ecs.test.js.map +1 -1
  71. package/dist/old-ecs/action-ecs/action-types.d.ts +7 -0
  72. package/dist/old-ecs/action-ecs/action-types.js.map +1 -1
  73. package/dist/old-ecs/core-ecs/core-ecs-serialization.test.js +205 -1
  74. package/dist/old-ecs/core-ecs/core-ecs-serialization.test.js.map +1 -1
  75. package/dist/old-ecs/core-ecs/core-ecs-types.d.ts +4 -1
  76. package/dist/old-ecs/core-ecs/core-ecs.d.ts +2 -0
  77. package/dist/old-ecs/core-ecs/core-ecs.js +23 -9
  78. package/dist/old-ecs/core-ecs/core-ecs.js.map +1 -1
  79. package/dist/old-ecs/ecs/ecs-types.d.ts +7 -0
  80. package/dist/old-ecs/ecs/ecs.test.js +1 -1
  81. package/dist/old-ecs/ecs/ecs.test.js.map +1 -1
  82. package/dist/old-ecs/privacy/helper-functions.d.ts +43 -0
  83. package/dist/old-ecs/privacy/helper-functions.js +76 -0
  84. package/dist/old-ecs/privacy/helper-functions.js.map +1 -0
  85. package/dist/old-ecs/privacy/helper-functions.test.d.ts +1 -0
  86. package/dist/old-ecs/privacy/helper-functions.test.js +173 -0
  87. package/dist/old-ecs/privacy/helper-functions.test.js.map +1 -0
  88. package/dist/old-ecs/transaction-ecs/transaction-ecs.test.js +1 -1
  89. package/dist/old-ecs/transaction-ecs/transaction-ecs.test.js.map +1 -1
  90. package/dist/old-ecs/transaction-ecs/transaction-types.d.ts +7 -0
  91. package/dist/samples/todo/services/state-service/create-todo-database.d.ts +2 -2
  92. package/dist/samples/todo/services/state-service/create-todo-store.d.ts +2 -2
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. 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 declare const schema: {
4
- readonly type: "object";
5
- readonly properties: {
6
- readonly a: {
7
- readonly type: "array";
8
- readonly items: {
9
- readonly type: "number";
10
- readonly precision: 1;
11
- readonly default: number;
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 minItems: 3;
14
- readonly maxItems: 3;
15
- readonly default: readonly [0, 0, 0];
16
- };
17
- readonly b: {
18
- readonly type: "array";
19
- readonly items: {
20
- readonly type: "number";
21
- readonly precision: 1;
22
- readonly default: number;
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
- readonly minItems: 3;
25
- readonly maxItems: 3;
26
- readonly default: readonly [0, 0, 0];
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
- readonly required: readonly ["a", "b"];
30
- readonly additionalProperties: false;
31
- readonly default: {
32
- readonly a: readonly [0, 0, 0];
33
- readonly b: readonly [0, 0, 0];
34
- };
35
- };
36
- export type Type = FromSchema<typeof schema>;
37
- type Line3 = Type;
38
- export declare const layout: import("../../typed-buffer/index.js").StructLayout;
39
- export declare 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
- 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
+ }
@@ -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
- const { schema: Vec3Schema } = Vec3;
25
- export const schema = {
26
- type: 'object',
27
- properties: {
28
- a: Vec3Schema,
29
- b: Vec3Schema,
30
- },
31
- required: ['a', 'b'],
32
- additionalProperties: false,
33
- default: {
34
- a: Vec3Schema.default,
35
- b: Vec3Schema.default,
36
- }
37
- };
38
- export const layout = getStructLayout(schema);
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;AAEnC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;AAEpC,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,CAAC,EAAE,UAAU;QACb,CAAC,EAAE,UAAU;KAChB;IACD,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,KAAK;IAC3B,OAAO,EAAE;QACL,CAAC,EAAE,UAAU,CAAC,OAAO;QACrB,CAAC,EAAE,UAAU,CAAC,OAAO;KACxB;CACsB,CAAC;AAI5B,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;AAE9C,0BAA0B;AAC1B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAW,EAAE,KAAa,EAAQ,EAAE;IAC5D,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EAAE;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/B,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC,CAAC;AACN,CAAC,EA1EgB,KAAK,KAAL,KAAK,QA0ErB"}
@@ -1,37 +1,37 @@
1
1
  import { FromSchema } from "../../schema/index.js";
2
2
  import { Vec3, Vec4 } from "../index.js";
3
- export declare const schema: {
4
- readonly type: "array";
5
- readonly items: {
6
- readonly type: "number";
7
- readonly precision: 1;
8
- readonly default: number;
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
- readonly minItems: 16;
11
- readonly maxItems: 16;
12
- readonly default: readonly [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
13
- };
14
- export type Type = FromSchema<typeof schema>;
15
- type Mat4x4 = Type;
16
- export declare const layout: import("../../typed-buffer/index.js").StructLayout;
17
- export type Index = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
18
- export declare const identity: () => Mat4x4;
19
- export declare const zero: () => Mat4x4;
20
- export declare const add: (a: Mat4x4, b: Mat4x4) => Mat4x4;
21
- export declare const subtract: (a: Mat4x4, b: Mat4x4) => Mat4x4;
22
- export declare const multiply: (a: Mat4x4, b: Mat4x4) => Mat4x4;
23
- export declare const scale: (m: Mat4x4, s: number) => Mat4x4;
24
- export declare const multiplyVec4: (m: Mat4x4, v: Vec4) => Vec4;
25
- export declare const multiplyVec3: (m: Mat4x4, v: Vec3) => Vec3;
26
- export declare const determinant: (m: Mat4x4) => number;
27
- export declare const inverse: (m: Mat4x4) => Mat4x4;
28
- export declare const transpose: (m: Mat4x4) => Mat4x4;
29
- export declare const translation: (x: number, y: number, z: number) => Mat4x4;
30
- export declare const scaling: (x: number, y: number, z: number) => Mat4x4;
31
- export declare const rotationX: (angle: number) => Mat4x4;
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
+ }