@adobe/data 0.7.0 → 0.7.2
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/applied/applied-database.d.ts +47 -0
- package/dist/ecs/database/applied/applied-database.js +22 -0
- package/dist/ecs/database/applied/applied-database.js.map +1 -0
- package/dist/ecs/database/applied/applied-entry.d.ts +30 -0
- package/dist/ecs/database/applied/applied-entry.js +84 -0
- package/dist/ecs/database/applied/applied-entry.js.map +1 -0
- package/dist/ecs/database/applied/create-applied-database.d.ts +8 -0
- package/dist/ecs/database/applied/create-applied-database.js +266 -0
- package/dist/ecs/database/applied/create-applied-database.js.map +1 -0
- package/dist/ecs/database/applied/create-applied-database.test.js +94 -0
- package/dist/ecs/database/applied/create-applied-database.test.js.map +1 -0
- package/dist/ecs/database/create-applied-database.d.ts +49 -0
- package/dist/ecs/database/create-applied-database.js +275 -0
- package/dist/ecs/database/create-applied-database.js.map +1 -0
- package/dist/ecs/database/index.d.ts +1 -0
- package/dist/ecs/database/index.js +1 -0
- package/dist/ecs/database/index.js.map +1 -1
- package/dist/ecs/database/reconciling/applied-database.d.ts +47 -0
- package/dist/ecs/database/reconciling/applied-database.js +22 -0
- package/dist/ecs/database/reconciling/applied-database.js.map +1 -0
- package/dist/ecs/database/reconciling/applied-entry.d.ts +30 -0
- package/dist/ecs/database/reconciling/applied-entry.js +84 -0
- package/dist/ecs/database/reconciling/applied-entry.js.map +1 -0
- package/dist/ecs/database/reconciling/create-applied-database.d.ts +8 -0
- package/dist/ecs/database/reconciling/create-applied-database.js +266 -0
- package/dist/ecs/database/reconciling/create-applied-database.js.map +1 -0
- package/dist/ecs/database/reconciling/create-applied-database.test.js +94 -0
- package/dist/ecs/database/reconciling/create-applied-database.test.js.map +1 -0
- package/dist/ecs/database/replicate.d.ts +9 -0
- package/dist/ecs/database/replicate.js +66 -0
- package/dist/ecs/database/replicate.js.map +1 -0
- package/dist/ecs/database/replicate.test.js +235 -0
- package/dist/ecs/database/replicate.test.js.map +1 -0
- package/dist/ecs/database/transactional-store/create-transactional-store.test.js +20 -0
- package/dist/ecs/database/transactional-store/create-transactional-store.test.js.map +1 -1
- package/dist/ecs/database/transactional-store/patch-entity-values.js +4 -1
- package/dist/ecs/database/transactional-store/patch-entity-values.js.map +1 -1
- package/dist/ecs/store/core/core.d.ts +2 -2
- package/dist/ecs/store/core/create-core.js +5 -2
- package/dist/ecs/store/core/create-core.js.map +1 -1
- package/dist/ecs/store/store-schema/create-store-schema-test.js +2 -2
- package/dist/ecs/store/store-schema/create-store-schema-test.js.map +1 -1
- package/dist/ecs/store/store-schema/create-store-schema.d.ts +11 -1
- package/dist/ecs/store/store-schema/create-store-schema.js +30 -44
- package/dist/ecs/store/store-schema/create-store-schema.js.map +1 -1
- package/dist/ecs/store/store-schema/index.d.ts +2 -1
- package/dist/ecs/store/store-schema/index.js +23 -20
- package/dist/ecs/store/store-schema/index.js.map +1 -1
- package/dist/ecs/store/store-schema/store-schema.d.ts +12 -1
- package/dist/ecs/store/store-schema/store-schema.js +21 -55
- package/dist/ecs/store/store-schema/store-schema.js.map +1 -1
- package/dist/graphics/frame.d.ts +22 -1
- package/dist/graphics/frame.js +11 -14
- package/dist/graphics/frame.js.map +1 -1
- package/dist/graphics/get-web-gpu-device-and-context.d.ts +2 -1
- package/dist/graphics/get-web-gpu-device-and-context.js +20 -23
- package/dist/graphics/get-web-gpu-device-and-context.js.map +1 -1
- package/dist/graphics/graphics-context.d.ts +5 -1
- package/dist/graphics/graphics-context.js +0 -5
- package/dist/graphics/graphics-context.js.map +1 -1
- package/dist/lit/elements/service-application.d.ts +9 -0
- package/dist/lit/elements/service-application.js +55 -0
- package/dist/lit/elements/service-application.js.map +1 -0
- package/dist/lit/elements/service-context.d.ts +1 -0
- package/dist/{ecs/entity/u32.js → lit/elements/service-context.js} +3 -3
- package/dist/lit/elements/service-context.js.map +1 -0
- package/dist/lit/elements/service-element.d.ts +6 -0
- package/dist/lit/elements/service-element.js +43 -0
- package/dist/lit/elements/service-element.js.map +1 -0
- package/dist/math/picking/get-closest-entity-to-line.js +1 -1
- package/dist/math/picking/get-closest-entity-to-line.js.map +1 -1
- package/dist/math/picking/get-closest-entity-to-point.js +1 -1
- package/dist/math/picking/get-closest-entity-to-point.js.map +1 -1
- package/dist/math/picking/pick-from-tables.js +1 -1
- package/dist/math/picking/pick-from-tables.js.map +1 -1
- package/dist/math/picking/pick-result.d.ts +2 -4
- package/dist/samples/todo/services/state-service/create-todo-database.d.ts +1 -1
- package/dist/samples/todo/services/state-service/create-todo-store.d.ts +1 -1
- package/dist/table/compact-table.d.ts +7 -0
- package/dist/table/compact-table.js +15 -0
- package/dist/table/compact-table.js.map +1 -0
- package/dist/table/compact-table.test.js +121 -0
- package/dist/table/compact-table.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/ecs/database/transactional-store/entity-id-preservation.test.js +0 -106
- package/dist/ecs/database/transactional-store/entity-id-preservation.test.js.map +0 -1
- package/dist/ecs/entity/entity.d.ts +0 -8
- package/dist/ecs/entity/entity.js +0 -3
- package/dist/ecs/entity/entity.js.map +0 -1
- package/dist/ecs/entity/u32.d.ts +0 -8
- package/dist/ecs/entity/u32.js.map +0 -1
- package/dist/math/aabb-face/face.d.ts +0 -51
- package/dist/math/aabb-face/face.js +0 -110
- package/dist/math/aabb-face/face.js.map +0 -1
- package/dist/math/aabb-face/face.test.js +0 -94
- package/dist/math/aabb-face/face.test.js.map +0 -1
- package/dist/math/box/box.d.ts +0 -50
- package/dist/math/box/box.js +0 -23
- package/dist/math/box/box.js.map +0 -1
- package/dist/math/face/face.d.ts +0 -51
- package/dist/math/face/face.js +0 -110
- package/dist/math/face/face.js.map +0 -1
- package/dist/math/face/face.test.js +0 -94
- package/dist/math/face/face.test.js.map +0 -1
- package/dist/math/picking/face.js +0 -2
- package/dist/math/picking/face.js.map +0 -1
- package/dist/math/picking/getClosestEntityToLine.d.ts +0 -4
- package/dist/math/picking/getClosestEntityToLine.js +0 -29
- package/dist/math/picking/getClosestEntityToLine.js.map +0 -1
- package/dist/math/picking/getClosestEntityToPoint.d.ts +0 -4
- package/dist/math/picking/getClosestEntityToPoint.js +0 -27
- package/dist/math/picking/getClosestEntityToPoint.js.map +0 -1
- package/dist/math/picking/getIntersectingEntities.d.ts +0 -12
- package/dist/math/picking/getIntersectingEntities.js +0 -15
- package/dist/math/picking/getIntersectingEntities.js.map +0 -1
- package/dist/math/transform/debug-inverse.d.ts +0 -1
- package/dist/math/transform/debug-inverse.js +0 -28
- package/dist/math/transform/debug-inverse.js.map +0 -1
- package/dist/math/transform/debug-quat.d.ts +0 -1
- package/dist/math/transform/debug-quat.js +0 -23
- package/dist/math/transform/debug-quat.js.map +0 -1
- package/dist/math/transform/debug-test.d.ts +0 -1
- package/dist/math/transform/debug-test.js +0 -34
- package/dist/math/transform/debug-test.js.map +0 -1
- package/dist/math/transform/transform.d.ts +0 -58
- package/dist/math/transform/transform.js +0 -101
- package/dist/math/transform/transform.js.map +0 -1
- package/dist/math/transform/transform.test.d.ts +0 -1
- package/dist/math/transform/transform.test.js +0 -309
- package/dist/math/transform/transform.test.js.map +0 -1
- /package/dist/ecs/database/{transactional-store/entity-id-preservation.test.d.ts → applied/create-applied-database.test.d.ts} +0 -0
- /package/dist/{math/aabb-face/face.test.d.ts → ecs/database/reconciling/create-applied-database.test.d.ts} +0 -0
- /package/dist/{math/face/face.test.d.ts → ecs/database/replicate.test.d.ts} +0 -0
- /package/dist/{math/picking/face.d.ts → table/compact-table.test.d.ts} +0 -0
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
export * from "./create-store-schema.js";
|
|
23
|
+
export * from "./store-schema.js";
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { FromSchemas } from "../../../schema/schema.js";
|
|
2
|
+
import { ComponentSchemas } from "../../component-schemas.js";
|
|
3
|
+
import { ResourceSchemas } from "../../resource-schemas.js";
|
|
4
|
+
import { Store } from "../store.js";
|
|
5
|
+
import { ArchetypeComponents } from "../archetype-components.js";
|
|
6
|
+
import { StringKeyof } from "../../../types/types.js";
|
|
7
|
+
export type StoreSchema<CS extends ComponentSchemas, RS extends ResourceSchemas, A extends ArchetypeComponents<StringKeyof<CS>>> = {
|
|
8
|
+
readonly components: CS;
|
|
9
|
+
readonly resources: RS;
|
|
10
|
+
readonly archetypes: A;
|
|
11
|
+
};
|
|
12
|
+
export type StoreFromSchema<T> = T extends StoreSchema<infer CS, infer RS, infer A> ? Store<FromSchemas<CS>, FromSchemas<RS>, A> : never;
|
|
@@ -1,57 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
2
22
|
export {};
|
|
3
|
-
// © Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
6
|
-
// in the Software without restriction, including without limitation the rights
|
|
7
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
11
|
-
// copies or substantial portions of the Software.
|
|
12
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
// SOFTWARE.*/
|
|
19
|
-
// import { FromSchemas } from "../../../schema/schema.js";
|
|
20
|
-
// import { ComponentSchemas } from "../../component-schemas.js";
|
|
21
|
-
// import { ResourceSchemas } from "../../resource-schemas.js";
|
|
22
|
-
// import { Store } from "../store.js";
|
|
23
|
-
// import { ArchetypeComponents } from "../archetype-components.js";
|
|
24
|
-
// import { StringKeyof } from "../../../types/types.js";
|
|
25
|
-
// import { Assert } from "../../../types/assert.js";
|
|
26
|
-
// import { Equal } from "../../../types/equal.js";
|
|
27
|
-
// import { Archetype } from "../../archetype/archetype.js";
|
|
28
|
-
// import { CoreComponents } from "../../core-components.js";
|
|
29
|
-
// export type StoreSchema<
|
|
30
|
-
// CS extends ComponentSchemas,
|
|
31
|
-
// RS extends ResourceSchemas,
|
|
32
|
-
// A extends ArchetypeComponents<StringKeyof<CS>>,
|
|
33
|
-
// > = {
|
|
34
|
-
// readonly components: CS;
|
|
35
|
-
// readonly resources: RS;
|
|
36
|
-
// readonly archetypes: A;
|
|
37
|
-
// };
|
|
38
|
-
// export type StoreFromSchema<T> = T extends StoreSchema<infer CS, infer RS, infer A> ? Store<FromSchemas<CS>, FromSchemas<RS>, A> : never;
|
|
39
|
-
// type CheckStoreFromSchema = StoreFromSchema<StoreSchema<{
|
|
40
|
-
// velocity: { type: "number" },
|
|
41
|
-
// particle: { type: "boolean" },
|
|
42
|
-
// }, {
|
|
43
|
-
// mousePosition: { type: "number", default: 0 },
|
|
44
|
-
// fooPosition: { type: "number", default: 0 },
|
|
45
|
-
// }, {
|
|
46
|
-
// Particle: ["particle"],
|
|
47
|
-
// DynamicParticle: ["particle", "velocity"],
|
|
48
|
-
// }>>;
|
|
49
|
-
// declare const testStore: CheckStoreFromSchema;
|
|
50
|
-
// type CheckDynamicParticle = Assert<Equal<typeof testStore.archetypes.DynamicParticle, Archetype<CoreComponents & {
|
|
51
|
-
// particle: boolean;
|
|
52
|
-
// velocity: number;
|
|
53
|
-
// }>>>;
|
|
54
|
-
// type CheckParticle = Assert<Equal<typeof testStore.archetypes.Particle, Archetype<CoreComponents & {
|
|
55
|
-
// particle: boolean;
|
|
56
|
-
// }>>>;
|
|
57
23
|
//# sourceMappingURL=store-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/store-schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/store-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW"}
|
package/dist/graphics/frame.d.ts
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { FromSchema } from "../schema/schema.js";
|
|
2
|
+
export declare const FrameSchema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly count: {
|
|
6
|
+
readonly type: "number";
|
|
7
|
+
readonly default: 0;
|
|
8
|
+
};
|
|
9
|
+
readonly deltaTime: {
|
|
10
|
+
readonly type: "number";
|
|
11
|
+
readonly default: 0;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
readonly required: readonly ["count", "deltaTime"];
|
|
15
|
+
readonly additionalProperties: false;
|
|
16
|
+
readonly default: {
|
|
17
|
+
readonly count: number;
|
|
18
|
+
readonly deltaTime: number;
|
|
19
|
+
};
|
|
20
|
+
readonly transient: true;
|
|
21
|
+
};
|
|
22
|
+
export type Frame = FromSchema<typeof FrameSchema>;
|
package/dist/graphics/frame.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// transient: true,
|
|
13
|
-
// } as const satisfies Schema;
|
|
14
|
-
// export type Frame = FromSchema<typeof FrameSchema>;
|
|
1
|
+
export const FrameSchema = {
|
|
2
|
+
type: "object",
|
|
3
|
+
properties: {
|
|
4
|
+
count: { type: "number", default: 0 },
|
|
5
|
+
deltaTime: { type: "number", default: 0 },
|
|
6
|
+
},
|
|
7
|
+
required: ["count", "deltaTime"],
|
|
8
|
+
additionalProperties: false,
|
|
9
|
+
default: { count: 0, deltaTime: 1 / 60 },
|
|
10
|
+
transient: true,
|
|
11
|
+
};
|
|
15
12
|
//# sourceMappingURL=frame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame.js","sourceRoot":"","sources":["../../src/graphics/frame.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frame.js","sourceRoot":"","sources":["../../src/graphics/frame.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;QACrC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;KAC5C;IACD,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;IAChC,oBAAoB,EAAE,KAAK;IAC3B,OAAO,EAAE,EAAE,KAAK,EAAE,CAAW,EAAE,SAAS,EAAE,CAAC,GAAG,EAAY,EAAE;IAC5D,SAAS,EAAE,IAAI;CACQ,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { GraphicsContext } from "./graphics-context.js";
|
|
2
|
+
export declare const getWebGPUGraphicsContext: (canvas: HTMLCanvasElement) => Promise<GraphicsContext>;
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// });
|
|
22
|
-
// return { context, device, canvas }
|
|
23
|
-
// }
|
|
1
|
+
export const getWebGPUGraphicsContext = async (canvas) => {
|
|
2
|
+
if (!canvas) {
|
|
3
|
+
throw new Error('Canvas not found');
|
|
4
|
+
}
|
|
5
|
+
const adapter = await navigator.gpu?.requestAdapter();
|
|
6
|
+
if (!adapter) {
|
|
7
|
+
throw new Error('No GPU adapter found');
|
|
8
|
+
}
|
|
9
|
+
const device = await adapter.requestDevice();
|
|
10
|
+
const context = canvas.getContext('webgpu');
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('No WebGPU context');
|
|
13
|
+
}
|
|
14
|
+
context.configure({
|
|
15
|
+
device,
|
|
16
|
+
format: navigator.gpu.getPreferredCanvasFormat(),
|
|
17
|
+
alphaMode: 'premultiplied',
|
|
18
|
+
});
|
|
19
|
+
return { context, device, canvas };
|
|
20
|
+
};
|
|
24
21
|
//# sourceMappingURL=get-web-gpu-device-and-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-web-gpu-device-and-context.js","sourceRoot":"","sources":["../../src/graphics/get-web-gpu-device-and-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-web-gpu-device-and-context.js","sourceRoot":"","sources":["../../src/graphics/get-web-gpu-device-and-context.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAAE,MAAyB,EAC7C,EAAE;IACzB,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,cAAc,EAAE,CAAC;IACtD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;IAE7C,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,CAAC,SAAS,CAAC;QACd,MAAM;QACN,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,wBAAwB,EAAE;QAChD,SAAS,EAAE,eAAe;KAC7B,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AACtC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphics-context.js","sourceRoot":"","sources":["../../src/graphics/graphics-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphics-context.js","sourceRoot":"","sources":["../../src/graphics/graphics-context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
|
+
import { Service } from "../../service/index.js";
|
|
3
|
+
export declare abstract class ServiceApplication<S extends Service> extends LitElement {
|
|
4
|
+
protected service: S;
|
|
5
|
+
protected abstract createService(): Promise<S>;
|
|
6
|
+
updated(changedProperties: PropertyValues): Promise<void>;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
23
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
25
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
|
+
};
|
|
28
|
+
import { html, LitElement } from "lit";
|
|
29
|
+
import { property } from "lit/decorators.js";
|
|
30
|
+
import { provide } from "@lit/context";
|
|
31
|
+
import { serviceContext } from "./service-context.js";
|
|
32
|
+
import { isDisposable } from "../../service/disposable.js";
|
|
33
|
+
export class ServiceApplication extends LitElement {
|
|
34
|
+
async updated(changedProperties) {
|
|
35
|
+
super.updated(changedProperties);
|
|
36
|
+
this.service ??= await this.createService();
|
|
37
|
+
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
super.disconnectedCallback();
|
|
40
|
+
if (isDisposable(this.service)) {
|
|
41
|
+
this.service.dispose();
|
|
42
|
+
}
|
|
43
|
+
this.service = null;
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return html `
|
|
47
|
+
<div>Service Application Should Be Overridden</div>
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
__decorate([
|
|
52
|
+
provide({ context: serviceContext }),
|
|
53
|
+
property({ type: Object })
|
|
54
|
+
], ServiceApplication.prototype, "service", void 0);
|
|
55
|
+
//# sourceMappingURL=service-application.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-application.js","sourceRoot":"","sources":["../../../src/lit/elements/service-application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,OAAgB,kBAAsC,SAAQ,UAAU;IAQjE,KAAK,CAAC,OAAO,CAAC,iBAAiC;QACpD,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAChD,CAAC;IAEQ,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,IAAW,CAAC;IAC/B,CAAC;IAEQ,MAAM;QACX,OAAO,IAAI,CAAA;;SAEV,CAAC;IACN,CAAC;CACJ;AAtBa;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const serviceContext: import("@lit/context").Context<symbol, unknown>;
|
|
@@ -19,6 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.*/
|
|
22
|
-
import {
|
|
23
|
-
export const
|
|
24
|
-
//# sourceMappingURL=
|
|
22
|
+
import { createContext } from "@lit/context";
|
|
23
|
+
export const serviceContext = createContext(Symbol("service"));
|
|
24
|
+
//# sourceMappingURL=service-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-context.js","sourceRoot":"","sources":["../../../src/lit/elements/service-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
23
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
25
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
26
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
27
|
+
};
|
|
28
|
+
import { LitElement } from "lit";
|
|
29
|
+
import { serviceContext } from "./service-context.js";
|
|
30
|
+
import { property } from "lit/decorators.js";
|
|
31
|
+
import { consume } from "@lit/context";
|
|
32
|
+
import { applyServiceDecorators } from "../decorators/apply-service-decorators.js";
|
|
33
|
+
export class ServiceElement extends LitElement {
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
applyServiceDecorators(this);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
consume({ context: serviceContext }),
|
|
41
|
+
property({ type: Object })
|
|
42
|
+
], ServiceElement.prototype, "service", void 0);
|
|
43
|
+
//# sourceMappingURL=service-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-element.js","sourceRoot":"","sources":["../../../src/lit/elements/service-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,MAAM,OAAO,cAAkC,SAAQ,UAAU;IAM7D;QACI,KAAK,EAAE,CAAC;QACR,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CAEJ;AAPa;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACL"}
|
|
@@ -21,7 +21,7 @@ export function getClosestEntityToLine(rows, line) {
|
|
|
21
21
|
return {
|
|
22
22
|
entity: closestEntity,
|
|
23
23
|
lineAlpha: closestAlpha,
|
|
24
|
-
|
|
24
|
+
entityPosition: pickedPosition,
|
|
25
25
|
// face: AabbFace.fromPosition(pickedPosition, rows.get(closestEntity)!),
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-closest-entity-to-line.js","sourceRoot":"","sources":["../../../src/math/picking/get-closest-entity-to-line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,UAAU,sBAAsB,CAAC,IAAuB,EAAE,IAAW;IACvE,IAAI,aAAa,GAAkB,IAAI,CAAC;IACxC,IAAI,sBAAsB,GAAG,QAAQ,CAAC;IACtC,IAAI,YAAY,GAAG,QAAQ,CAAC;IAC5B,IAAI,cAAc,GAAgB,IAAI,CAAC;IACvC,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACzD,MAAM,yBAAyB,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,yBAAyB,CAAC,CAAC;QAChF,IAAI,WAAW,GAAG,sBAAsB;YACpC,CAAC,WAAW,KAAK,sBAAsB,IAAI,KAAK,GAAG,YAAY,CAAC,EAAE,CAAC;YACnE,sBAAsB,GAAG,WAAW,CAAC;YACrC,YAAY,GAAG,KAAK,CAAC;YACrB,aAAa,GAAG,EAAE,CAAC;YACnB,cAAc,GAAG,yBAAyB,CAAC;QAC/C,CAAC;IACL,CAAC;IACD,IAAI,aAAa,KAAK,IAAI,IAAI,cAAc,EAAE,CAAC;QAC3C,OAAO;YACH,MAAM,EAAE,aAAa;YACrB,SAAS,EAAE,YAAY;YACvB,
|
|
1
|
+
{"version":3,"file":"get-closest-entity-to-line.js","sourceRoot":"","sources":["../../../src/math/picking/get-closest-entity-to-line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,UAAU,sBAAsB,CAAC,IAAuB,EAAE,IAAW;IACvE,IAAI,aAAa,GAAkB,IAAI,CAAC;IACxC,IAAI,sBAAsB,GAAG,QAAQ,CAAC;IACtC,IAAI,YAAY,GAAG,QAAQ,CAAC;IAC5B,IAAI,cAAc,GAAgB,IAAI,CAAC;IACvC,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACzD,MAAM,yBAAyB,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,yBAAyB,CAAC,CAAC;QAChF,IAAI,WAAW,GAAG,sBAAsB;YACpC,CAAC,WAAW,KAAK,sBAAsB,IAAI,KAAK,GAAG,YAAY,CAAC,EAAE,CAAC;YACnE,sBAAsB,GAAG,WAAW,CAAC;YACrC,YAAY,GAAG,KAAK,CAAC;YACrB,aAAa,GAAG,EAAE,CAAC;YACnB,cAAc,GAAG,yBAAyB,CAAC;QAC/C,CAAC;IACL,CAAC;IACD,IAAI,aAAa,KAAK,IAAI,IAAI,cAAc,EAAE,CAAC;QAC3C,OAAO;YACH,MAAM,EAAE,aAAa;YACrB,SAAS,EAAE,YAAY;YACvB,cAAc,EAAE,cAAc;YAC9B,yEAAyE;SAC5E,CAAC;IACN,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-closest-entity-to-point.js","sourceRoot":"","sources":["../../../src/math/picking/get-closest-entity-to-point.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,UAAU,uBAAuB,CAAC,IAAuB,EAAE,KAAW;IACxE,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;IACpB,IAAI,sBAAsB,GAAG,QAAQ,CAAC;IACtC,IAAI,WAAW,GAAgB,IAAI,CAAC;IACpC,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,WAAW,GAAG,sBAAsB,EAAE,CAAC;YACvC,sBAAsB,GAAG,WAAW,CAAC;YACrC,UAAU,GAAG,GAAG,CAAC;YACjB,WAAW,GAAG,IAAI,CAAC;QACvB,CAAC;IACL,CAAC;IACD,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;QACnC,yEAAyE;QACzE,4DAA4D;QAC5D,yEAAyE;QACzE,OAAO;YACH,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,CAAC;YACZ,
|
|
1
|
+
{"version":3,"file":"get-closest-entity-to-point.js","sourceRoot":"","sources":["../../../src/math/picking/get-closest-entity-to-point.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,UAAU,uBAAuB,CAAC,IAAuB,EAAE,KAAW;IACxE,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;IACpB,IAAI,sBAAsB,GAAG,QAAQ,CAAC;IACtC,IAAI,WAAW,GAAgB,IAAI,CAAC;IACpC,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,WAAW,GAAG,sBAAsB,EAAE,CAAC;YACvC,sBAAsB,GAAG,WAAW,CAAC;YACrC,UAAU,GAAG,GAAG,CAAC;YACjB,WAAW,GAAG,IAAI,CAAC;QACvB,CAAC;IACL,CAAC;IACD,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC;QACnC,yEAAyE;QACzE,4DAA4D;QAC5D,yEAAyE;QACzE,OAAO;YACH,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,CAAC;YACZ,cAAc,EAAE,KAAK;YACrB,mDAAmD;SACtD,CAAC;IACN,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -45,7 +45,7 @@ export function pickFromTables(options) {
|
|
|
45
45
|
return {
|
|
46
46
|
entity: best.id,
|
|
47
47
|
lineAlpha: best.alpha,
|
|
48
|
-
|
|
48
|
+
entityPosition: Line3.interpolate(line, best.alpha),
|
|
49
49
|
// face: AabbFace.fromPosition(Line3.interpolate(line, best.alpha), rows.get(best.id)!),
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick-from-tables.js","sourceRoot":"","sources":["../../../src/math/picking/pick-from-tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAGX,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAqD,OAKlF;IACG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACxD,IAAI,IAAI,GAAG,uBAAuB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3E,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAChB,8EAA8E;QAC9E,IAAI,IAAI,GAAyC,IAAI,CAAC;QACtD,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACnD,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxD,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;YACzB,CAAC;QACL,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACP,OAAO;gBACH,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,SAAS,EAAE,IAAI,CAAC,KAAK;gBACrB,
|
|
1
|
+
{"version":3,"file":"pick-from-tables.js","sourceRoot":"","sources":["../../../src/math/picking/pick-from-tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAGX,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAqD,OAKlF;IACG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACxD,IAAI,IAAI,GAAG,uBAAuB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3E,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAChB,8EAA8E;QAC9E,IAAI,IAAI,GAAyC,IAAI,CAAC;QACtD,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACnD,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxD,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;YACzB,CAAC;QACL,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACP,OAAO;gBACH,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,SAAS,EAAE,IAAI,CAAC,KAAK;gBACrB,cAAc,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;gBACnD,wFAAwF;aAC3F,CAAC;QACN,CAAC;QACD,gCAAgC;QAChC,OAAO,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC;SAAM,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,IAAI,GAAG,uBAAuB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAChB,OAAO,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -5,8 +5,6 @@ export interface PickResult {
|
|
|
5
5
|
entity: Entity;
|
|
6
6
|
/** Alpha value (0-1) along the picking line where the intersection/closest point occurs. */
|
|
7
7
|
lineAlpha: number;
|
|
8
|
-
/** World-space position of the
|
|
9
|
-
|
|
10
|
-
/** Model-space position on the picked entity. */
|
|
11
|
-
modelPosition?: Vec3;
|
|
8
|
+
/** World-space position of the entity or closest point on the AABB. */
|
|
9
|
+
entityPosition: Vec3;
|
|
12
10
|
}
|
|
@@ -31,6 +31,6 @@ export declare const createTodoDatabase: () => import("../../../../ecs/index.js"
|
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
33
|
}>, {
|
|
34
|
-
Todo: ("
|
|
34
|
+
Todo: ("todo" | "name" | "order" | "complete" | "dragPosition")[];
|
|
35
35
|
}, import("../../../../ecs/index.js").ToTransactionFunctions<typeof transactions>>;
|
|
36
36
|
export type TodoDatabase = ReturnType<typeof createTodoDatabase>;
|
|
@@ -31,6 +31,6 @@ export declare const createTodoStore: () => import("../../../../ecs/index.js").S
|
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
33
|
}>, {
|
|
34
|
-
Todo: ("
|
|
34
|
+
Todo: ("todo" | "name" | "order" | "complete" | "dragPosition")[];
|
|
35
35
|
}>;
|
|
36
36
|
export type TodoStore = ReturnType<typeof createTodoStore>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Table } from "./table.js";
|
|
2
|
+
/**
|
|
3
|
+
* Compacts the table by reducing rowCapacity to match rowCount.
|
|
4
|
+
* This shrinks the underlying buffers to remove unused capacity.
|
|
5
|
+
* Useful before serialization to avoid storing unused buffer space.
|
|
6
|
+
*/
|
|
7
|
+
export declare const compactTable: <C>(table: Table<C>) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compacts the table by reducing rowCapacity to match rowCount.
|
|
3
|
+
* This shrinks the underlying buffers to remove unused capacity.
|
|
4
|
+
* Useful before serialization to avoid storing unused buffer space.
|
|
5
|
+
*/
|
|
6
|
+
export const compactTable = (table) => {
|
|
7
|
+
if (table.rowCapacity > table.rowCount) {
|
|
8
|
+
for (const name in table.columns) {
|
|
9
|
+
const column = table.columns[name];
|
|
10
|
+
column.capacity = table.rowCount;
|
|
11
|
+
}
|
|
12
|
+
table.rowCapacity = table.rowCount;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=compact-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact-table.js","sourceRoot":"","sources":["../../src/table/compact-table.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAI,KAAe,EAAQ,EAAE;IACrD,IAAI,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACnC,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QACrC,CAAC;QACD,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC;IACvC,CAAC;AACL,CAAC,CAAC"}
|