@forgeax/engine-ecs 0.0.0-dev.8d955ade1c79
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/LICENSE +202 -0
- package/README.md +278 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/__fixtures__/field-shape-fixture.d.ts +16 -0
- package/dist/__fixtures__/field-shape-fixture.d.ts.map +1 -0
- package/dist/__tests__/__fixtures__/inspect-scripts.snapshot.d.ts +3 -0
- package/dist/__tests__/__fixtures__/inspect-scripts.snapshot.d.ts.map +1 -0
- package/dist/__tests__/archetype.unit.test.d.ts +2 -0
- package/dist/__tests__/archetype.unit.test.d.ts.map +1 -0
- package/dist/__tests__/array-handle-element.test-d.d.ts +2 -0
- package/dist/__tests__/array-handle-element.test-d.d.ts.map +1 -0
- package/dist/__tests__/buffer-array-vocab.test-d.d.ts +2 -0
- package/dist/__tests__/buffer-array-vocab.test-d.d.ts.map +1 -0
- package/dist/__tests__/buffer-field-input-widen.unit.test.d.ts +2 -0
- package/dist/__tests__/buffer-field-input-widen.unit.test.d.ts.map +1 -0
- package/dist/__tests__/buffer-pool.test-d.d.ts +2 -0
- package/dist/__tests__/buffer-pool.test-d.d.ts.map +1 -0
- package/dist/__tests__/change-detection.unit.test.d.ts +2 -0
- package/dist/__tests__/change-detection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/command-buffer.test.d.ts +2 -0
- package/dist/__tests__/command-buffer.test.d.ts.map +1 -0
- package/dist/__tests__/commands-deferred.unit.test.d.ts +2 -0
- package/dist/__tests__/commands-deferred.unit.test.d.ts.map +1 -0
- package/dist/__tests__/component-catalog.test.d.ts +2 -0
- package/dist/__tests__/component-catalog.test.d.ts.map +1 -0
- package/dist/__tests__/component-definition-identity.unit.test.d.ts +2 -0
- package/dist/__tests__/component-definition-identity.unit.test.d.ts.map +1 -0
- package/dist/__tests__/component-nan-preflight.unit.test.d.ts +2 -0
- package/dist/__tests__/component-nan-preflight.unit.test.d.ts.map +1 -0
- package/dist/__tests__/component-schema.test-d.d.ts +2 -0
- package/dist/__tests__/component-schema.test-d.d.ts.map +1 -0
- package/dist/__tests__/component-schema.test.d.ts +2 -0
- package/dist/__tests__/component-schema.test.d.ts.map +1 -0
- package/dist/__tests__/define-component-options.test-d.d.ts +2 -0
- package/dist/__tests__/define-component-options.test-d.d.ts.map +1 -0
- package/dist/__tests__/deprecated-vocab-rejection.unit.test.d.ts +2 -0
- package/dist/__tests__/deprecated-vocab-rejection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/despawn-all.unit.test.d.ts +2 -0
- package/dist/__tests__/despawn-all.unit.test.d.ts.map +1 -0
- package/dist/__tests__/ecs-core-reduction.characterization.test.d.ts +2 -0
- package/dist/__tests__/ecs-core-reduction.characterization.test.d.ts.map +1 -0
- package/dist/__tests__/ecs-core-reduction.perf.test.d.ts +2 -0
- package/dist/__tests__/ecs-core-reduction.perf.test.d.ts.map +1 -0
- package/dist/__tests__/ecs-error-code-31.test-d.d.ts +2 -0
- package/dist/__tests__/ecs-error-code-31.test-d.d.ts.map +1 -0
- package/dist/__tests__/entity-disabling.unit.test.d.ts +2 -0
- package/dist/__tests__/entity-disabling.unit.test.d.ts.map +1 -0
- package/dist/__tests__/entity-handle-codec-parity.unit.test.d.ts +2 -0
- package/dist/__tests__/entity-handle-codec-parity.unit.test.d.ts.map +1 -0
- package/dist/__tests__/errors.unit.test.d.ts +2 -0
- package/dist/__tests__/errors.unit.test.d.ts.map +1 -0
- package/dist/__tests__/execution-conflict-boundary.unit.test.d.ts +2 -0
- package/dist/__tests__/execution-conflict-boundary.unit.test.d.ts.map +1 -0
- package/dist/__tests__/execution-shared-storage.unit.test.d.ts +2 -0
- package/dist/__tests__/execution-shared-storage.unit.test.d.ts.map +1 -0
- package/dist/__tests__/externalization-portable-value.unit.test.d.ts +2 -0
- package/dist/__tests__/externalization-portable-value.unit.test.d.ts.map +1 -0
- package/dist/__tests__/externalization-projection.unit.test.d.ts +2 -0
- package/dist/__tests__/externalization-projection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/externalization-render-read-lease.test-d.d.ts +2 -0
- package/dist/__tests__/externalization-render-read-lease.test-d.d.ts.map +1 -0
- package/dist/__tests__/externalization-render-read-lease.unit.test.d.ts +2 -0
- package/dist/__tests__/externalization-render-read-lease.unit.test.d.ts.map +1 -0
- package/dist/__tests__/externalization-root-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/externalization-root-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/field-enum-labels-reflection.test.d.ts +2 -0
- package/dist/__tests__/field-enum-labels-reflection.test.d.ts.map +1 -0
- package/dist/__tests__/field-shape-fixture.test.d.ts +2 -0
- package/dist/__tests__/field-shape-fixture.test.d.ts.map +1 -0
- package/dist/__tests__/field-transient-reflection.test.d.ts +2 -0
- package/dist/__tests__/field-transient-reflection.test.d.ts.map +1 -0
- package/dist/__tests__/field-value-type.test-d.d.ts +2 -0
- package/dist/__tests__/field-value-type.test-d.d.ts.map +1 -0
- package/dist/__tests__/fixed-update.unit.test.d.ts +2 -0
- package/dist/__tests__/fixed-update.unit.test.d.ts.map +1 -0
- package/dist/__tests__/handle.test-d.d.ts +2 -0
- package/dist/__tests__/handle.test-d.d.ts.map +1 -0
- package/dist/__tests__/hierarchy.unit.test.d.ts +2 -0
- package/dist/__tests__/hierarchy.unit.test.d.ts.map +1 -0
- package/dist/__tests__/managed-array-vocab.test-d.d.ts +2 -0
- package/dist/__tests__/managed-array-vocab.test-d.d.ts.map +1 -0
- package/dist/__tests__/minimal-example.test-d.d.ts +2 -0
- package/dist/__tests__/minimal-example.test-d.d.ts.map +1 -0
- package/dist/__tests__/name-read-types.test-d.d.ts +2 -0
- package/dist/__tests__/name-read-types.test-d.d.ts.map +1 -0
- package/dist/__tests__/plugin-service.test.d.ts +2 -0
- package/dist/__tests__/plugin-service.test.d.ts.map +1 -0
- package/dist/__tests__/query-combinations.unit.test.d.ts +2 -0
- package/dist/__tests__/query-combinations.unit.test.d.ts.map +1 -0
- package/dist/__tests__/query-light-extract-flat-column-ratio.perf.test.d.ts +2 -0
- package/dist/__tests__/query-light-extract-flat-column-ratio.perf.test.d.ts.map +1 -0
- package/dist/__tests__/query-storage-trends.perf.test.d.ts +2 -0
- package/dist/__tests__/query-storage-trends.perf.test.d.ts.map +1 -0
- package/dist/__tests__/query-trs-flat-column-ratio.perf.test.d.ts +2 -0
- package/dist/__tests__/query-trs-flat-column-ratio.perf.test.d.ts.map +1 -0
- package/dist/__tests__/query.unit.test.d.ts +2 -0
- package/dist/__tests__/query.unit.test.d.ts.map +1 -0
- package/dist/__tests__/relationship-index.perf.test.d.ts +2 -0
- package/dist/__tests__/relationship-index.perf.test.d.ts.map +1 -0
- package/dist/__tests__/relationship-index.test.d.ts +2 -0
- package/dist/__tests__/relationship-index.test.d.ts.map +1 -0
- package/dist/__tests__/scalar-field-type-owner.test-d.d.ts +2 -0
- package/dist/__tests__/scalar-field-type-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/schedule-determinism.unit.test.d.ts +2 -0
- package/dist/__tests__/schedule-determinism.unit.test.d.ts.map +1 -0
- package/dist/__tests__/schedule-inspection.unit.test.d.ts +2 -0
- package/dist/__tests__/schedule-inspection.unit.test.d.ts.map +1 -0
- package/dist/__tests__/schedule-scope-error.unit.test.d.ts +2 -0
- package/dist/__tests__/schedule-scope-error.unit.test.d.ts.map +1 -0
- package/dist/__tests__/schedule-token.unit.test.d.ts +2 -0
- package/dist/__tests__/schedule-token.unit.test.d.ts.map +1 -0
- package/dist/__tests__/schema-vocab.test-d.d.ts +2 -0
- package/dist/__tests__/schema-vocab.test-d.d.ts.map +1 -0
- package/dist/__tests__/serialization.unit.test.d.ts +2 -0
- package/dist/__tests__/serialization.unit.test.d.ts.map +1 -0
- package/dist/__tests__/shared-kernel-eligibility.test-d.d.ts +2 -0
- package/dist/__tests__/shared-kernel-eligibility.test-d.d.ts.map +1 -0
- package/dist/__tests__/shared-kernel-eligibility.unit.test.d.ts +2 -0
- package/dist/__tests__/shared-kernel-eligibility.unit.test.d.ts.map +1 -0
- package/dist/__tests__/shared-ref-store.unit.test.d.ts +2 -0
- package/dist/__tests__/shared-ref-store.unit.test.d.ts.map +1 -0
- package/dist/__tests__/sparse-tag.unit.test.d.ts +2 -0
- package/dist/__tests__/sparse-tag.unit.test.d.ts.map +1 -0
- package/dist/__tests__/spawn-field-error.test-d.d.ts +2 -0
- package/dist/__tests__/spawn-field-error.test-d.d.ts.map +1 -0
- package/dist/__tests__/stale-error.test-d.d.ts +2 -0
- package/dist/__tests__/stale-error.test-d.d.ts.map +1 -0
- package/dist/__tests__/string-view-symmetry.test-d.d.ts +2 -0
- package/dist/__tests__/string-view-symmetry.test-d.d.ts.map +1 -0
- package/dist/__tests__/string-vocab.test-d.d.ts +2 -0
- package/dist/__tests__/string-vocab.test-d.d.ts.map +1 -0
- package/dist/__tests__/structure-epoch-boundaries.unit.test.d.ts +2 -0
- package/dist/__tests__/structure-epoch-boundaries.unit.test.d.ts.map +1 -0
- package/dist/__tests__/structure-epoch.unit.test.d.ts +2 -0
- package/dist/__tests__/structure-epoch.unit.test.d.ts.map +1 -0
- package/dist/__tests__/table-archetype-mapping.unit.test.d.ts +2 -0
- package/dist/__tests__/table-archetype-mapping.unit.test.d.ts.map +1 -0
- package/dist/__tests__/time.unit.test.d.ts +2 -0
- package/dist/__tests__/time.unit.test.d.ts.map +1 -0
- package/dist/__tests__/types.test-d.d.ts +2 -0
- package/dist/__tests__/types.test-d.d.ts.map +1 -0
- package/dist/__tests__/unique-ref-store.unit.test.d.ts +2 -0
- package/dist/__tests__/unique-ref-store.unit.test.d.ts.map +1 -0
- package/dist/__tests__/utils/handle-numeric.d.ts +14 -0
- package/dist/__tests__/utils/handle-numeric.d.ts.map +1 -0
- package/dist/__tests__/validation-root-surface.unit.test.d.ts +2 -0
- package/dist/__tests__/validation-root-surface.unit.test.d.ts.map +1 -0
- package/dist/__tests__/visibility-atomic-write.unit.test.d.ts +2 -0
- package/dist/__tests__/visibility-atomic-write.unit.test.d.ts.map +1 -0
- package/dist/__tests__/world-change-journal.unit.test.d.ts +2 -0
- package/dist/__tests__/world-change-journal.unit.test.d.ts.map +1 -0
- package/dist/__tests__/world-characterization.unit.test.d.ts +2 -0
- package/dist/__tests__/world-characterization.unit.test.d.ts.map +1 -0
- package/dist/__tests__/world-consumer-inference.test-d.d.ts +2 -0
- package/dist/__tests__/world-consumer-inference.test-d.d.ts.map +1 -0
- package/dist/__tests__/world-health.contract.test.d.ts +2 -0
- package/dist/__tests__/world-health.contract.test.d.ts.map +1 -0
- package/dist/__tests__/world-inspection.test.d.ts +2 -0
- package/dist/__tests__/world-inspection.test.d.ts.map +1 -0
- package/dist/__tests__/world-internal-identity.unit.test.d.ts +2 -0
- package/dist/__tests__/world-internal-identity.unit.test.d.ts.map +1 -0
- package/dist/__tests__/world-managed-roundtrip.unit.test.d.ts +2 -0
- package/dist/__tests__/world-managed-roundtrip.unit.test.d.ts.map +1 -0
- package/dist/__tests__/world-scheduling.m4.test.d.ts +2 -0
- package/dist/__tests__/world-scheduling.m4.test.d.ts.map +1 -0
- package/dist/__tests__/world-unique-roundtrip.unit.test.d.ts +2 -0
- package/dist/__tests__/world-unique-roundtrip.unit.test.d.ts.map +1 -0
- package/dist/__tests__/world.test-d.d.ts +2 -0
- package/dist/__tests__/world.test-d.d.ts.map +1 -0
- package/dist/buffer-pool.d.ts +109 -0
- package/dist/buffer-pool.d.ts.map +1 -0
- package/dist/commands.d.ts +93 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/component-default-fallback.d.ts +88 -0
- package/dist/component-default-fallback.d.ts.map +1 -0
- package/dist/component-schema.d.ts +34 -0
- package/dist/component-schema.d.ts.map +1 -0
- package/dist/component-value-validate.d.ts +29 -0
- package/dist/component-value-validate.d.ts.map +1 -0
- package/dist/component.d.ts +581 -0
- package/dist/component.d.ts.map +1 -0
- package/dist/entity-handle.d.ts +68 -0
- package/dist/entity-handle.d.ts.map +1 -0
- package/dist/entity.d.ts +86 -0
- package/dist/entity.d.ts.map +1 -0
- package/dist/errors/query-and-component-errors.d.ts +132 -0
- package/dist/errors/query-and-component-errors.d.ts.map +1 -0
- package/dist/errors/relationship-errors.d.ts +112 -0
- package/dist/errors/relationship-errors.d.ts.map +1 -0
- package/dist/errors/sprite-and-shared-errors.d.ts +107 -0
- package/dist/errors/sprite-and-shared-errors.d.ts.map +1 -0
- package/dist/errors/validation-errors.d.ts +229 -0
- package/dist/errors/validation-errors.d.ts.map +1 -0
- package/dist/errors.d.ts +763 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/execution/shared-kernel.d.ts +106 -0
- package/dist/execution/shared-kernel.d.ts.map +1 -0
- package/dist/externalization/index.d.ts +31 -0
- package/dist/externalization/index.d.ts.map +1 -0
- package/dist/externalization/index.mjs +298 -0
- package/dist/externalization/index.mjs.map +1 -0
- package/dist/index.d.ts +261 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +7422 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internal.mjs +479 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/plugin-service.d.ts +11 -0
- package/dist/plugin-service.d.ts.map +1 -0
- package/dist/projection/index.d.ts +103 -0
- package/dist/projection/index.d.ts.map +1 -0
- package/dist/projection/index.mjs +615 -0
- package/dist/projection/index.mjs.map +1 -0
- package/dist/query/query.d.ts +58 -0
- package/dist/query/query.d.ts.map +1 -0
- package/dist/relationship-index.d.ts +81 -0
- package/dist/relationship-index.d.ts.map +1 -0
- package/dist/resource.d.ts +70 -0
- package/dist/resource.d.ts.map +1 -0
- package/dist/schedule-token.d.ts +16 -0
- package/dist/schedule-token.d.ts.map +1 -0
- package/dist/schedule.d.ts +271 -0
- package/dist/schedule.d.ts.map +1 -0
- package/dist/shared-ref-store.d.ts +144 -0
- package/dist/shared-ref-store.d.ts.map +1 -0
- package/dist/shared.d.ts +3 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.mjs +364 -0
- package/dist/shared.mjs.map +1 -0
- package/dist/storage/archetype-graph.d.ts +54 -0
- package/dist/storage/archetype-graph.d.ts.map +1 -0
- package/dist/storage/archetype.d.ts +23 -0
- package/dist/storage/archetype.d.ts.map +1 -0
- package/dist/storage/change-detection.d.ts +40 -0
- package/dist/storage/change-detection.d.ts.map +1 -0
- package/dist/storage/column.d.ts +111 -0
- package/dist/storage/column.d.ts.map +1 -0
- package/dist/storage/table.d.ts +29 -0
- package/dist/storage/table.d.ts.map +1 -0
- package/dist/time.d.ts +57 -0
- package/dist/time.d.ts.map +1 -0
- package/dist/unique-ref-store.d.ts +105 -0
- package/dist/unique-ref-store.d.ts.map +1 -0
- package/dist/world-change-journal.d.ts +34 -0
- package/dist/world-change-journal.d.ts.map +1 -0
- package/dist/world-component-access.d.ts +265 -0
- package/dist/world-component-access.d.ts.map +1 -0
- package/dist/world-component-storage.d.ts +282 -0
- package/dist/world-component-storage.d.ts.map +1 -0
- package/dist/world-core.d.ts +39 -0
- package/dist/world-core.d.ts.map +1 -0
- package/dist/world-entity-lifecycle.d.ts +30 -0
- package/dist/world-entity-lifecycle.d.ts.map +1 -0
- package/dist/world-internal.d.ts +14 -0
- package/dist/world-internal.d.ts.map +1 -0
- package/dist/world-scheduling.d.ts +30 -0
- package/dist/world-scheduling.d.ts.map +1 -0
- package/dist/world.d.ts +620 -0
- package/dist/world.d.ts.map +1 -0
- package/package.json +77 -0
- package/src/__fixtures__/field-shape-fixture.ts +30 -0
- package/src/__tests__/__fixtures__/inspect-scripts.snapshot.ts +2 -0
- package/src/__tests__/archetype.unit.test.ts +1837 -0
- package/src/__tests__/array-handle-element.test-d.ts +34 -0
- package/src/__tests__/buffer-array-vocab.test-d.ts +53 -0
- package/src/__tests__/buffer-field-input-widen.unit.test.ts +99 -0
- package/src/__tests__/buffer-pool.test-d.ts +32 -0
- package/src/__tests__/change-detection.unit.test.ts +86 -0
- package/src/__tests__/command-buffer.test.ts +179 -0
- package/src/__tests__/commands-deferred.unit.test.ts +68 -0
- package/src/__tests__/component-catalog.test.ts +59 -0
- package/src/__tests__/component-definition-identity.unit.test.ts +24 -0
- package/src/__tests__/component-nan-preflight.unit.test.ts +186 -0
- package/src/__tests__/component-schema.test-d.ts +119 -0
- package/src/__tests__/component-schema.test.ts +55 -0
- package/src/__tests__/define-component-options.test-d.ts +35 -0
- package/src/__tests__/deprecated-vocab-rejection.unit.test.ts +59 -0
- package/src/__tests__/despawn-all.unit.test.ts +17 -0
- package/src/__tests__/ecs-core-reduction.characterization.test.ts +130 -0
- package/src/__tests__/ecs-core-reduction.perf.test.ts +260 -0
- package/src/__tests__/ecs-error-code-31.test-d.ts +42 -0
- package/src/__tests__/entity-disabling.unit.test.ts +37 -0
- package/src/__tests__/entity-handle-codec-parity.unit.test.ts +126 -0
- package/src/__tests__/errors.unit.test.ts +1456 -0
- package/src/__tests__/execution-conflict-boundary.unit.test.ts +123 -0
- package/src/__tests__/execution-shared-storage.unit.test.ts +40 -0
- package/src/__tests__/externalization-portable-value.unit.test.ts +275 -0
- package/src/__tests__/externalization-projection.unit.test.ts +325 -0
- package/src/__tests__/externalization-render-read-lease.test-d.ts +30 -0
- package/src/__tests__/externalization-render-read-lease.unit.test.ts +79 -0
- package/src/__tests__/externalization-root-surface.unit.test.ts +33 -0
- package/src/__tests__/field-enum-labels-reflection.test.ts +66 -0
- package/src/__tests__/field-shape-fixture.test.ts +61 -0
- package/src/__tests__/field-transient-reflection.test.ts +59 -0
- package/src/__tests__/field-value-type.test-d.ts +57 -0
- package/src/__tests__/fixed-update.unit.test.ts +78 -0
- package/src/__tests__/handle.test-d.ts +86 -0
- package/src/__tests__/hierarchy.unit.test.ts +2534 -0
- package/src/__tests__/managed-array-vocab.test-d.ts +137 -0
- package/src/__tests__/minimal-example.test-d.ts +42 -0
- package/src/__tests__/name-read-types.test-d.ts +72 -0
- package/src/__tests__/plugin-service.test.ts +13 -0
- package/src/__tests__/query-combinations.unit.test.ts +42 -0
- package/src/__tests__/query-light-extract-flat-column-ratio.perf.test.ts +252 -0
- package/src/__tests__/query-storage-trends.perf.test.ts +104 -0
- package/src/__tests__/query-trs-flat-column-ratio.perf.test.ts +194 -0
- package/src/__tests__/query.unit.test.ts +196 -0
- package/src/__tests__/relationship-index.perf.test.ts +126 -0
- package/src/__tests__/relationship-index.test.ts +70 -0
- package/src/__tests__/scalar-field-type-owner.test-d.ts +71 -0
- package/src/__tests__/schedule-determinism.unit.test.ts +36 -0
- package/src/__tests__/schedule-inspection.unit.test.ts +81 -0
- package/src/__tests__/schedule-scope-error.unit.test.ts +63 -0
- package/src/__tests__/schedule-token.unit.test.ts +54 -0
- package/src/__tests__/schema-vocab.test-d.ts +103 -0
- package/src/__tests__/serialization.unit.test.ts +2740 -0
- package/src/__tests__/shared-kernel-eligibility.test-d.ts +18 -0
- package/src/__tests__/shared-kernel-eligibility.unit.test.ts +78 -0
- package/src/__tests__/shared-ref-store.unit.test.ts +646 -0
- package/src/__tests__/sparse-tag.unit.test.ts +201 -0
- package/src/__tests__/spawn-field-error.test-d.ts +41 -0
- package/src/__tests__/stale-error.test-d.ts +208 -0
- package/src/__tests__/string-view-symmetry.test-d.ts +26 -0
- package/src/__tests__/string-vocab.test-d.ts +49 -0
- package/src/__tests__/structure-epoch-boundaries.unit.test.ts +39 -0
- package/src/__tests__/structure-epoch.unit.test.ts +48 -0
- package/src/__tests__/table-archetype-mapping.unit.test.ts +78 -0
- package/src/__tests__/time.unit.test.ts +79 -0
- package/src/__tests__/types.test-d.ts +38 -0
- package/src/__tests__/unique-ref-store.unit.test.ts +348 -0
- package/src/__tests__/utils/handle-numeric.ts +30 -0
- package/src/__tests__/validation-root-surface.unit.test.ts +15 -0
- package/src/__tests__/visibility-atomic-write.unit.test.ts +82 -0
- package/src/__tests__/world-change-journal.unit.test.ts +97 -0
- package/src/__tests__/world-characterization.unit.test.ts +408 -0
- package/src/__tests__/world-consumer-inference.test-d.ts +16 -0
- package/src/__tests__/world-health.contract.test.ts +87 -0
- package/src/__tests__/world-inspection.test.ts +37 -0
- package/src/__tests__/world-internal-identity.unit.test.ts +17 -0
- package/src/__tests__/world-managed-roundtrip.unit.test.ts +98 -0
- package/src/__tests__/world-scheduling.m4.test.ts +52 -0
- package/src/__tests__/world-unique-roundtrip.unit.test.ts +357 -0
- package/src/__tests__/world.test-d.ts +156 -0
- package/src/buffer-pool.ts +357 -0
- package/src/commands.ts +644 -0
- package/src/component-default-fallback.ts +236 -0
- package/src/component-schema.ts +92 -0
- package/src/component-value-validate.ts +135 -0
- package/src/component.ts +1268 -0
- package/src/entity-handle.ts +104 -0
- package/src/entity.ts +140 -0
- package/src/errors/query-and-component-errors.ts +200 -0
- package/src/errors/relationship-errors.ts +198 -0
- package/src/errors/sprite-and-shared-errors.ts +231 -0
- package/src/errors/validation-errors.ts +506 -0
- package/src/errors.ts +1464 -0
- package/src/execution/shared-kernel.ts +392 -0
- package/src/externalization/index.ts +170 -0
- package/src/index.ts +414 -0
- package/src/plugin-service.ts +35 -0
- package/src/projection/index.ts +318 -0
- package/src/query/query.ts +606 -0
- package/src/relationship-index.ts +175 -0
- package/src/resource.ts +106 -0
- package/src/schedule-token.ts +40 -0
- package/src/schedule.ts +846 -0
- package/src/shared-ref-store.ts +418 -0
- package/src/shared.ts +23 -0
- package/src/storage/archetype-graph.ts +166 -0
- package/src/storage/archetype.ts +78 -0
- package/src/storage/change-detection.ts +231 -0
- package/src/storage/column.ts +247 -0
- package/src/storage/table.ts +153 -0
- package/src/time.ts +122 -0
- package/src/unique-ref-store.ts +278 -0
- package/src/world-change-journal.ts +84 -0
- package/src/world-component-access.ts +1421 -0
- package/src/world-component-storage.ts +1178 -0
- package/src/world-core.ts +74 -0
- package/src/world-entity-lifecycle.ts +539 -0
- package/src/world-internal.ts +75 -0
- package/src/world-scheduling.ts +499 -0
- package/src/world.ts +1399 -0
package/dist/world.d.ts
ADDED
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
import type { Handle, Result } from '@forgeax/engine-types';
|
|
2
|
+
import { type Component, ComponentCatalog, type ComponentSchema, type InputShapeOf, type ShapeOf } from './component';
|
|
3
|
+
import { type EntityHandle } from './entity-handle';
|
|
4
|
+
import type { CommandFailedError, ComponentAlreadyPresentError, ComponentFieldInvalidValueError, ComponentNotDefinedError, ComponentNotPresentError, ComponentNumericValueInvalidError, FixedSizeMismatchError, ManagedArrayInvalidValueError, ManagedBufferOutOfBoundsError, ManagedBufferShrinkNotSupportedError, RelationshipDetachMismatchError, RelationshipMirrorComponentNotRegisteredError, RelationshipMirrorFieldTypeMismatchError, RelationshipSelfCycleError, RemoveEssentialComponentError, ScheduleMutationError, ScheduleScopeMismatchError, SharedKernelEligibilityError, SharedKernelFailureError, StaleEntityError, SystemFailedError, SystemSetNotRegisteredError, TimeConfigInvalidError, TimeDeltaInvalidError, UniqueRefDoubleReleaseError, UniqueRefReleasedError, WorldPoisonedError } from './errors';
|
|
5
|
+
import { RelationshipTargetReadonlyError } from './errors';
|
|
6
|
+
import { type WorldExecutionState } from './execution/shared-kernel';
|
|
7
|
+
import type { QueryDescriptor } from './query/query';
|
|
8
|
+
import { type Query, type QueryCreationError } from './query/query';
|
|
9
|
+
import { type RelationshipTargetComponent } from './relationship-index';
|
|
10
|
+
import { type SystemDescriptor, type SystemSet } from './schedule';
|
|
11
|
+
import type { SharedRefStore } from './shared-ref-store';
|
|
12
|
+
import { type ChangeTicks } from './storage/change-detection';
|
|
13
|
+
import { type WorldOptions } from './time';
|
|
14
|
+
import { type WorldInternal, worldInternal } from './world-internal';
|
|
15
|
+
/**
|
|
16
|
+
* Union of all EcsError types that World methods can return via Result.
|
|
17
|
+
* AI users: switch on `.code` for programmatic branching.
|
|
18
|
+
*/
|
|
19
|
+
export type EcsError = CommandFailedError | StaleEntityError | ComponentNotPresentError | ComponentAlreadyPresentError | ComponentFieldInvalidValueError | ComponentNumericValueInvalidError | ManagedArrayInvalidValueError | UniqueRefReleasedError | UniqueRefDoubleReleaseError | ManagedBufferOutOfBoundsError | ManagedBufferShrinkNotSupportedError | FixedSizeMismatchError | RelationshipSelfCycleError | RelationshipMirrorComponentNotRegisteredError | RelationshipMirrorFieldTypeMismatchError | RelationshipDetachMismatchError | RelationshipTargetReadonlyError | ComponentNotDefinedError | RemoveEssentialComponentError | SystemSetNotRegisteredError | SystemFailedError | TimeDeltaInvalidError | TimeConfigInvalidError | ScheduleScopeMismatchError | SharedKernelEligibilityError | SharedKernelFailureError | WorldPoisonedError;
|
|
20
|
+
/** Component data for spawn/addComponent: component token + initial values.
|
|
21
|
+
*
|
|
22
|
+
* `data` is `Partial<InputShapeOf<S>>` (feat-20260517 / M2; tweak-20260616
|
|
23
|
+
* input/output split): spawn / addComponent / SceneAsset.instantiate share the
|
|
24
|
+
* SAME shape contract via the layer-2 + layer-3 silent fallback applied inside
|
|
25
|
+
* `writeRow` (`fillComponentDefaults`). The input shape widens
|
|
26
|
+
* `array<scalar, N>` / `array<scalar>` to also accept `readonly number[]`
|
|
27
|
+
* because writeArrayField copies bytes from either shape — AI users can write
|
|
28
|
+
* `times: [0.5]` instead of `new Float32Array([0.5])` boilerplate. Wrong-VALUE
|
|
29
|
+
* fields (e.g. `{ fov: 'bad' }`) still fire field-level TS2322 — mapped-tuple
|
|
30
|
+
* primary inference does not degrade to the "No overload matches" wall
|
|
31
|
+
* (AC-03 / C-4). */
|
|
32
|
+
export interface ComponentData<S extends ComponentSchema = ComponentSchema> {
|
|
33
|
+
component: Component<string, S>;
|
|
34
|
+
data: Partial<InputShapeOf<S>>;
|
|
35
|
+
}
|
|
36
|
+
type WritableComponent<C extends Component> = C extends RelationshipTargetComponent ? never : C;
|
|
37
|
+
/**
|
|
38
|
+
* Per-archetype summary returned by `world.inspect()`. Sorted ComponentId key
|
|
39
|
+
* (always prefixed by the essential id=0 Entity column, e.g. "0+2+5+7"),
|
|
40
|
+
* human-readable component names, live entity count, allocated row capacity.
|
|
41
|
+
*/
|
|
42
|
+
export interface ArchetypeInfo {
|
|
43
|
+
/** Sorted ComponentId key, always prefixed by the id=0 Entity column (e.g. "0+2+5+7"). */
|
|
44
|
+
readonly key: string;
|
|
45
|
+
/** Human-readable component names in this archetype. */
|
|
46
|
+
readonly componentNames: string[];
|
|
47
|
+
/** Number of live entities in this archetype. */
|
|
48
|
+
readonly entityCount: number;
|
|
49
|
+
readonly tableId: number;
|
|
50
|
+
}
|
|
51
|
+
export interface TableInfo {
|
|
52
|
+
readonly id: number;
|
|
53
|
+
readonly key: string;
|
|
54
|
+
readonly componentNames: string[];
|
|
55
|
+
readonly entityCount: number;
|
|
56
|
+
readonly capacity: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Typed diagnostic snapshot of the World state.
|
|
60
|
+
* Returned by `world.inspect()` for programmatic introspection by AI users.
|
|
61
|
+
*/
|
|
62
|
+
export interface WorldInspection {
|
|
63
|
+
/** Total number of live entities. */
|
|
64
|
+
readonly entityCount: number;
|
|
65
|
+
/** Number of archetypes currently allocated. */
|
|
66
|
+
readonly archetypeCount: number;
|
|
67
|
+
/** Per-archetype details. */
|
|
68
|
+
readonly archetypes: ArchetypeInfo[];
|
|
69
|
+
readonly tableCount: number;
|
|
70
|
+
readonly tables: TableInfo[];
|
|
71
|
+
/**
|
|
72
|
+
* Names of components that are currently active in this World — i.e.
|
|
73
|
+
* every distinct component name appearing on at least one non-empty
|
|
74
|
+
* archetype. Collected by walking the archetype graph, so a component
|
|
75
|
+
* that was defined but never spawned into this World does not appear.
|
|
76
|
+
*/
|
|
77
|
+
readonly activeComponents: string[];
|
|
78
|
+
/** Number of registered systems. Always equals `systems.length` (M2 derived invariant). */
|
|
79
|
+
readonly systemCount: number;
|
|
80
|
+
/**
|
|
81
|
+
* Per-system summary (M3 — plan-strategy D-8). One entry per
|
|
82
|
+
* registered system, in registration order. The `systemCount` field is
|
|
83
|
+
* preserved as a derived alias of `systems.length` so existing inspector
|
|
84
|
+
* P0 e2e cases that read `systemCount` keep working.
|
|
85
|
+
*
|
|
86
|
+
* `sets` is the list of set names this system belongs to (empty array for
|
|
87
|
+
* systems registered via plain `addSystem` without `addSystems`).
|
|
88
|
+
*/
|
|
89
|
+
readonly systems: ReadonlyArray<{
|
|
90
|
+
readonly name: string;
|
|
91
|
+
readonly sets: readonly string[];
|
|
92
|
+
}>;
|
|
93
|
+
/** Keys of all inserted resources. */
|
|
94
|
+
readonly resourceKeys: string[];
|
|
95
|
+
/** Systems grouped by their schedule token. */
|
|
96
|
+
readonly schedules: ReadonlyArray<{
|
|
97
|
+
readonly schedule: import('./schedule-token').ScheduleToken;
|
|
98
|
+
readonly systems: ReadonlyArray<{
|
|
99
|
+
readonly name: string;
|
|
100
|
+
readonly sets: readonly string[];
|
|
101
|
+
}>;
|
|
102
|
+
}>;
|
|
103
|
+
/** Count systems in one explicit schedule. */
|
|
104
|
+
scheduleSystemCount(schedule: import('./schedule-token').ScheduleToken): number;
|
|
105
|
+
}
|
|
106
|
+
/** JSON-safe schedule graph and access metadata returned by `world.scheduleData()`. */
|
|
107
|
+
export interface WorldScheduleQueryData {
|
|
108
|
+
readonly with: readonly string[];
|
|
109
|
+
readonly without: readonly string[];
|
|
110
|
+
readonly optional: readonly string[];
|
|
111
|
+
readonly changed: readonly string[];
|
|
112
|
+
readonly added: readonly string[];
|
|
113
|
+
}
|
|
114
|
+
/** JSON-safe system registration and access metadata. */
|
|
115
|
+
export interface WorldScheduleSystemData {
|
|
116
|
+
readonly name: string;
|
|
117
|
+
readonly sets: readonly string[];
|
|
118
|
+
readonly before: readonly string[];
|
|
119
|
+
readonly after: readonly string[];
|
|
120
|
+
readonly queries: readonly WorldScheduleQueryData[];
|
|
121
|
+
readonly resources: readonly string[];
|
|
122
|
+
}
|
|
123
|
+
/** JSON-safe system-set membership and ordering metadata. */
|
|
124
|
+
export interface WorldScheduleSetData {
|
|
125
|
+
readonly name: string;
|
|
126
|
+
readonly members: readonly string[];
|
|
127
|
+
readonly before: readonly string[];
|
|
128
|
+
readonly after: readonly string[];
|
|
129
|
+
readonly chained: boolean;
|
|
130
|
+
}
|
|
131
|
+
/** JSON-safe projection of one explicit World schedule. */
|
|
132
|
+
export interface WorldScheduleData {
|
|
133
|
+
readonly name: string;
|
|
134
|
+
readonly systems: readonly WorldScheduleSystemData[];
|
|
135
|
+
readonly systemSets: readonly WorldScheduleSetData[];
|
|
136
|
+
readonly dependencies: readonly (readonly [string, string])[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Internal record describing where an entity lives.
|
|
140
|
+
*
|
|
141
|
+
* Liveness (feat-20260602 / plan-strategy D-4): the former `alive` boolean was
|
|
142
|
+
* absorbed into `generation`. A despawn unconditionally bumps `generation` (so a
|
|
143
|
+
* stale handle's `gen` no longer matches), and `gen > 255` retires the slot
|
|
144
|
+
* permanently (it is never pushed back to `freeIndices`). The single liveness
|
|
145
|
+
* predicate is therefore "handle gen matches AND archetypeId !== -1" -- see
|
|
146
|
+
* `World.recordIsLive`. A deferred-spawn allocation is "pending" when
|
|
147
|
+
* archetypeId === -1 (not yet materialized into an archetype row); no separate
|
|
148
|
+
* boolean is needed.
|
|
149
|
+
*/
|
|
150
|
+
export interface EntityRecord {
|
|
151
|
+
generation: number;
|
|
152
|
+
archetypeId: number;
|
|
153
|
+
archetypeRow: number;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The World owns:
|
|
157
|
+
* - the registry of known component schemas;
|
|
158
|
+
* - all archetypes (via ArchetypeGraph);
|
|
159
|
+
* - the entity index table (records by index slot);
|
|
160
|
+
* - the free-list of recyclable entity slots.
|
|
161
|
+
*/
|
|
162
|
+
export declare class World {
|
|
163
|
+
/** Package-internal implementation seam; not exported from any entry point. */
|
|
164
|
+
readonly [worldInternal]: WorldInternal;
|
|
165
|
+
/** The single package-private owner of storage, epochs, and change evidence. */
|
|
166
|
+
private readonly core;
|
|
167
|
+
get identity(): string;
|
|
168
|
+
/** Plugin-owned component discovery scoped to this World and removed through leases. */
|
|
169
|
+
readonly components: ComponentCatalog;
|
|
170
|
+
private executionState;
|
|
171
|
+
/** Monotonic clock advanced exactly once per successful mutation. */
|
|
172
|
+
/** Monotonic revision for successful entity/component structure writes. */
|
|
173
|
+
/** Last mutation epoch for each component id, used by component-owned projections. */
|
|
174
|
+
/** Ordered, bounded evidence consumed by persistent engine-owned projections. */
|
|
175
|
+
private get mutationEpoch();
|
|
176
|
+
private set mutationEpoch(value);
|
|
177
|
+
private get structureEpoch();
|
|
178
|
+
private set structureEpoch(value);
|
|
179
|
+
private get componentMutationEpochs();
|
|
180
|
+
private get changeJournal();
|
|
181
|
+
/** Free index slots (LIFO stack). */
|
|
182
|
+
private get records();
|
|
183
|
+
private get freeIndices();
|
|
184
|
+
/**
|
|
185
|
+
* Relationship-sync reentry guard (feat-20260531 M2 / plan-strategy D-7).
|
|
186
|
+
/** The archetype graph: manages all archetypes + edge caching. */
|
|
187
|
+
private get graph();
|
|
188
|
+
/** DAG schedules for the two built-in execution scopes. */
|
|
189
|
+
private readonly schedules;
|
|
190
|
+
/** Resource store: typed key-value global singletons. */
|
|
191
|
+
private readonly resources;
|
|
192
|
+
private readonly clock;
|
|
193
|
+
/** Remainder carried between fixed-step runs. */
|
|
194
|
+
private fixedAccumulator;
|
|
195
|
+
/**
|
|
196
|
+
* ECS-managed handle store (M1). Owned by the World - constructed eagerly
|
|
197
|
+
* so every spawn / despawn / set path can dispatch managed-ref releases
|
|
198
|
+
* without caller-side wiring. AI users obtain `Handle<T,'unique'>` values
|
|
199
|
+
* by accessing the store through internal channels (the surface is
|
|
200
|
+
* private; managed-ref-bearing fields read through `world.get`).
|
|
201
|
+
*/
|
|
202
|
+
private get uniqueRefs();
|
|
203
|
+
/**
|
|
204
|
+
* Per-World `SharedRefStore` (feat-20260614 M3). Backs every `shared<T>`
|
|
205
|
+
* schema field + the `world.allocSharedRef` facade. Public read-only so AI
|
|
206
|
+
* users can `retain` / `release` / `resolve` user-tier handles directly off
|
|
207
|
+
* the world (the surface is small enough that hiding it behind another
|
|
208
|
+
* facade would be a phantom indirection - charter F1 single-entry
|
|
209
|
+
* indexability).
|
|
210
|
+
*
|
|
211
|
+
* Final release publishes structured evidence; there is no callback surface.
|
|
212
|
+
* M6 D-15: the store manages only user-tier slots
|
|
213
|
+
* (`>= BUILTIN_BASE`); builtin handles are process-static in their
|
|
214
|
+
* authoring package and never reference-counted.
|
|
215
|
+
*/
|
|
216
|
+
get sharedRefs(): SharedRefStore;
|
|
217
|
+
/**
|
|
218
|
+
* BufferPool backing every `buffer:<N>` schema-vocab field (M2). Eagerly
|
|
219
|
+
* constructed (per-World, D-2). `spawn` allocs slots for buffer fields and
|
|
220
|
+
* stores the slot id in the u32 column; `despawn` / `removeComponent`
|
|
221
|
+
* release the slots; `set(e, C, { field: Uint8Array })` copies bytes into
|
|
222
|
+
* the live view without re-allocating (schema-declared byteLength is
|
|
223
|
+
* fixed in v1; runtime grow is reserved for the M4 carry-over path).
|
|
224
|
+
*/
|
|
225
|
+
private get bufferPool();
|
|
226
|
+
private readonly componentAccess;
|
|
227
|
+
constructor(options?: WorldOptions);
|
|
228
|
+
/** Immutable integrity state for execution coordinators and headless callers. */
|
|
229
|
+
get execution(): WorldExecutionState;
|
|
230
|
+
/** Resolve a schedule token owned by this World realm without package singleton identity. */
|
|
231
|
+
scheduleToken(name: import('./schedule-token').ScheduleName): import('./schedule-token').ScheduleToken;
|
|
232
|
+
/** SharedKernel is the only writer; application code recovers by constructing a new World. */
|
|
233
|
+
private internalpoisonExecution;
|
|
234
|
+
query<const R extends readonly Component[] = readonly [], const W extends readonly Component[] = readonly [], const O extends readonly Component[] = readonly []>(descriptor: QueryDescriptor<R, W, O>): Result<Query<R, W, O>, QueryCreationError>;
|
|
235
|
+
/** Expose archetype graph for query engine. Not part of public API. */
|
|
236
|
+
private internalgetGraph;
|
|
237
|
+
private componentIsInUse;
|
|
238
|
+
/** Current upper bound for mutation observation. */
|
|
239
|
+
private internalgetMutationEpoch;
|
|
240
|
+
/** Current cursor for a persistent projection subscriber. */
|
|
241
|
+
private internalgetChangeCursor;
|
|
242
|
+
/** Read complete mutation evidence or an explicit rebuild signal. */
|
|
243
|
+
private internalreadChangesSince;
|
|
244
|
+
/** Structure snapshot used to invalidate borrowed query facades. */
|
|
245
|
+
private internalgetStructureEpoch;
|
|
246
|
+
/** Resolve current logical identity for a packed entity handle. */
|
|
247
|
+
private internalgetEntityArchetype;
|
|
248
|
+
/** Component change state for query filters. */
|
|
249
|
+
private internalgetComponentChange;
|
|
250
|
+
/** Allocate one epoch after a mutation has succeeded. */
|
|
251
|
+
private internalnextMutationEpoch;
|
|
252
|
+
/** Record one successful structural mutation. */
|
|
253
|
+
private internalmarkStructureChanged;
|
|
254
|
+
/** Current structural revision for mounted World projections. */
|
|
255
|
+
getStructureEpoch(): number;
|
|
256
|
+
/** Mark a component as both added and changed at the current tick. */
|
|
257
|
+
private internalmarkComponentAdded;
|
|
258
|
+
/** Mark one mutation's component instances with a shared epoch. */
|
|
259
|
+
private internalmarkComponentsAdded;
|
|
260
|
+
/** Mark an existing component as changed at the current tick. */
|
|
261
|
+
private internalmarkComponentChanged;
|
|
262
|
+
/** Mark one contiguous component range with a single epoch. */
|
|
263
|
+
private internalmarkComponentRangeChanged;
|
|
264
|
+
/** Latest mutation token for one component-owned projection. */
|
|
265
|
+
private internalgetComponentMutationEpoch;
|
|
266
|
+
/** Read a materialized relationship target in O(1 + k). */
|
|
267
|
+
private internalgetRelationshipTargetEntities;
|
|
268
|
+
/** Monotonic epoch for the materialized relationship index. */
|
|
269
|
+
private internalgetRelationshipEpoch;
|
|
270
|
+
/** Publish changes to a value derived without an authored mutation epoch. */
|
|
271
|
+
private internalmarkDerivedComponentChanges;
|
|
272
|
+
/** Query facade write after the facade has already marked evidence. */
|
|
273
|
+
private internalsetQueryRow;
|
|
274
|
+
/** Query facade read that does not re-enter the public World API. */
|
|
275
|
+
private internalgetQueryRow;
|
|
276
|
+
/** Remove one component's change state after archetype removal. */
|
|
277
|
+
private internalremoveComponentChange;
|
|
278
|
+
/** Remove all change state before an entity handle is retired. */
|
|
279
|
+
private internalremoveEntityChanges;
|
|
280
|
+
/** Return resource change ticks for diagnostics and resource-driven systems. */
|
|
281
|
+
getResourceChange(name: string): ChangeTicks | undefined;
|
|
282
|
+
/**
|
|
283
|
+
* Route a structured error from
|
|
284
|
+
* an engine-internal subsystem (e.g. RenderSystem extract stage, w15).
|
|
285
|
+
*
|
|
286
|
+
* Mirrors the private `errorHandler(err, ctx)` call sites inside `World`
|
|
287
|
+
* itself; the dedicated accessor avoids exposing `errorHandler` directly
|
|
288
|
+
* and keeps the routing contract under the `_xxx` `@internal` umbrella so
|
|
289
|
+
* AI users do not discover it through IDE autocomplete on `World`.
|
|
290
|
+
*
|
|
291
|
+
* Not part of the public API.
|
|
292
|
+
*/
|
|
293
|
+
private internalrouteError;
|
|
294
|
+
/** */ private internalgetRecords;
|
|
295
|
+
/** */ private internalgetFreeIndices;
|
|
296
|
+
/** */ private internalgetResources;
|
|
297
|
+
/** */ private internalgetFixedAccumulator;
|
|
298
|
+
/** */ private internalsetFixedAccumulator;
|
|
299
|
+
/** */ private internalgetUniqueRefs;
|
|
300
|
+
/** */ private internalgetBufferPool;
|
|
301
|
+
/** Scheduler-owned mutable clock capability. */
|
|
302
|
+
private internalgetClockWriter;
|
|
303
|
+
/** */ private internalgetSchedule;
|
|
304
|
+
/** */ private internalgetSchedules;
|
|
305
|
+
/** */ private internalgetSharedRefs;
|
|
306
|
+
/**
|
|
307
|
+
* Register a system with query descriptor and optional ordering constraints.
|
|
308
|
+
*
|
|
309
|
+
* `const Qs` mirrors the free `addSystem` signature so the call-site
|
|
310
|
+
* `queries` tuple is locked literal-form, letting `descriptor.fn`'s first
|
|
311
|
+
* parameter recover per-query row access shapes (S-5, KD-3 — class method
|
|
312
|
+
* generic, not free function double track).
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```ts
|
|
316
|
+
* const Position = defineComponent('Position', { x: 'f32', y: 'f32' });
|
|
317
|
+
* const world = new World();
|
|
318
|
+
* world.addSystem(Update, {
|
|
319
|
+
* name: 'read-pos',
|
|
320
|
+
* queries: [{ with: [Position] }],
|
|
321
|
+
* fn: (world, queries) => { void world; for (const row of queries[0]) { void row.entity; } },
|
|
322
|
+
* });
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
addSystem<const Qs extends ReadonlyArray<QueryDescriptor>>(schedule: import('./schedule-token').ScheduleToken, descriptor: SystemDescriptor<Qs>): Result<void, ScheduleScopeMismatchError>;
|
|
326
|
+
/**
|
|
327
|
+
* Remove a registered system by name (M2 — plan-strategy D-3).
|
|
328
|
+
*
|
|
329
|
+
* Returns `Result<void, ScheduleMutationError>`:
|
|
330
|
+
* - ok branch: the slot is dropped and the schedule will rebuild on the
|
|
331
|
+
* next `update()`.
|
|
332
|
+
* - err branch with `.code === 'system-before-unknown'`: no system carries
|
|
333
|
+
* this name; `.detail.candidates` lists the registered names.
|
|
334
|
+
*
|
|
335
|
+
* Designed to support `@forgeax/engine-remote`'s typed `injectSystem` /
|
|
336
|
+
* `removeSystem` channel and the WS-disconnect reverse-remove path.
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* ```ts
|
|
340
|
+
* const r = world.removeSystem(Update, 'movement');
|
|
341
|
+
* if (!r.ok) console.error(r.error.code, r.error.detail.candidates);
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
removeSystem(schedule: import('./schedule-token').ScheduleToken, name: string): Result<void, ScheduleMutationError | ScheduleScopeMismatchError>;
|
|
345
|
+
/**
|
|
346
|
+
* Replace a registered system in-place (M2 — plan-strategy D-3 atomic semantics).
|
|
347
|
+
*
|
|
348
|
+
* Overwrites the descriptor stored under `name` while preserving the
|
|
349
|
+
* registration slot — `before / after` references that target this name
|
|
350
|
+
* remain bound.
|
|
351
|
+
*
|
|
352
|
+
* Returns `Result<void, ScheduleMutationError>`:
|
|
353
|
+
* - ok branch: descriptor swapped, schedule marked dirty.
|
|
354
|
+
* - err branch with `.code === 'system-before-unknown'`: no system carries
|
|
355
|
+
* this name; use `addSystem(descriptor)` to register a new one instead.
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```ts
|
|
359
|
+
* const r = world.replaceSystem(Update, 'movement', {
|
|
360
|
+
* name: 'movement',
|
|
361
|
+
* queries: [{ with: [Position] }],
|
|
362
|
+
* fn: (world, queryResults) => { ... },
|
|
363
|
+
* });
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
replaceSystem<const Qs extends ReadonlyArray<QueryDescriptor>>(schedule: import('./schedule-token').ScheduleToken, name: string, descriptor: SystemDescriptor<Qs>): Result<void, ScheduleMutationError | ScheduleScopeMismatchError>;
|
|
367
|
+
/**
|
|
368
|
+
* Batch-register systems to a set. Validates the set token before writing.
|
|
369
|
+
*
|
|
370
|
+
* - First call for a system name: registers it via the existing `addSystem` path.
|
|
371
|
+
* - Subsequent calls: only adds the system name to the set's members (dedup).
|
|
372
|
+
*
|
|
373
|
+
* Returns `Result.err` with `SystemSetNotRegisteredError` if the set token
|
|
374
|
+
* fails identity validation.
|
|
375
|
+
*
|
|
376
|
+
* @example
|
|
377
|
+
* ```ts
|
|
378
|
+
* const GameplaySet = defineSystemSet({ name: 'gameplay' });
|
|
379
|
+
* const world = new World();
|
|
380
|
+
* const r = world.addSystems(Update, GameplaySet, [movement, collision]);
|
|
381
|
+
* if (!r.ok) console.error(r.error.code, r.error.hint);
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
384
|
+
addSystems<const Qs extends ReadonlyArray<QueryDescriptor>>(schedule: import('./schedule-token').ScheduleToken, set: SystemSet, systems: ReadonlyArray<SystemDescriptor<Qs>>): Result<void, SystemSetNotRegisteredError | ScheduleScopeMismatchError>;
|
|
385
|
+
/**
|
|
386
|
+
* Execute one frame: run all systems in DAG order, then flush deferred commands.
|
|
387
|
+
* Empty world (no systems) completes silently (E-09).
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
* ```ts
|
|
391
|
+
* const Position = defineComponent('Position', { x: 'f32', y: 'f32' });
|
|
392
|
+
* const world = new World();
|
|
393
|
+
* world.spawn({ component: Position, data: { x: 0, y: 0 } }).unwrap();
|
|
394
|
+
* world.update(); // run all systems + flush commands
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
update(deltaSeconds?: number): Result<void, TimeDeltaInvalidError | TimeConfigInvalidError | ScheduleScopeMismatchError | WorldPoisonedError | CommandFailedError | SystemFailedError | import('./errors').CyclicDependencyError | SharedKernelFailureError>;
|
|
398
|
+
/** Insert or overwrite a resource (idempotent, E-13). */
|
|
399
|
+
insertResource<T>(key: string | {
|
|
400
|
+
readonly name: string;
|
|
401
|
+
}, value: T): void;
|
|
402
|
+
/**
|
|
403
|
+
* Get a resource by key.
|
|
404
|
+
* @throws ResourceNotFoundError if key not found (E-14).
|
|
405
|
+
*/
|
|
406
|
+
getResource(key: typeof import('./time').Time): import('./time').TimeResource;
|
|
407
|
+
getResource(key: typeof import('./time').FixedTime): import('./time').FixedTimeResource;
|
|
408
|
+
getResource<T>(key: string | {
|
|
409
|
+
readonly name: string;
|
|
410
|
+
}): T;
|
|
411
|
+
/** Check if a resource exists. */
|
|
412
|
+
hasResource(key: string | {
|
|
413
|
+
readonly name: string;
|
|
414
|
+
}): boolean;
|
|
415
|
+
/** Remove a resource by key. */
|
|
416
|
+
removeResource(key: string | {
|
|
417
|
+
readonly name: string;
|
|
418
|
+
}): void;
|
|
419
|
+
/**
|
|
420
|
+
* Return a typed diagnostic snapshot of the World state.
|
|
421
|
+
* All fields are non-undefined. Useful for AI users to programmatically
|
|
422
|
+
* introspect entity count, archetypes, registered components, systems,
|
|
423
|
+
* and resources without console.log or a debugger.
|
|
424
|
+
*
|
|
425
|
+
* @example
|
|
426
|
+
* ```ts
|
|
427
|
+
* const Position = defineComponent('Position', { x: 'f32', y: 'f32' });
|
|
428
|
+
* const world = new World();
|
|
429
|
+
* world.spawn({ component: Position, data: { x: 0, y: 0 } }).unwrap();
|
|
430
|
+
* const snap = world.inspect();
|
|
431
|
+
* console.log(snap.entityCount, snap.activeComponents);
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
inspect(): WorldInspection;
|
|
435
|
+
/** Return the registered schedule graphs and their declared access metadata. */
|
|
436
|
+
scheduleData(): ReadonlyArray<WorldScheduleData>;
|
|
437
|
+
/**
|
|
438
|
+
* Allocate a standalone managed reference handle with an optional release
|
|
439
|
+
* callback. Returns a branded {@link Handle}<Target, 'unique'> that can be
|
|
440
|
+
* stored in schema-vocab `ref<T>` fields or resolved through
|
|
441
|
+
* {@link UniqueRefStore.resolve} (via `world.get` on a component with
|
|
442
|
+
* `ref<T>` fields).
|
|
443
|
+
*
|
|
444
|
+
* When the handle is released (despawn / removeComponent / set-overwrite),
|
|
445
|
+
* the `onRelease` callback fires with the payload (captured on the stack);
|
|
446
|
+
* by then the slot's bookkeeping (callback table, payload map, freelist) is
|
|
447
|
+
* already cleared, so a *throwing* `onRelease` re-propagates from the first
|
|
448
|
+
* `release` call without leaving the store inconsistent — a second `release`
|
|
449
|
+
* of the same handle returns `UniqueRefDoubleReleaseError` as expected. RAII
|
|
450
|
+
* cleanup semantics preserved (plan-strategy D-5; throw-safety AC-01/02).
|
|
451
|
+
*
|
|
452
|
+
* Handles are *operational, not persistent*: caching them across release
|
|
453
|
+
* boundaries (despawn / removeComponent / set-overwrite) is undefined
|
|
454
|
+
* behavior — the same `u32` may silently resolve to a freshly allocated
|
|
455
|
+
* payload after slot reuse. See `packages/ecs/README.md` § "Managed handles
|
|
456
|
+
* are operational, not persistent" and `docs/specs/2026-06-14-ecs-managed-
|
|
457
|
+
* lifecycle-ssot-design.md` § 3.3.
|
|
458
|
+
*
|
|
459
|
+
* @typeParam Target - phantom string branding the handle (type-level only).
|
|
460
|
+
* @typeParam T - the payload type stored alongside the handle.
|
|
461
|
+
* @param target - phantom target string (type-level discriminant).
|
|
462
|
+
* @param payload - the value to store. Identity-stable until release.
|
|
463
|
+
* @param onRelease - optional cleanup hook called with the payload on release.
|
|
464
|
+
* @returns a branded `Handle<Target, 'unique'>` u32.
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* ```ts
|
|
468
|
+
* const world = new World();
|
|
469
|
+
* const handle = world.allocUniqueRef<'PhysicsBody', RigidBodyHandle>(
|
|
470
|
+
* 'PhysicsBody',
|
|
471
|
+
* rapierHandle,
|
|
472
|
+
* (h) => rapierWorld.removeRigidBody(h),
|
|
473
|
+
* );
|
|
474
|
+
* const Holder = defineComponent('Holder', { body: 'unique<PhysicsBody>' });
|
|
475
|
+
* world.spawn(Holder, { body: handle });
|
|
476
|
+
* // Despawn triggers onRelease -> Rapier body is cleaned up.
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
allocUniqueRef<Target extends string, T>(target: Target, payload: T, onRelease?: (payload: T) => void): Handle<Target, 'unique'>;
|
|
480
|
+
/**
|
|
481
|
+
* Allocate a shared (refcount-tracked) handle through the per-World
|
|
482
|
+
* {@link SharedRefStore}. Returns a `Handle<Target, 'shared'>` u32 with
|
|
483
|
+
* rc=1 (the alloc-grant). Consumers retain/release via `world.sharedRefs`.
|
|
484
|
+
*
|
|
485
|
+
* Final release publishes structured evidence through the owning
|
|
486
|
+
* {@link SharedRefStore}; payload disposal remains with the
|
|
487
|
+
* renderer/assets/plugin owner and is not a user callback.
|
|
488
|
+
*
|
|
489
|
+
* Intended for asset-registry-style producers — anything whose lifecycle
|
|
490
|
+
* is shared across multiple holders (ECS components + external systems).
|
|
491
|
+
* The single-holder one-shot release pattern stays on
|
|
492
|
+
* {@link World.allocUniqueRef} (`Handle<T, 'unique'>`).
|
|
493
|
+
*
|
|
494
|
+
* @typeParam Target - phantom string branding the handle (type-level only).
|
|
495
|
+
* @typeParam T - the payload type stored alongside the handle.
|
|
496
|
+
* @param target - phantom target string (type-level discriminant).
|
|
497
|
+
* @param payload - the value to store. Identity-stable until final release.
|
|
498
|
+
* @returns a branded `Handle<Target, 'shared'>` u32 with rc=1.
|
|
499
|
+
*
|
|
500
|
+
* @example
|
|
501
|
+
* ```ts
|
|
502
|
+
* const world = new World();
|
|
503
|
+
* const handle = world.allocSharedRef<'MaterialAsset', MaterialPayload>(
|
|
504
|
+
* 'MaterialAsset',
|
|
505
|
+
* payload,
|
|
506
|
+
* );
|
|
507
|
+
* const M = defineComponent('M', { asset: 'shared<MaterialAsset>' });
|
|
508
|
+
* world.spawn({ component: M, data: { asset: handle } });
|
|
509
|
+
* // The write-barrier dispatch retains/releases automatically on spawn / despawn.
|
|
510
|
+
* ```
|
|
511
|
+
*/
|
|
512
|
+
allocSharedRef<Target extends string, T>(target: Target, payload: T): Handle<Target, 'shared'>;
|
|
513
|
+
/**
|
|
514
|
+
* Return one producer-owned shared handle per `(target, payload object)` in
|
|
515
|
+
* this World. Repeated discovery does not retain; ECS holders still retain
|
|
516
|
+
* and release through the normal write barrier. Asset catalogues use this
|
|
517
|
+
* when repeated scene instantiation resolves the same catalogued payload.
|
|
518
|
+
* Use {@link World.allocSharedRef} for independent resources or deleters.
|
|
519
|
+
*/
|
|
520
|
+
internSharedRef<Target extends string, T extends object>(target: Target, payload: T): Handle<Target, 'shared'>;
|
|
521
|
+
private relationshipTargetWriteError;
|
|
522
|
+
private relationshipTargetPayloadWrites;
|
|
523
|
+
get<S extends ComponentSchema>(entity: EntityHandle, component: Component<string, S>): Result<ShapeOf<S>, EcsError>;
|
|
524
|
+
/**
|
|
525
|
+
* Test live component presence without constructing a Result error.
|
|
526
|
+
*
|
|
527
|
+
* Read projections commonly need to branch on optional components for many
|
|
528
|
+
* entities. Calling `get` for that branch allocates a structured
|
|
529
|
+
* ComponentNotPresentError on every ordinary miss (and StaleEntityError for
|
|
530
|
+
* a dangling handle). This predicate is deliberately non-throwing and
|
|
531
|
+
* returns false for both cases; callers that need the detailed error should
|
|
532
|
+
* continue to use `get`.
|
|
533
|
+
*/
|
|
534
|
+
hasComponent(entity: EntityHandle, component: Component): boolean;
|
|
535
|
+
private internalgetArrayView;
|
|
536
|
+
set<S extends ComponentSchema, C extends Component<string, S>>(entity: EntityHandle, component: C & WritableComponent<C>, value: Partial<InputShapeOf<S>>): Result<void, EcsError>;
|
|
537
|
+
addComponent<S extends ComponentSchema, C extends Component<string, S>>(entity: EntityHandle, componentData: ComponentData<S> & {
|
|
538
|
+
component: C & WritableComponent<C>;
|
|
539
|
+
}): Result<void, EcsError>;
|
|
540
|
+
private internaladdComponentCore;
|
|
541
|
+
removeComponent<S extends ComponentSchema, C extends Component<string, S>>(entity: EntityHandle, component: C & WritableComponent<C>): Result<void, EcsError>;
|
|
542
|
+
private internalremoveComponentCore;
|
|
543
|
+
private internalallocatePendingEntity;
|
|
544
|
+
/** */ private internalcancelPendingEntity;
|
|
545
|
+
private internalmaterializePendingEntity;
|
|
546
|
+
/** Shared structural preflight for direct and deferred writes. */
|
|
547
|
+
private internalpreflightComponentData;
|
|
548
|
+
/** */ private internalallocateIndex;
|
|
549
|
+
/** */ private internalrecordIsLive;
|
|
550
|
+
/** */ private internallookupAlive;
|
|
551
|
+
/** */ private internalreadRow;
|
|
552
|
+
/** */ private internalwriteEntitySelf;
|
|
553
|
+
/** */ private internalwriteRow;
|
|
554
|
+
/** */ private internalreleaseManagedRefsOnRow;
|
|
555
|
+
/** */ private internalrelationshipOnInsert;
|
|
556
|
+
/** */ private internalrelationshipOnRemove;
|
|
557
|
+
/**
|
|
558
|
+
* Spawn an entity with one or more components.
|
|
559
|
+
* Multi-component spawn directly targets the correct archetype (AC-06).
|
|
560
|
+
*
|
|
561
|
+
* @returns `Result<Entity, EcsError>` — `ok(Entity)` on success.
|
|
562
|
+
* EntityIndexOverflowError still throws (build-time / infrastructure failure).
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* ```ts
|
|
566
|
+
* const Position = defineComponent('Position', { x: 'f32', y: 'f32' });
|
|
567
|
+
* const world = new World();
|
|
568
|
+
* const r = world.spawn({ component: Position, data: { x: 0, y: 0 } });
|
|
569
|
+
* if (!r.ok) { console.error(r.error.code); return; }
|
|
570
|
+
* const entity = r.value;
|
|
571
|
+
* ```
|
|
572
|
+
*/
|
|
573
|
+
spawn<const SArr extends readonly ComponentSchema[]>(...componentDatas: {
|
|
574
|
+
[K in keyof SArr]: {
|
|
575
|
+
component: Component<string, SArr[K]>;
|
|
576
|
+
data: Partial<InputShapeOf<SArr[K]>>;
|
|
577
|
+
};
|
|
578
|
+
}): Result<EntityHandle, EcsError>;
|
|
579
|
+
/**
|
|
580
|
+
* Core implementation of `spawn` with reentry guard.
|
|
581
|
+
*
|
|
582
|
+
* @param internal — `true` when called from relationship maintenance
|
|
583
|
+
* (lazy mirror create or exclusive reparent).
|
|
584
|
+
*/
|
|
585
|
+
private internalspawnCore;
|
|
586
|
+
/**
|
|
587
|
+
* Despawn an entity. Stale handles are silently ignored (E-01, AC-17).
|
|
588
|
+
* Generation retirement: gen=255 → index permanently retired (D-08/E-08).
|
|
589
|
+
*
|
|
590
|
+
* @returns `Result<void, EcsError>` — `ok(void)` always (idempotent on stale handles).
|
|
591
|
+
*
|
|
592
|
+
* @example
|
|
593
|
+
* ```ts
|
|
594
|
+
* const Position = defineComponent('Position', { x: 'f32', y: 'f32' });
|
|
595
|
+
* const world = new World();
|
|
596
|
+
* const e = world.spawn({ component: Position, data: { x: 0, y: 0 } }).unwrap();
|
|
597
|
+
* const r = world.despawn(e);
|
|
598
|
+
* r.unwrap(); // idempotent: ok(void) even on stale handle
|
|
599
|
+
* ```
|
|
600
|
+
*/
|
|
601
|
+
despawn(entity: EntityHandle): Result<void, EcsError>;
|
|
602
|
+
/** Despawn every live entity through the normal lifecycle and ref cleanup path. */
|
|
603
|
+
despawnAll(): Result<void, EcsError>;
|
|
604
|
+
/**
|
|
605
|
+
* Core implementation of `despawn` with reentry guard.
|
|
606
|
+
*
|
|
607
|
+
* @param internal — `true` when called from within linkedSpawn cascade.
|
|
608
|
+
* Nested despawn skips relationship pruning after the parent is retired;
|
|
609
|
+
* the linkedSpawn collection still walks the subtree so grandchildren
|
|
610
|
+
* cascade correctly (tweak-20260714 M2, R-6).
|
|
611
|
+
*/
|
|
612
|
+
private internaldespawnCore;
|
|
613
|
+
addChild<S extends ComponentSchema>(parent: EntityHandle, child: EntityHandle, component: Component<string, S>, data: Partial<InputShapeOf<S>>): Result<void, EcsError>;
|
|
614
|
+
removeChild<S extends ComponentSchema>(parent: EntityHandle, child: EntityHandle, component: Component<string, S>): Result<void, EcsError>;
|
|
615
|
+
reparent<S extends ComponentSchema>(child: EntityHandle, newParent: EntityHandle, component: Component<string, S>, data: Partial<InputShapeOf<S>>): Result<void, EcsError>;
|
|
616
|
+
iterAncestors(entity: EntityHandle): Iterable<EntityHandle>;
|
|
617
|
+
iterDescendants(entity: EntityHandle): Iterable<EntityHandle>;
|
|
618
|
+
}
|
|
619
|
+
export {};
|
|
620
|
+
//# sourceMappingURL=world.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EACL,KAAK,SAAS,EACd,gBAAgB,EAChB,KAAK,eAAe,EAEpB,KAAK,YAAY,EACjB,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,YAAY,EAA+C,MAAM,iBAAiB,CAAC;AACjG,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,iCAAiC,EACjC,sBAAsB,EACtB,6BAA6B,EAC7B,6BAA6B,EAC7B,oCAAoC,EACpC,+BAA+B,EAC/B,6CAA6C,EAC7C,wCAAwC,EACxC,0BAA0B,EAC1B,6BAA6B,EAC7B,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,qBA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