@adobe/data 0.7.0 → 0.7.3
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/archetype/archetype.d.ts +3 -3
- package/dist/ecs/archetype/create-archetype.d.ts +4 -4
- package/dist/ecs/archetype/create-archetype.js.map +1 -1
- package/dist/ecs/archetype/create-archetype.test.js +6 -6
- package/dist/ecs/archetype/create-archetype.test.js.map +1 -1
- package/dist/ecs/archetype/delete-row.d.ts +2 -2
- package/dist/ecs/archetype/delete-row.js.map +1 -1
- package/dist/ecs/archetype/delete-row.test.js +4 -4
- package/dist/ecs/archetype/delete-row.test.js.map +1 -1
- package/dist/ecs/core-components.d.ts +3 -3
- package/dist/ecs/database/database.d.ts +4 -4
- 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/observe-select-entities.d.ts +2 -2
- package/dist/ecs/database/observe-select-entities.js.map +1 -1
- package/dist/ecs/database/observed/create-observed-database.js.map +1 -1
- package/dist/ecs/database/observed/observed-database.d.ts +3 -3
- 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/entity-location-table/create-entity-location-table.d.ts +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.js +14 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.js.map +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.test.js +14 -0
- package/dist/ecs/entity-location-table/create-entity-location-table.test.js.map +1 -1
- package/dist/ecs/entity.d.ts +9 -7
- package/dist/ecs/entity.js +5 -2
- package/dist/ecs/entity.js.map +1 -1
- package/dist/ecs/index.d.ts +1 -1
- package/dist/ecs/index.js +1 -1
- package/dist/ecs/index.js.map +1 -1
- package/dist/ecs/optional-components.d.ts +3 -0
- package/dist/ecs/optional-components.js +2 -0
- package/dist/ecs/optional-components.js.map +1 -0
- package/dist/ecs/required-components.d.ts +4 -0
- package/dist/ecs/required-components.js +2 -0
- package/dist/ecs/required-components.js.map +1 -0
- package/dist/ecs/store/core/core.d.ts +15 -15
- package/dist/ecs/store/core/create-core.d.ts +2 -1
- package/dist/ecs/store/core/create-core.js +34 -14
- package/dist/ecs/store/core/create-core.js.map +1 -1
- package/dist/ecs/store/core/create-core.test.d.ts +1 -1
- package/dist/ecs/store/core/create-core.test.js +30 -2
- package/dist/ecs/store/core/create-core.test.js.map +1 -1
- package/dist/ecs/store/core/select-entities.d.ts +2 -2
- package/dist/ecs/store/core/select-entities.js.map +1 -1
- package/dist/ecs/store/create-store.d.ts +2 -1
- package/dist/ecs/store/create-store.js +3 -1
- package/dist/ecs/store/create-store.js.map +1 -1
- package/dist/ecs/store/store.d.ts +6 -6
- 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 +4 -3
- package/dist/blob/download-handle.d.ts +0 -4
- package/dist/blob/download-handle.js +0 -2
- package/dist/blob/download-handle.js.map +0 -1
- package/dist/blob/upload-handle.d.ts +0 -4
- package/dist/blob/upload-handle.js +0 -2
- package/dist/blob/upload-handle.js.map +0 -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 +0 -24
- package/dist/ecs/entity/u32.js.map +0 -1
- package/dist/ecs/store/store-schema/create-store-schema-test.d.ts +0 -1
- package/dist/ecs/store/store-schema/create-store-schema-test.js +0 -33
- package/dist/ecs/store/store-schema/create-store-schema-test.js.map +0 -1
- package/dist/ecs/store/store-schema/create-store-schema.d.ts +0 -1
- package/dist/ecs/store/store-schema/create-store-schema.js +0 -45
- package/dist/ecs/store/store-schema/create-store-schema.js.map +0 -1
- package/dist/ecs/store/store-schema/index.d.ts +0 -1
- package/dist/ecs/store/store-schema/index.js +0 -21
- package/dist/ecs/store/store-schema/index.js.map +0 -1
- package/dist/ecs/store/store-schema/store-schema.d.ts +0 -1
- package/dist/ecs/store/store-schema/store-schema.js +0 -57
- package/dist/ecs/store/store-schema/store-schema.js.map +0 -1
- package/dist/ecs/world/create-world.d.ts +0 -7
- package/dist/ecs/world/create-world.js +0 -113
- package/dist/ecs/world/create-world.js.map +0 -1
- package/dist/ecs/world/create-world.test.d.ts +0 -1
- package/dist/ecs/world/create-world.test.js +0 -499
- package/dist/ecs/world/create-world.test.js.map +0 -1
- package/dist/ecs/world/index.d.ts +0 -5
- package/dist/ecs/world/index.js +0 -27
- package/dist/ecs/world/index.js.map +0 -1
- package/dist/ecs/world/system-phase.d.ts +0 -5
- package/dist/ecs/world/system-phase.js +0 -14
- package/dist/ecs/world/system-phase.js.map +0 -1
- package/dist/ecs/world/system.d.ts +0 -25
- package/dist/ecs/world/system.js +0 -2
- package/dist/ecs/world/system.js.map +0 -1
- package/dist/ecs/world/world-schema/create-world-schema-test.d.ts +0 -1
- package/dist/ecs/world/world-schema/create-world-schema-test.js +0 -55
- package/dist/ecs/world/world-schema/create-world-schema-test.js.map +0 -1
- package/dist/ecs/world/world-schema/create-world-schema.d.ts +0 -19
- package/dist/ecs/world/world-schema/create-world-schema.js +0 -33
- package/dist/ecs/world/world-schema/create-world-schema.js.map +0 -1
- package/dist/ecs/world/world-schema/index.d.ts +0 -2
- package/dist/ecs/world/world-schema/index.js +0 -24
- package/dist/ecs/world/world-schema/index.js.map +0 -1
- package/dist/ecs/world/world-schema/world-schema.d.ts +0 -18
- package/dist/ecs/world/world-schema/world-schema.js +0 -23
- package/dist/ecs/world/world-schema/world-schema.js.map +0 -1
- package/dist/ecs/world/world.d.ts +0 -11
- package/dist/ecs/world/world.js +0 -2
- package/dist/ecs/world/world.js.map +0 -1
- package/dist/graphics/camera/camera.d.ts +0 -62
- package/dist/graphics/camera/camera.js +0 -17
- package/dist/graphics/camera/camera.js.map +0 -1
- package/dist/graphics/camera/index.d.ts +0 -4
- package/dist/graphics/camera/index.js +0 -5
- package/dist/graphics/camera/index.js.map +0 -1
- package/dist/graphics/camera/screen-to-world-ray.d.ts +0 -12
- package/dist/graphics/camera/screen-to-world-ray.js +0 -49
- package/dist/graphics/camera/screen-to-world-ray.js.map +0 -1
- package/dist/graphics/camera/screen-to-world-ray.test.d.ts +0 -1
- package/dist/graphics/camera/screen-to-world-ray.test.js +0 -171
- package/dist/graphics/camera/screen-to-world-ray.test.js.map +0 -1
- package/dist/graphics/camera/to-view-projection.d.ts +0 -3
- package/dist/graphics/camera/to-view-projection.js +0 -8
- package/dist/graphics/camera/to-view-projection.js.map +0 -1
- package/dist/graphics/camera/world-to-screen.d.ts +0 -12
- package/dist/graphics/camera/world-to-screen.js +0 -38
- package/dist/graphics/camera/world-to-screen.js.map +0 -1
- package/dist/graphics/camera/world-to-screen.test.d.ts +0 -1
- package/dist/graphics/camera/world-to-screen.test.js +0 -124
- package/dist/graphics/camera/world-to-screen.test.js.map +0 -1
- package/dist/graphics/create-struct-gpu-buffer.d.ts +0 -7
- package/dist/graphics/create-struct-gpu-buffer.js +0 -17
- package/dist/graphics/create-struct-gpu-buffer.js.map +0 -1
- package/dist/graphics/extract-wgsl-bindings.d.ts +0 -5
- package/dist/graphics/extract-wgsl-bindings.js +0 -10
- package/dist/graphics/extract-wgsl-bindings.js.map +0 -1
- package/dist/graphics/frame.d.ts +0 -1
- package/dist/graphics/frame.js +0 -15
- package/dist/graphics/frame.js.map +0 -1
- package/dist/graphics/get-web-gpu-device-and-context.d.ts +0 -1
- package/dist/graphics/get-web-gpu-device-and-context.js +0 -24
- package/dist/graphics/get-web-gpu-device-and-context.js.map +0 -1
- package/dist/graphics/graphics-context.d.ts +0 -1
- package/dist/graphics/graphics-context.js +0 -7
- package/dist/graphics/graphics-context.js.map +0 -1
- package/dist/graphics/index.d.ts +0 -5
- package/dist/graphics/index.js +0 -5
- package/dist/graphics/index.js.map +0 -1
- package/dist/graphics/to-gpu-buffer.d.ts +0 -2
- package/dist/graphics/to-gpu-buffer.js +0 -14
- package/dist/graphics/to-gpu-buffer.js.map +0 -1
- package/dist/internal/array-buffer-like/grow.d.ts +0 -1
- package/dist/internal/array-buffer-like/grow.js +0 -9
- package/dist/internal/array-buffer-like/grow.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.d.ts +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.d.ts +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.d.ts +0 -1
- package/dist/math/picking/face.js +0 -2
- package/dist/math/picking/face.js.map +0 -1
- package/dist/math/picking/get-closest-entity-to-line.d.ts +0 -4
- package/dist/math/picking/get-closest-entity-to-line.js +0 -30
- package/dist/math/picking/get-closest-entity-to-line.js.map +0 -1
- package/dist/math/picking/get-closest-entity-to-point.d.ts +0 -4
- package/dist/math/picking/get-closest-entity-to-point.js +0 -27
- package/dist/math/picking/get-closest-entity-to-point.js.map +0 -1
- package/dist/math/picking/get-intersecting-entities.d.ts +0 -12
- package/dist/math/picking/get-intersecting-entities.js +0 -15
- package/dist/math/picking/get-intersecting-entities.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/picking/index.d.ts +0 -5
- package/dist/math/picking/index.js +0 -27
- package/dist/math/picking/index.js.map +0 -1
- package/dist/math/picking/pick-from-tables.d.ts +0 -19
- package/dist/math/picking/pick-from-tables.js +0 -63
- package/dist/math/picking/pick-from-tables.js.map +0 -1
- package/dist/math/picking/pick-result.d.ts +0 -12
- package/dist/math/picking/pick-result.js +0 -23
- package/dist/math/picking/pick-result.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/old-ecs/privacy/helper-functions.d.ts +0 -43
- package/dist/old-ecs/privacy/helper-functions.js +0 -76
- package/dist/old-ecs/privacy/helper-functions.js.map +0 -1
- package/dist/old-ecs/privacy/helper-functions.test.d.ts +0 -1
- package/dist/old-ecs/privacy/helper-functions.test.js +0 -173
- package/dist/old-ecs/privacy/helper-functions.test.js.map +0 -1
- /package/dist/ecs/database/{transactional-store/entity-id-preservation.test.d.ts → replicate.test.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/data",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Adobe data oriented programming library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
"glob": "^10.3.10",
|
|
138
138
|
"jsdom": "^24.1.0",
|
|
139
139
|
"lint-staged": "^13.2.2",
|
|
140
|
+
"lit": "^3.3.1",
|
|
140
141
|
"nodemon": "^3.1.7",
|
|
141
142
|
"npm-run-all": "^4.1.5",
|
|
142
143
|
"playwright": "^1.46.1",
|
|
@@ -150,7 +151,6 @@
|
|
|
150
151
|
"typescript": "^5.8.3",
|
|
151
152
|
"uuid": "^10.0.0",
|
|
152
153
|
"vite": "^5.1.1",
|
|
153
|
-
"lit": "^3.3.1",
|
|
154
154
|
"vitest": "^1.6.0",
|
|
155
155
|
"webdriverio": "^9.0.9"
|
|
156
156
|
},
|
|
@@ -170,7 +170,8 @@
|
|
|
170
170
|
"@spectrum-web-components/icons-workflow": "^1.7.0",
|
|
171
171
|
"@spectrum-web-components/styles": "^1.7.0",
|
|
172
172
|
"@spectrum-web-components/theme": "^1.7.0",
|
|
173
|
-
"jsonpath": "^1.1.1"
|
|
173
|
+
"jsonpath": "^1.1.1",
|
|
174
|
+
"latest": "^0.2.0"
|
|
174
175
|
},
|
|
175
176
|
"peerDependencies": {
|
|
176
177
|
"lit": "^3.3.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"download-handle.js","sourceRoot":"","sources":["../../src/blob/download-handle.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-handle.js","sourceRoot":"","sources":["../../src/blob/upload-handle.ts"],"names":[],"mappings":""}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { createStore } from "../../store/create-store.js";
|
|
3
|
-
import { createDatabase } from "../create-database.js";
|
|
4
|
-
import { F32Schema } from "../../../schema/f32.js";
|
|
5
|
-
import { createUndoRedoService } from "../../undo-redo-service/create-undo-redo-service.js";
|
|
6
|
-
import { applyOperations } from "./apply-operations.js";
|
|
7
|
-
const positionSchema = {
|
|
8
|
-
type: "object",
|
|
9
|
-
properties: {
|
|
10
|
-
x: F32Schema,
|
|
11
|
-
y: F32Schema,
|
|
12
|
-
},
|
|
13
|
-
required: ["x", "y"],
|
|
14
|
-
additionalProperties: false,
|
|
15
|
-
};
|
|
16
|
-
describe("entity ID preservation in undo/redo", () => {
|
|
17
|
-
it("should restore deleted entities with their original entity ID", () => {
|
|
18
|
-
const store = createStore({ position: positionSchema }, {}, { PositionEntity: ["position"] });
|
|
19
|
-
const database = createDatabase(store, {
|
|
20
|
-
createEntity(t, args) {
|
|
21
|
-
t.undoable = { coalesce: false };
|
|
22
|
-
return t.archetypes.PositionEntity.insert(args);
|
|
23
|
-
},
|
|
24
|
-
deleteEntity(t, args) {
|
|
25
|
-
t.undoable = { coalesce: false };
|
|
26
|
-
t.delete(args.entity);
|
|
27
|
-
},
|
|
28
|
-
applyOperations(t, operations) {
|
|
29
|
-
applyOperations(t, operations);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const undoRedo = createUndoRedoService(database);
|
|
33
|
-
// Create an entity
|
|
34
|
-
const entityId = database.transactions.createEntity({ position: { x: 1, y: 2 } });
|
|
35
|
-
expect(entityId).toBeDefined();
|
|
36
|
-
// Verify it exists
|
|
37
|
-
let entity = database.read(entityId);
|
|
38
|
-
expect(entity).toBeDefined();
|
|
39
|
-
expect(entity?.position.x).toBe(1);
|
|
40
|
-
// Delete the entity
|
|
41
|
-
database.transactions.deleteEntity({ entity: entityId });
|
|
42
|
-
// Verify it's deleted
|
|
43
|
-
entity = database.read(entityId);
|
|
44
|
-
expect(entity).toBeNull();
|
|
45
|
-
// Undo the delete
|
|
46
|
-
undoRedo.undo();
|
|
47
|
-
// Verify it's restored with the SAME entity ID
|
|
48
|
-
entity = database.read(entityId);
|
|
49
|
-
expect(entity).toBeDefined();
|
|
50
|
-
expect(entity?.id).toBe(entityId);
|
|
51
|
-
expect(entity?.position.x).toBe(1);
|
|
52
|
-
expect(entity?.position.y).toBe(2);
|
|
53
|
-
});
|
|
54
|
-
it("should handle complex undo/redo scenarios with entity ID preservation", () => {
|
|
55
|
-
const store = createStore({ position: positionSchema }, {}, { PositionEntity: ["position"] });
|
|
56
|
-
const database = createDatabase(store, {
|
|
57
|
-
createEntity(t, args) {
|
|
58
|
-
t.undoable = { coalesce: false };
|
|
59
|
-
return t.archetypes.PositionEntity.insert(args);
|
|
60
|
-
},
|
|
61
|
-
deleteEntity(t, args) {
|
|
62
|
-
t.undoable = { coalesce: false };
|
|
63
|
-
t.delete(args.entity);
|
|
64
|
-
},
|
|
65
|
-
replaceEntity(t, args) {
|
|
66
|
-
t.undoable = { coalesce: false };
|
|
67
|
-
t.delete(args.oldEntity);
|
|
68
|
-
return t.archetypes.PositionEntity.insert(args.newPosition);
|
|
69
|
-
},
|
|
70
|
-
applyOperations(t, operations) {
|
|
71
|
-
applyOperations(t, operations);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
const undoRedo = createUndoRedoService(database);
|
|
75
|
-
// Create entity A
|
|
76
|
-
const entityA = database.transactions.createEntity({ position: { x: 1, y: 1 } });
|
|
77
|
-
// Replace A with B (delete A, create B) - simulates extrude
|
|
78
|
-
const entityB = database.transactions.replaceEntity({
|
|
79
|
-
oldEntity: entityA,
|
|
80
|
-
newPosition: { x: 2, y: 2 }
|
|
81
|
-
});
|
|
82
|
-
// Delete B - simulates clear selection
|
|
83
|
-
database.transactions.deleteEntity({ entity: entityB });
|
|
84
|
-
// Verify both are deleted
|
|
85
|
-
expect(database.read(entityA)).toBeNull();
|
|
86
|
-
expect(database.read(entityB)).toBeNull();
|
|
87
|
-
// Undo the delete of B
|
|
88
|
-
undoRedo.undo();
|
|
89
|
-
console.log('After undoing delete of B:');
|
|
90
|
-
console.log('entityA:', entityA, 'value:', database.read(entityA));
|
|
91
|
-
console.log('entityB:', entityB, 'value:', database.read(entityB));
|
|
92
|
-
expect(database.read(entityB)).toBeDefined();
|
|
93
|
-
expect(database.read(entityB)?.id).toBe(entityB);
|
|
94
|
-
// Note: entityA might be restored if B reused A's ID
|
|
95
|
-
if (entityA !== entityB) {
|
|
96
|
-
expect(database.read(entityA)).toBeNull();
|
|
97
|
-
}
|
|
98
|
-
// Undo the replace (should restore A, remove B)
|
|
99
|
-
undoRedo.undo();
|
|
100
|
-
expect(database.read(entityA)).toBeDefined();
|
|
101
|
-
expect(database.read(entityA)?.id).toBe(entityA);
|
|
102
|
-
expect(database.read(entityA)?.position.x).toBe(1);
|
|
103
|
-
expect(database.read(entityB)).toBeNull();
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
//# sourceMappingURL=entity-id-preservation.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entity-id-preservation.test.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/entity-id-preservation.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,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AAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/ecs/entity/entity.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAC"}
|
package/dist/ecs/entity/u32.d.ts
DELETED
package/dist/ecs/entity/u32.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
import { U32Schema } from "../../schema/index.js";
|
|
23
|
-
export const schema = U32Schema;
|
|
24
|
-
//# sourceMappingURL=u32.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"u32.js","sourceRoot":"","sources":["../../../src/ecs/entity/u32.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,SAAS,EAAc,MAAM,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
import { Store } from "../store.js";
|
|
23
|
-
const storeSchema = Store.Schema.create({
|
|
24
|
-
velocity: { type: "number" },
|
|
25
|
-
particle: { type: "boolean" },
|
|
26
|
-
}, {
|
|
27
|
-
mousePosition: { type: "number", default: 0 },
|
|
28
|
-
fooPosition: { type: "number", default: 0 },
|
|
29
|
-
}, {
|
|
30
|
-
Particle: ["particle"],
|
|
31
|
-
DynamicParticle: ["particle", "velocity"],
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=create-store-schema-test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-store-schema-test.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/create-store-schema-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAKX,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CACnC;IACI,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CAChC,EACD;IACI,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;CAC9C,EACD;IACI,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;CAC5C,CACJ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// /*MIT License
|
|
2
|
-
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 { StringKeyof } from "../../../types/types.js";
|
|
20
|
-
// import { ComponentSchemas } from "../../component-schemas.js";
|
|
21
|
-
// import { ResourceSchemas } from "../../resource-schemas.js";
|
|
22
|
-
// import { ArchetypeComponents } from "../archetype-components.js";
|
|
23
|
-
// import { createStore } from "../create-store.js";
|
|
24
|
-
// import { StoreSchema } from "./store-schema.js";
|
|
25
|
-
// export function createStoreSchema<
|
|
26
|
-
// const CS extends ComponentSchemas,
|
|
27
|
-
// const RS extends ResourceSchemas,
|
|
28
|
-
// const A extends ArchetypeComponents<StringKeyof<CS>>,
|
|
29
|
-
// >(
|
|
30
|
-
// components: CS,
|
|
31
|
-
// resources: RS,
|
|
32
|
-
// archetypes: A,
|
|
33
|
-
// ) {
|
|
34
|
-
// return { components, resources, archetypes } as const satisfies StoreSchema<CS, RS, A>;
|
|
35
|
-
// };
|
|
36
|
-
// export function createStoreFromSchema<
|
|
37
|
-
// const CS extends ComponentSchemas,
|
|
38
|
-
// const RS extends ResourceSchemas,
|
|
39
|
-
// const A extends ArchetypeComponents<StringKeyof<CS>>,
|
|
40
|
-
// >(
|
|
41
|
-
// schema: StoreSchema<CS, RS, A>,
|
|
42
|
-
// ) {
|
|
43
|
-
// return createStore(schema.components, schema.resources, schema.archetypes);
|
|
44
|
-
// };
|
|
45
|
-
//# sourceMappingURL=create-store-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/create-store-schema.ts"],"names":[],"mappings":"AAAA,gBAAgB;;AAEhB,+CAA+C;AAE/C,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAE3D,iFAAiF;AACjF,kDAAkD;AAElD,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,cAAc;AAEd,yDAAyD;AACzD,iEAAiE;AACjE,+DAA+D;AAC/D,oEAAoE;AACpE,oDAAoD;AACpD,mDAAmD;AAEnD,qCAAqC;AACrC,yCAAyC;AACzC,wCAAwC;AACxC,4DAA4D;AAC5D,KAAK;AACL,sBAAsB;AACtB,qBAAqB;AACrB,qBAAqB;AACrB,MAAM;AACN,8FAA8F;AAC9F,KAAK;AAEL,yCAAyC;AACzC,yCAAyC;AACzC,wCAAwC;AACxC,4DAA4D;AAC5D,KAAK;AACL,sCAAsC;AACtC,MAAM;AACN,kFAAkF;AAClF,KAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// /*MIT License
|
|
2
|
-
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
|
-
// export * from "./create-store-schema.js";
|
|
20
|
-
// export * from "./store-schema.js";
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;;AAEhB,+CAA+C;AAE/C,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAE3D,iFAAiF;AACjF,kDAAkD;AAElD,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,cAAc;AAEd,4CAA4C;AAC5C,qCAAqC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// /*MIT License
|
|
2
|
-
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
|
-
//# sourceMappingURL=store-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/store/store-schema/store-schema.ts"],"names":[],"mappings":"AAAA,gBAAgB;;AAEhB,+CAA+C;AAE/C,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAE3D,iFAAiF;AACjF,kDAAkD;AAElD,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,cAAc;AAEd,2DAA2D;AAC3D,iEAAiE;AACjE,+DAA+D;AAC/D,uCAAuC;AACvC,oEAAoE;AACpE,yDAAyD;AACzD,qDAAqD;AACrD,mDAAmD;AACnD,4DAA4D;AAC5D,6DAA6D;AAE7D,2BAA2B;AAC3B,mCAAmC;AACnC,kCAAkC;AAClC,sDAAsD;AACtD,QAAQ;AACR,+BAA+B;AAC/B,8BAA8B;AAC9B,8BAA8B;AAC9B,KAAK;AAEL,4IAA4I;AAE5I,4DAA4D;AAC5D,oCAAoC;AACpC,qCAAqC;AACrC,OAAO;AACP,qDAAqD;AACrD,mDAAmD;AACnD,OAAO;AACP,8BAA8B;AAC9B,iDAAiD;AACjD,OAAO;AACP,iDAAiD;AACjD,qHAAqH;AACrH,yBAAyB;AACzB,wBAAwB;AACxB,QAAQ;AACR,uGAAuG;AACvG,yBAAyB;AACzB,QAAQ"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StringKeyof } from "../../types/types.js";
|
|
2
|
-
import { ArchetypeComponents, Database, Store, TransactionFunctions } from "../index.js";
|
|
3
|
-
import { Components } from "../store/components.js";
|
|
4
|
-
import { ResourceComponents } from "../store/resource-components.js";
|
|
5
|
-
import { System } from "./system.js";
|
|
6
|
-
import { World } from "./world.js";
|
|
7
|
-
export declare function createWorld<C extends Components, R extends ResourceComponents, A extends ArchetypeComponents<StringKeyof<C>>, T extends TransactionFunctions, SD extends Record<string, System<C, R, A, T, keyof SD & string>>>(store: Store<C, R, A>, database: Database<C, R, A, T>, systems: SD): World<C, R, A, T, keyof SD & string>;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { topologicalSort } from "../../internal/array/index.js";
|
|
2
|
-
import { SystemPhaseSchema } from "./system-phase.js";
|
|
3
|
-
export function createWorld(store, database, systems) {
|
|
4
|
-
// Cache for topological sort results to avoid re-computing for same system sets
|
|
5
|
-
const topologicalSortCache = new Map();
|
|
6
|
-
const runSystems = (systemNames) => {
|
|
7
|
-
try {
|
|
8
|
-
// Check cache first (by array identity)
|
|
9
|
-
let sortedSystems = topologicalSortCache.get(systemNames);
|
|
10
|
-
if (!sortedSystems) {
|
|
11
|
-
// Build dependency graph for system scheduling
|
|
12
|
-
const edges = buildSystemEdges(systemNames, systems);
|
|
13
|
-
sortedSystems = topologicalSort(systemNames, edges);
|
|
14
|
-
// Cache the result
|
|
15
|
-
topologicalSortCache.set(systemNames, sortedSystems);
|
|
16
|
-
}
|
|
17
|
-
// Track if any system is async
|
|
18
|
-
const asyncPromises = [];
|
|
19
|
-
// Execute systems in dependency order
|
|
20
|
-
for (const systemName of sortedSystems) {
|
|
21
|
-
const system = systems[systemName];
|
|
22
|
-
try {
|
|
23
|
-
let result = undefined;
|
|
24
|
-
if (system.type === "store") {
|
|
25
|
-
result = system.run(store);
|
|
26
|
-
}
|
|
27
|
-
else if (system.type === "database") {
|
|
28
|
-
result = system.run(database);
|
|
29
|
-
}
|
|
30
|
-
// Check if the result is a Promise
|
|
31
|
-
if (result && typeof result === 'object' && 'then' in result) {
|
|
32
|
-
// If we find any async system, we need to handle all remaining systems async
|
|
33
|
-
asyncPromises.push(result);
|
|
34
|
-
// Switch to async mode for remaining systems
|
|
35
|
-
return executeRemainingAsync(sortedSystems, systemName, asyncPromises);
|
|
36
|
-
}
|
|
37
|
-
// If result is not a Promise, continue synchronously
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
console.error(`System ${String(systemName)} failed:`, error);
|
|
41
|
-
return Promise.reject(error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// If we reach here, all systems were synchronous
|
|
45
|
-
return Promise.resolve();
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
// Handle errors from topological sort (e.g., circular dependencies)
|
|
49
|
-
return Promise.reject(error);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const runPhases = async (phases) => {
|
|
53
|
-
if (phases) {
|
|
54
|
-
return runSystems(Object.keys(systems).filter(name => systems[name].phase && phases.includes(systems[name].phase)));
|
|
55
|
-
}
|
|
56
|
-
for (const phase of SystemPhaseSchema.enum) {
|
|
57
|
-
await runPhases([phase]);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
// Helper function to handle async execution once we encounter the first async system
|
|
61
|
-
const executeRemainingAsync = async (sortedSystems, currentSystemName, pendingPromises) => {
|
|
62
|
-
// Wait for the current async system to complete
|
|
63
|
-
await Promise.all(pendingPromises);
|
|
64
|
-
// Find the index of current system to continue from next one
|
|
65
|
-
const currentIndex = sortedSystems.indexOf(currentSystemName);
|
|
66
|
-
// Execute remaining systems asynchronously
|
|
67
|
-
for (let i = currentIndex + 1; i < sortedSystems.length; i++) {
|
|
68
|
-
const systemName = sortedSystems[i];
|
|
69
|
-
const system = systems[systemName];
|
|
70
|
-
try {
|
|
71
|
-
if (system.type === "store") {
|
|
72
|
-
await system.run(store);
|
|
73
|
-
}
|
|
74
|
-
else if (system.type === "database") {
|
|
75
|
-
await system.run(database);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
console.error(`System ${String(systemName)} failed:`, error);
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
// Build edges for system dependency graph
|
|
85
|
-
const buildSystemEdges = (systemNames, systemMap) => {
|
|
86
|
-
const edges = [];
|
|
87
|
-
systemNames.forEach(name => {
|
|
88
|
-
const system = systemMap[name];
|
|
89
|
-
const nameStr = String(name);
|
|
90
|
-
// Convert 'before' constraints to edges: current → dependency
|
|
91
|
-
// (current system must run before the dependency)
|
|
92
|
-
system.schedule?.before?.forEach(dep => {
|
|
93
|
-
if (systemNames.includes(dep)) {
|
|
94
|
-
edges.push([nameStr, String(dep)]);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
// Convert 'after' constraints to edges: dependency → current
|
|
98
|
-
// (current system must run after the dependency)
|
|
99
|
-
system.schedule?.after?.forEach(dep => {
|
|
100
|
-
if (systemNames.includes(dep)) {
|
|
101
|
-
edges.push([String(dep), nameStr]);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
return edges;
|
|
106
|
-
};
|
|
107
|
-
return {
|
|
108
|
-
...database,
|
|
109
|
-
runPhases,
|
|
110
|
-
runSystems,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=create-world.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-world.js","sourceRoot":"","sources":["../../../src/ecs/world/create-world.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,eAAe,EAAa,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAe,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,UAAU,WAAW,CAOvB,KAAqB,EACrB,QAA8B,EAC9B,OAAW;IAGX,gFAAgF;IAChF,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAgD,CAAC;IAErF,MAAM,UAAU,GAAG,CAAC,WAAkC,EAAiB,EAAE;QACrE,IAAI,CAAC;YACD,wCAAwC;YACxC,IAAI,aAAa,GAAG,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;Y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