@oasys/oecs 0.5.4 → 0.6.0
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/CHANGELOG.md +1223 -266
- package/README.md +217 -112
- package/dist/core/ecs/access_check.d.cts +29 -29
- package/dist/core/ecs/access_check.d.ts +29 -29
- package/dist/core/ecs/access_check.d.ts.map +1 -1
- package/dist/core/ecs/archetype.d.cts +217 -209
- package/dist/core/ecs/archetype.d.ts +217 -209
- package/dist/core/ecs/archetype.d.ts.map +1 -1
- package/dist/core/ecs/archetype_closure.d.cts +23 -0
- package/dist/core/ecs/archetype_closure.d.ts +23 -0
- package/dist/core/ecs/archetype_closure.d.ts.map +1 -0
- package/dist/core/ecs/archetype_graph.d.cts +33 -33
- package/dist/core/ecs/archetype_graph.d.ts +33 -33
- package/dist/core/ecs/archetype_graph.d.ts.map +1 -1
- package/dist/core/ecs/archetype_types.d.cts +55 -0
- package/dist/core/ecs/archetype_types.d.ts +55 -0
- package/dist/core/ecs/archetype_types.d.ts.map +1 -0
- package/dist/core/ecs/change_feed.d.cts +53 -0
- package/dist/core/ecs/change_feed.d.ts +53 -0
- package/dist/core/ecs/change_feed.d.ts.map +1 -0
- package/dist/core/ecs/changed_query.d.cts +36 -0
- package/dist/core/ecs/changed_query.d.ts +36 -0
- package/dist/core/ecs/changed_query.d.ts.map +1 -0
- package/dist/core/ecs/chunk_columns.d.cts +49 -0
- package/dist/core/ecs/chunk_columns.d.ts +49 -0
- package/dist/core/ecs/chunk_columns.d.ts.map +1 -0
- package/dist/core/ecs/command_log.d.cts +26 -26
- package/dist/core/ecs/command_log.d.ts +26 -26
- package/dist/core/ecs/command_log.d.ts.map +1 -1
- package/dist/core/ecs/component.d.cts +43 -42
- package/dist/core/ecs/component.d.ts +43 -42
- package/dist/core/ecs/component.d.ts.map +1 -1
- package/dist/core/ecs/component_registry.d.cts +53 -0
- package/dist/core/ecs/component_registry.d.ts +53 -0
- package/dist/core/ecs/component_registry.d.ts.map +1 -0
- package/dist/core/ecs/compute_backend.d.cts +18 -7
- package/dist/core/ecs/compute_backend.d.ts +18 -7
- package/dist/core/ecs/compute_backend.d.ts.map +1 -1
- package/dist/core/ecs/deferred_commands.d.cts +15 -14
- package/dist/core/ecs/deferred_commands.d.ts +15 -14
- package/dist/core/ecs/deferred_commands.d.ts.map +1 -1
- package/dist/core/ecs/dispatch_trace.d.cts +32 -31
- package/dist/core/ecs/dispatch_trace.d.ts +32 -31
- package/dist/core/ecs/dispatch_trace.d.ts.map +1 -1
- package/dist/core/ecs/ecs.d.cts +289 -270
- package/dist/core/ecs/ecs.d.ts +289 -270
- package/dist/core/ecs/ecs.d.ts.map +1 -1
- package/dist/core/ecs/ecs_memory.d.cts +134 -136
- package/dist/core/ecs/ecs_memory.d.ts +134 -136
- package/dist/core/ecs/ecs_memory.d.ts.map +1 -1
- package/dist/core/ecs/ecs_options.d.cts +89 -0
- package/dist/core/ecs/ecs_options.d.ts +89 -0
- package/dist/core/ecs/ecs_options.d.ts.map +1 -0
- package/dist/core/ecs/entity.d.cts +4 -4
- package/dist/core/ecs/entity.d.ts +4 -4
- package/dist/core/ecs/entity_allocator.d.cts +20 -18
- package/dist/core/ecs/entity_allocator.d.ts +20 -18
- package/dist/core/ecs/entity_allocator.d.ts.map +1 -1
- package/dist/core/ecs/event.d.cts +36 -22
- package/dist/core/ecs/event.d.ts +36 -22
- package/dist/core/ecs/event.d.ts.map +1 -1
- package/dist/core/ecs/facades.d.cts +12 -126
- package/dist/core/ecs/facades.d.ts +12 -126
- package/dist/core/ecs/facades.d.ts.map +1 -1
- package/dist/core/ecs/frame_stepper.d.cts +12 -12
- package/dist/core/ecs/frame_stepper.d.ts +12 -12
- package/dist/core/ecs/frame_stepper.d.ts.map +1 -1
- package/dist/core/ecs/frame_trace.d.cts +32 -32
- package/dist/core/ecs/frame_trace.d.ts +32 -32
- package/dist/core/ecs/frame_trace.d.ts.map +1 -1
- package/dist/core/ecs/host_commands.d.cts +103 -85
- package/dist/core/ecs/host_commands.d.ts +103 -85
- package/dist/core/ecs/host_commands.d.ts.map +1 -1
- package/dist/core/ecs/index.d.cts +21 -11
- package/dist/core/ecs/index.d.ts +21 -11
- package/dist/core/ecs/index.d.ts.map +1 -1
- package/dist/core/ecs/observer.d.cts +39 -120
- package/dist/core/ecs/observer.d.ts +39 -120
- package/dist/core/ecs/observer.d.ts.map +1 -1
- package/dist/core/ecs/phase.d.cts +79 -0
- package/dist/core/ecs/phase.d.ts +79 -0
- package/dist/core/ecs/phase.d.ts.map +1 -0
- package/dist/core/ecs/plugin.d.cts +125 -0
- package/dist/core/ecs/plugin.d.ts +125 -0
- package/dist/core/ecs/plugin.d.ts.map +1 -0
- package/dist/core/ecs/plugin_slots.d.cts +26 -0
- package/dist/core/ecs/plugin_slots.d.ts +26 -0
- package/dist/core/ecs/plugin_slots.d.ts.map +1 -0
- package/dist/core/ecs/query.d.cts +208 -578
- package/dist/core/ecs/query.d.ts +208 -578
- package/dist/core/ecs/query.d.ts.map +1 -1
- package/dist/core/ecs/query_cache.d.cts +130 -0
- package/dist/core/ecs/query_cache.d.ts +130 -0
- package/dist/core/ecs/query_cache.d.ts.map +1 -0
- package/dist/core/ecs/query_registry.d.cts +47 -0
- package/dist/core/ecs/query_registry.d.ts +47 -0
- package/dist/core/ecs/query_registry.d.ts.map +1 -0
- package/dist/core/ecs/query_terms.d.cts +126 -0
- package/dist/core/ecs/query_terms.d.ts +126 -0
- package/dist/core/ecs/query_terms.d.ts.map +1 -0
- package/dist/core/ecs/ref.d.cts +100 -39
- package/dist/core/ecs/ref.d.ts +100 -39
- package/dist/core/ecs/ref.d.ts.map +1 -1
- package/dist/core/ecs/relation.d.cts +101 -182
- package/dist/core/ecs/relation.d.ts +101 -182
- package/dist/core/ecs/relation.d.ts.map +1 -1
- package/dist/core/ecs/resource.d.cts +13 -13
- package/dist/core/ecs/resource.d.ts +13 -13
- package/dist/core/ecs/resource_registry.d.cts +5 -5
- package/dist/core/ecs/resource_registry.d.ts +5 -5
- package/dist/core/ecs/resource_registry.d.ts.map +1 -1
- package/dist/core/ecs/row_kinds.d.cts +24 -0
- package/dist/core/ecs/row_kinds.d.ts +24 -0
- package/dist/core/ecs/row_kinds.d.ts.map +1 -0
- package/dist/core/ecs/run_condition.d.cts +23 -23
- package/dist/core/ecs/run_condition.d.ts +23 -23
- package/dist/core/ecs/run_condition.d.ts.map +1 -1
- package/dist/core/ecs/schedule.d.cts +91 -120
- package/dist/core/ecs/schedule.d.ts +91 -120
- package/dist/core/ecs/schedule.d.ts.map +1 -1
- package/dist/core/ecs/schedule_plan.d.cts +33 -0
- package/dist/core/ecs/schedule_plan.d.ts +33 -0
- package/dist/core/ecs/schedule_plan.d.ts.map +1 -0
- package/dist/core/ecs/snapshot.d.cts +77 -0
- package/dist/core/ecs/snapshot.d.ts +77 -0
- package/dist/core/ecs/snapshot.d.ts.map +1 -0
- package/dist/core/ecs/snapshot_mount.d.cts +42 -0
- package/dist/core/ecs/snapshot_mount.d.ts +42 -0
- package/dist/core/ecs/snapshot_mount.d.ts.map +1 -0
- package/dist/core/ecs/sparse_store.d.cts +108 -51
- package/dist/core/ecs/sparse_store.d.ts +108 -51
- package/dist/core/ecs/sparse_store.d.ts.map +1 -1
- package/dist/core/ecs/store.d.cts +527 -473
- package/dist/core/ecs/store.d.ts +527 -473
- package/dist/core/ecs/store.d.ts.map +1 -1
- package/dist/core/ecs/store_layout_listener.d.cts +6 -6
- package/dist/core/ecs/store_layout_listener.d.ts +6 -6
- package/dist/core/ecs/store_types.d.cts +122 -0
- package/dist/core/ecs/store_types.d.ts +122 -0
- package/dist/core/ecs/store_types.d.ts.map +1 -0
- package/dist/core/ecs/system.d.cts +146 -61
- package/dist/core/ecs/system.d.ts +146 -61
- package/dist/core/ecs/system.d.ts.map +1 -1
- package/dist/core/ecs/system_context.d.cts +296 -0
- package/dist/core/ecs/system_context.d.ts +296 -0
- package/dist/core/ecs/system_context.d.ts.map +1 -0
- package/dist/core/ecs/system_set.d.cts +48 -0
- package/dist/core/ecs/system_set.d.ts +48 -0
- package/dist/core/ecs/system_set.d.ts.map +1 -0
- package/dist/core/ecs/utils/arrays.d.cts +15 -1
- package/dist/core/ecs/utils/arrays.d.ts +15 -1
- package/dist/core/ecs/utils/arrays.d.ts.map +1 -1
- package/dist/core/ecs/utils/error.d.cts +82 -6
- package/dist/core/ecs/utils/error.d.ts +82 -6
- package/dist/core/ecs/utils/error.d.ts.map +1 -1
- package/dist/core/ecs/utils/plugin_error.d.cts +10 -0
- package/dist/core/ecs/utils/plugin_error.d.ts +10 -0
- package/dist/core/ecs/utils/plugin_error.d.ts.map +1 -0
- package/dist/core/restore_errors.d.cts +30 -0
- package/dist/core/restore_errors.d.ts +30 -0
- package/dist/core/restore_errors.d.ts.map +1 -0
- package/dist/core/store/action_ring.d.cts +44 -44
- package/dist/core/store/action_ring.d.ts +44 -44
- package/dist/core/store/action_ring.d.ts.map +1 -1
- package/dist/core/store/allocator.d.cts +149 -95
- package/dist/core/store/allocator.d.ts +149 -95
- package/dist/core/store/allocator.d.ts.map +1 -1
- package/dist/core/store/buffer_backed_column.d.cts +17 -17
- package/dist/core/store/buffer_backed_column.d.ts +17 -17
- package/dist/core/store/buffer_backed_column.d.ts.map +1 -1
- package/dist/core/store/column_store.d.cts +124 -86
- package/dist/core/store/column_store.d.ts +124 -86
- package/dist/core/store/column_store.d.ts.map +1 -1
- package/dist/core/store/command_dispatch.d.cts +14 -15
- package/dist/core/store/command_dispatch.d.ts +14 -15
- package/dist/core/store/command_dispatch.d.ts.map +1 -1
- package/dist/core/store/command_ring.d.cts +36 -39
- package/dist/core/store/command_ring.d.ts +36 -39
- package/dist/core/store/command_ring.d.ts.map +1 -1
- package/dist/core/store/descriptor.d.cts +34 -17
- package/dist/core/store/descriptor.d.ts +34 -17
- package/dist/core/store/descriptor.d.ts.map +1 -1
- package/dist/core/store/entity_index.d.cts +34 -35
- package/dist/core/store/entity_index.d.ts +34 -35
- package/dist/core/store/entity_index.d.ts.map +1 -1
- package/dist/core/store/event_ring.d.cts +36 -38
- package/dist/core/store/event_ring.d.ts +36 -38
- package/dist/core/store/event_ring.d.ts.map +1 -1
- package/dist/core/store/extend.d.cts +13 -7
- package/dist/core/store/extend.d.ts +13 -7
- package/dist/core/store/extend.d.ts.map +1 -1
- package/dist/core/store/grow.d.cts +2 -2
- package/dist/core/store/grow.d.ts +2 -2
- package/dist/core/store/grow.d.ts.map +1 -1
- package/dist/core/store/header.d.cts +31 -27
- package/dist/core/store/header.d.ts +31 -27
- package/dist/core/store/header.d.ts.map +1 -1
- package/dist/core/store/index.d.cts +10 -10
- package/dist/core/store/index.d.ts +10 -10
- package/dist/core/store/index.d.ts.map +1 -1
- package/dist/core/store/layout_ops.d.cts +71 -62
- package/dist/core/store/layout_ops.d.ts +71 -62
- package/dist/core/store/layout_ops.d.ts.map +1 -1
- package/dist/core/store/region_table.d.cts +28 -21
- package/dist/core/store/region_table.d.ts +28 -21
- package/dist/core/store/region_table.d.ts.map +1 -1
- package/dist/core/store/snapshot.d.cts +31 -16
- package/dist/core/store/snapshot.d.ts +31 -16
- package/dist/core/store/snapshot.d.ts.map +1 -1
- package/dist/core/store/state_hash.d.cts +12 -12
- package/dist/core/store/state_hash.d.ts +12 -12
- package/dist/core/store/state_hash.d.ts.map +1 -1
- package/dist/core/store/store_regions.d.cts +10 -10
- package/dist/core/store/store_regions.d.ts +10 -10
- package/dist/core/store/store_regions.d.ts.map +1 -1
- package/dist/core/store/vendored_abi/abi.d.cts +27 -2
- package/dist/core/store/vendored_abi/abi.d.ts +27 -2
- package/dist/core/store/vendored_abi/abi.d.ts.map +1 -1
- package/dist/host_commands-B2KMx8O2.cjs +1 -0
- package/dist/host_commands-ClVPvhSa.cjs +2 -0
- package/dist/host_commands-CwxVQS1z.js +1524 -0
- package/dist/host_commands-nJvTy88E.js +1667 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -10
- package/dist/index.d.ts +15 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.development.cjs +1 -1
- package/dist/index.development.js +5804 -5203
- package/dist/index.js +5323 -4764
- package/dist/internal.cjs +2 -2
- package/dist/internal.d.cts +5 -2
- package/dist/internal.d.ts +5 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.development.cjs +1 -1
- package/dist/internal.development.js +70 -20
- package/dist/internal.js +138 -83
- package/dist/plugins/abi-D3V-QUSf.cjs +1 -0
- package/dist/plugins/abi-NP8pNxpd.js +42 -0
- package/dist/plugins/arrays-Dr_1hCjL.js +28 -0
- package/dist/plugins/arrays-Dt-Joc4i.cjs +1 -0
- package/dist/plugins/assertions-gtDVfbnQ.js +6 -0
- package/dist/plugins/assertions-z5GQd_bB.cjs +1 -0
- package/dist/{extensions → plugins}/editor/editor.d.cts +54 -54
- package/dist/{extensions → plugins}/editor/editor.d.ts +54 -54
- package/dist/plugins/editor/editor.d.ts.map +1 -0
- package/dist/{extensions → plugins}/editor/field_handle.d.cts +12 -12
- package/dist/{extensions → plugins}/editor/field_handle.d.ts +12 -12
- package/dist/plugins/editor/field_handle.d.ts.map +1 -0
- package/dist/plugins/editor/index.d.cts +22 -0
- package/dist/plugins/editor/index.d.ts +22 -0
- package/dist/plugins/editor/index.d.ts.map +1 -0
- package/dist/plugins/editor.cjs +1 -0
- package/dist/plugins/editor.d.cts +1 -0
- package/dist/plugins/editor.d.ts +1 -0
- package/dist/plugins/editor.development.cjs +1 -0
- package/dist/{extensions/editor/index.development.js → plugins/editor.development.js} +81 -64
- package/dist/{extensions/editor/index.js → plugins/editor.js} +81 -64
- package/dist/plugins/events/event_channel.d.cts +13 -0
- package/dist/plugins/events/event_channel.d.ts +13 -0
- package/dist/plugins/events/event_channel.d.ts.map +1 -0
- package/dist/plugins/events/event_registry.d.cts +22 -0
- package/dist/plugins/events/event_registry.d.ts +22 -0
- package/dist/plugins/events/event_registry.d.ts.map +1 -0
- package/dist/plugins/events/facade.d.cts +26 -0
- package/dist/plugins/events/facade.d.ts +26 -0
- package/dist/plugins/events/facade.d.ts.map +1 -0
- package/dist/plugins/events/index.d.cts +10 -0
- package/dist/plugins/events/index.d.ts +10 -0
- package/dist/plugins/events/index.d.ts.map +1 -0
- package/dist/plugins/events.cjs +1 -0
- package/dist/plugins/events.d.cts +1 -0
- package/dist/plugins/events.d.ts +1 -0
- package/dist/plugins/events.development.cjs +1 -0
- package/dist/plugins/events.development.js +174 -0
- package/dist/plugins/events.js +159 -0
- package/dist/plugins/observers/index.d.cts +23 -0
- package/dist/plugins/observers/index.d.ts +23 -0
- package/dist/plugins/observers/index.d.ts.map +1 -0
- package/dist/plugins/observers/observer_registry.d.cts +101 -0
- package/dist/plugins/observers/observer_registry.d.ts +101 -0
- package/dist/plugins/observers/observer_registry.d.ts.map +1 -0
- package/dist/plugins/observers.cjs +1 -0
- package/dist/plugins/observers.d.cts +1 -0
- package/dist/plugins/observers.d.ts +1 -0
- package/dist/plugins/observers.development.cjs +1 -0
- package/dist/plugins/observers.development.js +431 -0
- package/dist/plugins/observers.js +403 -0
- package/dist/plugins/relation_store-BsoegrZh.js +313 -0
- package/dist/plugins/relation_store-DQKSnxsm.cjs +1 -0
- package/dist/plugins/relation_store-RBhpcE28.cjs +1 -0
- package/dist/plugins/relation_store-RqW5Snx6.js +328 -0
- package/dist/plugins/relations/builtin_relations.d.cts +48 -0
- package/dist/plugins/relations/builtin_relations.d.ts +48 -0
- package/dist/plugins/relations/builtin_relations.d.ts.map +1 -0
- package/dist/plugins/relations/facade.d.cts +73 -0
- package/dist/plugins/relations/facade.d.ts +73 -0
- package/dist/plugins/relations/facade.d.ts.map +1 -0
- package/dist/plugins/relations/index.d.cts +11 -0
- package/dist/plugins/relations/index.d.ts +11 -0
- package/dist/plugins/relations/index.d.ts.map +1 -0
- package/dist/{core/ecs → plugins/relations}/relation_service.d.cts +85 -97
- package/dist/{core/ecs → plugins/relations}/relation_service.d.ts +85 -97
- package/dist/plugins/relations/relation_service.d.ts.map +1 -0
- package/dist/plugins/relations/relation_store.d.cts +177 -0
- package/dist/plugins/relations/relation_store.d.ts +177 -0
- package/dist/plugins/relations/relation_store.d.ts.map +1 -0
- package/dist/plugins/relations.cjs +1 -0
- package/dist/plugins/relations.d.cts +1 -0
- package/dist/plugins/relations.d.ts +1 -0
- package/dist/plugins/relations.development.cjs +1 -0
- package/dist/plugins/relations.development.js +603 -0
- package/dist/plugins/relations.js +553 -0
- package/dist/plugins/snapshots/index.d.cts +33 -0
- package/dist/plugins/snapshots/index.d.ts +33 -0
- package/dist/plugins/snapshots/index.d.ts.map +1 -0
- package/dist/plugins/snapshots/resume.d.cts +57 -0
- package/dist/plugins/snapshots/resume.d.ts +57 -0
- package/dist/plugins/snapshots/resume.d.ts.map +1 -0
- package/dist/plugins/snapshots/snapshot_service.d.cts +59 -0
- package/dist/plugins/snapshots/snapshot_service.d.ts +59 -0
- package/dist/plugins/snapshots/snapshot_service.d.ts.map +1 -0
- package/dist/plugins/snapshots.cjs +1 -0
- package/dist/plugins/snapshots.d.cts +1 -0
- package/dist/plugins/snapshots.d.ts +1 -0
- package/dist/plugins/snapshots.development.cjs +1 -0
- package/dist/plugins/snapshots.development.js +737 -0
- package/dist/plugins/snapshots.js +737 -0
- package/dist/plugins/solid/index.d.cts +8 -0
- package/dist/plugins/solid/index.d.ts +8 -0
- package/dist/plugins/solid/index.d.ts.map +1 -0
- package/dist/plugins/solid/solid.d.cts +97 -0
- package/dist/plugins/solid/solid.d.ts +97 -0
- package/dist/plugins/solid/solid.d.ts.map +1 -0
- package/dist/plugins/solid.cjs +1 -0
- package/dist/plugins/solid.d.cts +1 -0
- package/dist/plugins/solid.d.ts +1 -0
- package/dist/plugins/solid.development.cjs +1 -0
- package/dist/plugins/solid.development.js +319 -0
- package/dist/plugins/solid.js +319 -0
- package/dist/plugins/workers/index.d.cts +75 -0
- package/dist/plugins/workers/index.d.ts +75 -0
- package/dist/plugins/workers/index.d.ts.map +1 -0
- package/dist/plugins/workers/node_threads.d.cts +25 -0
- package/dist/plugins/workers/node_threads.d.ts +25 -0
- package/dist/plugins/workers/node_threads.d.ts.map +1 -0
- package/dist/plugins/workers/plan.d.cts +61 -0
- package/dist/plugins/workers/plan.d.ts +61 -0
- package/dist/plugins/workers/plan.d.ts.map +1 -0
- package/dist/plugins/workers/pool.d.cts +144 -0
- package/dist/plugins/workers/pool.d.ts +144 -0
- package/dist/plugins/workers/pool.d.ts.map +1 -0
- package/dist/plugins/workers/protocol.d.cts +112 -0
- package/dist/plugins/workers/protocol.d.ts +112 -0
- package/dist/plugins/workers/protocol.d.ts.map +1 -0
- package/dist/plugins/workers/worker_bind.d.cts +64 -0
- package/dist/plugins/workers/worker_bind.d.ts +64 -0
- package/dist/plugins/workers/worker_bind.d.ts.map +1 -0
- package/dist/plugins/workers/worker_loop.d.cts +14 -0
- package/dist/plugins/workers/worker_loop.d.ts +14 -0
- package/dist/plugins/workers/worker_loop.d.ts.map +1 -0
- package/dist/plugins/workers.cjs +1 -0
- package/dist/plugins/workers.d.cts +1 -0
- package/dist/plugins/workers.d.ts +1 -0
- package/dist/plugins/workers.development.cjs +1 -0
- package/dist/plugins/workers.development.js +596 -0
- package/dist/plugins/workers.js +474 -0
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.d.cts +4 -4
- package/dist/primitives.d.ts +4 -4
- package/dist/primitives.development.cjs +1 -1
- package/dist/primitives.development.js +66 -22
- package/dist/primitives.js +66 -22
- package/dist/shared-BKl12xF1.js +132 -0
- package/dist/shared-Dk-pACZT.cjs +1 -0
- package/dist/shared.cjs +1 -1
- package/dist/shared.d.cts +7 -7
- package/dist/shared.d.ts +7 -7
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.development.cjs +1 -1
- package/dist/shared.development.js +4 -3
- package/dist/shared.js +4 -3
- package/dist/topological_sort-Cc_yXqPT.js +346 -0
- package/dist/topological_sort-vp1imU6D.cjs +1 -0
- package/dist/type_primitives/assertions.d.cts +12 -16
- package/dist/type_primitives/assertions.d.ts +12 -16
- package/dist/type_primitives/assertions.d.ts.map +1 -1
- package/dist/type_primitives/binary_heap/binary_heap.d.cts +2 -6
- package/dist/type_primitives/binary_heap/binary_heap.d.ts +2 -6
- package/dist/type_primitives/binary_heap/binary_heap.d.ts.map +1 -1
- package/dist/type_primitives/bitset/bitset.d.cts +7 -11
- package/dist/type_primitives/bitset/bitset.d.ts +7 -11
- package/dist/type_primitives/bitset/bitset.d.ts.map +1 -1
- package/dist/type_primitives/brand.d.cts +2 -7
- package/dist/type_primitives/brand.d.ts +2 -7
- package/dist/type_primitives/brand.d.ts.map +1 -1
- package/dist/type_primitives/error.d.cts +1 -2
- package/dist/type_primitives/error.d.ts +1 -2
- package/dist/type_primitives/error.d.ts.map +1 -1
- package/dist/type_primitives/index.d.cts +1 -1
- package/dist/type_primitives/index.d.ts +1 -1
- package/dist/type_primitives/sparse_map/sparse_map.d.cts +3 -7
- package/dist/type_primitives/sparse_map/sparse_map.d.ts +3 -7
- package/dist/type_primitives/sparse_map/sparse_map.d.ts.map +1 -1
- package/dist/type_primitives/sparse_set/sparse_set.d.cts +2 -6
- package/dist/type_primitives/sparse_set/sparse_set.d.ts +2 -6
- package/dist/type_primitives/sparse_set/sparse_set.d.ts.map +1 -1
- package/dist/type_primitives/topological_sort/topological_sort.d.cts +1 -5
- package/dist/type_primitives/topological_sort/topological_sort.d.ts +1 -5
- package/dist/type_primitives/topological_sort/topological_sort.d.ts.map +1 -1
- package/dist/type_primitives/typed_arrays/typed_arrays.d.cts +16 -15
- package/dist/type_primitives/typed_arrays/typed_arrays.d.ts +16 -15
- package/dist/type_primitives/typed_arrays/typed_arrays.d.ts.map +1 -1
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/version.d.cts +3 -3
- package/dist/version.d.ts +3 -3
- package/dist/worker.cjs +1 -0
- package/dist/worker.d.cts +17 -0
- package/dist/worker.d.ts +17 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.development.cjs +1 -0
- package/dist/worker.development.js +253 -0
- package/dist/worker.js +253 -0
- package/package.json +363 -191
- package/dist/core/ecs/builtin_relations.d.cts +0 -43
- package/dist/core/ecs/builtin_relations.d.ts +0 -43
- package/dist/core/ecs/builtin_relations.d.ts.map +0 -1
- package/dist/core/ecs/event_registry.d.cts +0 -22
- package/dist/core/ecs/event_registry.d.ts +0 -22
- package/dist/core/ecs/event_registry.d.ts.map +0 -1
- package/dist/core/ecs/relation_service.d.ts.map +0 -1
- package/dist/core/ecs/resume.d.cts +0 -85
- package/dist/core/ecs/resume.d.ts +0 -85
- package/dist/core/ecs/resume.d.ts.map +0 -1
- package/dist/core/ecs/snapshot_service.d.cts +0 -94
- package/dist/core/ecs/snapshot_service.d.ts +0 -94
- package/dist/core/ecs/snapshot_service.d.ts.map +0 -1
- package/dist/extensions/editor/editor.d.ts.map +0 -1
- package/dist/extensions/editor/field_handle.d.ts.map +0 -1
- package/dist/extensions/editor/index.cjs +0 -1
- package/dist/extensions/editor/index.d.cts +0 -21
- package/dist/extensions/editor/index.d.ts +0 -21
- package/dist/extensions/editor/index.d.ts.map +0 -1
- package/dist/extensions/editor/index.development.cjs +0 -1
- package/dist/extensions/reactive/ecs_sync.d.cts +0 -214
- package/dist/extensions/reactive/ecs_sync.d.ts +0 -214
- package/dist/extensions/reactive/ecs_sync.d.ts.map +0 -1
- package/dist/extensions/reactive/index.cjs +0 -1
- package/dist/extensions/reactive/index.d.cts +0 -23
- package/dist/extensions/reactive/index.d.ts +0 -23
- package/dist/extensions/reactive/index.d.ts.map +0 -1
- package/dist/extensions/reactive/index.development.cjs +0 -1
- package/dist/extensions/reactive/index.development.js +0 -215
- package/dist/extensions/reactive/index.js +0 -215
- package/dist/extensions/solid/index.cjs +0 -1
- package/dist/extensions/solid/index.d.cts +0 -6
- package/dist/extensions/solid/index.d.ts +0 -6
- package/dist/extensions/solid/index.d.ts.map +0 -1
- package/dist/extensions/solid/index.development.cjs +0 -1
- package/dist/extensions/solid/index.development.js +0 -40
- package/dist/extensions/solid/index.js +0 -36
- package/dist/extensions/solid/kernel_solid.d.cts +0 -45
- package/dist/extensions/solid/kernel_solid.d.ts +0 -45
- package/dist/extensions/solid/kernel_solid.d.ts.map +0 -1
- package/dist/host_commands-BlR3oZ3x.js +0 -2406
- package/dist/host_commands-C2cpU3yC.cjs +0 -1
- package/dist/internal-BoxWl4dG.js +0 -2565
- package/dist/internal-CGBEwfeB.cjs +0 -2
- package/dist/interop-CT-REx0W.cjs +0 -1
- package/dist/interop-CcY6ASQc.js +0 -18
- package/dist/interop-DqxleBo7.js +0 -18
- package/dist/interop-T1HZ-Dpa.cjs +0 -1
- package/dist/kernel-Cz2Kxlwl.js +0 -240
- package/dist/kernel-DgyrLFjW.js +0 -227
- package/dist/kernel-sw7ScKWu.cjs +0 -1
- package/dist/kernel-yWV3XnAb.cjs +0 -1
- package/dist/reactive/array.d.cts +0 -24
- package/dist/reactive/array.d.ts +0 -24
- package/dist/reactive/array.d.ts.map +0 -1
- package/dist/reactive/index.cjs +0 -1
- package/dist/reactive/index.d.cts +0 -11
- package/dist/reactive/index.d.ts +0 -11
- package/dist/reactive/index.d.ts.map +0 -1
- package/dist/reactive/index.development.cjs +0 -1
- package/dist/reactive/index.development.js +0 -18
- package/dist/reactive/index.js +0 -18
- package/dist/reactive/interop.d.cts +0 -19
- package/dist/reactive/interop.d.ts +0 -19
- package/dist/reactive/interop.d.ts.map +0 -1
- package/dist/reactive/kernel.d.cts +0 -73
- package/dist/reactive/kernel.d.ts +0 -73
- package/dist/reactive/kernel.d.ts.map +0 -1
- package/dist/reactive/map.d.cts +0 -16
- package/dist/reactive/map.d.ts +0 -16
- package/dist/reactive/map.d.ts.map +0 -1
- package/dist/reactive/shallow.d.cts +0 -11
- package/dist/reactive/shallow.d.ts +0 -11
- package/dist/reactive/shallow.d.ts.map +0 -1
- package/dist/reactive/struct.d.cts +0 -10
- package/dist/reactive/struct.d.ts +0 -10
- package/dist/reactive/struct.d.ts.map +0 -1
- package/dist/shallow-Bs39EPh1.js +0 -150
- package/dist/shallow-C5YmTbtb.cjs +0 -1
- package/dist/shallow-CiFC70Dz.js +0 -159
- package/dist/shallow-DQ8aG51_.cjs +0 -1
- package/dist/shared-B4v0L1cw.js +0 -109
- package/dist/shared-DU78k0pU.cjs +0 -1
- package/dist/topological_sort-BDvEyb9W.cjs +0 -1
- package/dist/topological_sort-DK6EjpWa.js +0 -135
- package/dist/typed_arrays-D3NmwtCG.cjs +0 -1
- package/dist/typed_arrays-DIVwVy5_.js +0 -258
package/README.md
CHANGED
|
@@ -5,43 +5,45 @@
|
|
|
5
5
|
`@oasys/oecs` gives you more than storage and queries. It gives you the tools that a mature engine
|
|
6
6
|
has:
|
|
7
7
|
|
|
8
|
-
- observers
|
|
9
|
-
- relations with wildcards
|
|
10
|
-
- sparse storage
|
|
11
|
-
- system sets and run conditions
|
|
12
|
-
- enable and disable for an entity
|
|
13
|
-
- templates
|
|
14
|
-
- deterministic hashing, with snapshot and restore
|
|
15
|
-
- a typed write path from the host into the ECS
|
|
16
|
-
-
|
|
8
|
+
- observers
|
|
9
|
+
- relations with wildcards
|
|
10
|
+
- sparse storage
|
|
11
|
+
- system sets and run conditions
|
|
12
|
+
- enable and disable for an entity
|
|
13
|
+
- templates
|
|
14
|
+
- deterministic hashing, with snapshot and restore
|
|
15
|
+
- a typed write path from the host into the ECS
|
|
16
|
+
- one system across a pool of workers, with a WASM or a JavaScript kernel
|
|
17
|
+
- an optional Solid plugin, for a UI
|
|
17
18
|
|
|
18
19
|
The package is **pure TypeScript, and it has no dependencies by default**. It runs over one plain
|
|
19
20
|
`ArrayBuffer`. So it does not need a `SharedArrayBuffer`, and it does not need cross-origin
|
|
20
|
-
isolation (COOP
|
|
21
|
+
isolation (COOP and COEP). An optional shared-memory profile uses a `SharedArrayBuffer` instead. Use
|
|
21
22
|
that profile for worker offload, or for a WASM compute backend. The two profiles use one core, and
|
|
22
23
|
they agree byte-for-byte on `stateHash`.
|
|
23
24
|
|
|
24
|
-
- **Data-oriented
|
|
25
|
+
- **Data-oriented**. Columns use struct-of-arrays storage, grouped by archetype. Iteration is a
|
|
25
26
|
small loop over typed arrays. The loop allocates no object for each entity.
|
|
26
|
-
- **Type-safe
|
|
27
|
+
- **Type-safe**. A component handle is a callable definition. It has a stable numeric id at run
|
|
27
28
|
time and a full schema type at compile time. A field name with a spelling error is a compile
|
|
28
29
|
error.
|
|
29
|
-
- **Deterministic
|
|
30
|
+
- **Deterministic**. An optional mode gives you a `stateHash` that is independent of the storage
|
|
30
31
|
type. It also gives you snapshot, restore, and replay of a command log.
|
|
31
|
-
- **Complete
|
|
32
|
+
- **Complete**. The features below are the full engine. They are not only a start.
|
|
32
33
|
|
|
33
34
|
## Installation
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
|
-
pnpm add @oasys/oecs # npm
|
|
37
|
+
pnpm add @oasys/oecs # npm, pnpm or yarn
|
|
37
38
|
# or
|
|
38
39
|
deno add jsr:@oasys/oecs # JSR (Deno)
|
|
39
40
|
# or
|
|
40
41
|
npx jsr add @oasys/oecs # JSR (npm-compatible)
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
Supported runtimes
|
|
44
|
-
later,
|
|
44
|
+
Supported runtimes are Node 20 or later and Deno 1.38 or later. In a browser, use Chrome 111 or
|
|
45
|
+
later, Firefox 128 or later, or Safari 16.4 or later. The default heap profile uses a plain, fixed
|
|
46
|
+
`ArrayBuffer`. The
|
|
45
47
|
optional shared and WASM profiles need a growable `SharedArrayBuffer` or `WebAssembly.Memory`, and
|
|
46
48
|
those requirements set the version limits.
|
|
47
49
|
|
|
@@ -50,9 +52,9 @@ those requirements set the version limits.
|
|
|
50
52
|
```ts
|
|
51
53
|
import { ECS, SCHEDULE } from "@oasys/oecs";
|
|
52
54
|
|
|
53
|
-
const ecs = new ECS(); // pure-TS heap profile
|
|
55
|
+
const ecs = new ECS(); // the pure-TS heap profile, and no SharedArrayBuffer needed
|
|
54
56
|
|
|
55
|
-
// Components
|
|
57
|
+
// Components. The record syntax gives a type to each field. The array shorthand uses "f64".
|
|
56
58
|
const Pos = ecs.registerComponent({ x: "f64", y: "f64" });
|
|
57
59
|
const Vel = ecs.registerComponent(["vx", "vy"] as const);
|
|
58
60
|
|
|
@@ -64,8 +66,8 @@ const move = ecs.registerSystem({
|
|
|
64
66
|
reads: [Vel],
|
|
65
67
|
writes: [Pos], // a declared write also gives read access to the same component
|
|
66
68
|
fn: (ctx, dt) => {
|
|
67
|
-
movers.
|
|
68
|
-
const { x, y } = cols.mut(Pos); // the full group
|
|
69
|
+
movers.forEachChunk((cols, count) => {
|
|
70
|
+
const { x, y } = cols.mut(Pos); // the full group. Sets the change tick of Pos one time
|
|
69
71
|
const { vx, vy } = cols.read(Vel); // a read-only group
|
|
70
72
|
for (let i = 0; i < count; i++) {
|
|
71
73
|
x[i] += vx[i] * dt;
|
|
@@ -93,82 +95,104 @@ ecs.getField(e, Pos, "x"); // about 1.667
|
|
|
93
95
|
- **Archetype storage in struct-of-arrays form**, above a storage-neutral `ColumnStore`. Entities
|
|
94
96
|
with the same set of components share adjacent typed-array columns. Loops use the cache well, and
|
|
95
97
|
they allocate no object for each entity.
|
|
96
|
-
- **Components with phantom types
|
|
98
|
+
- **Components with phantom types**. `registerComponent({ x: "f64", y: "f64" })` gives you a
|
|
97
99
|
callable `ComponentDef`. The definition has a stable numeric `.id` at run time and a full schema
|
|
98
100
|
type at compile time. Use the record syntax for different types in each field. Use the array
|
|
99
101
|
shorthand when all fields are `f64`. Use `registerTag()` for markers that hold no data. The field
|
|
100
102
|
types are `f32 f64 i8 i16 i32 u8 u16 u32`.
|
|
101
|
-
- **Two storage profiles, one core
|
|
102
|
-
`SharedArrayBuffer` for workers or WASM is optional. The code path is the same, the
|
|
103
|
-
is the same
|
|
104
|
-
capacity).
|
|
103
|
+
- **Two storage profiles, one core**. The default is a pure-TS heap (`ArrayBuffer`). A
|
|
104
|
+
`SharedArrayBuffer` for workers or WASM is optional. The code path is the same, and the
|
|
105
|
+
`stateHash` is the same. One `memory` option sets the size (a number of entities, a byte limit,
|
|
106
|
+
or a fixed capacity). Size and storage are separate fields, so any pair of them is legal. The shared
|
|
107
|
+
allocators are `growableSabAllocator`, `fixedSabAllocator` and `wasmMemoryAllocator`, from
|
|
108
|
+
`@oasys/oecs/shared`. `fixedSabAllocator(maxBytes)` reserves one buffer that never grows, and it
|
|
109
|
+
keeps the fast write path on JavaScriptCore. A custom allocator implements `InPlaceBufferAllocator`,
|
|
110
|
+
a type export of the root and of `@oasys/oecs/shared`.
|
|
105
111
|
|
|
106
112
|
**Queries**
|
|
107
113
|
|
|
108
|
-
- **Live, cached queries
|
|
109
|
-
`.
|
|
110
|
-
- **
|
|
111
|
-
`
|
|
114
|
+
- **Live, cached queries**. Write `ecs.query(Pos, Vel)`, then make it more exact with `.and()`,
|
|
115
|
+
`.not()`, or `.or()`. The store adds new matching archetypes to the query automatically.
|
|
116
|
+
- **A nested expression**. `q.where(or(and(Pos, Vel), Frozen))` says what no chain says. The free
|
|
117
|
+
`and`, `or` and `not` build it. Each operand is an `ArchetypeExpr`, a definition or a term. A
|
|
118
|
+
plugin supplies its own `ArchetypeTerm` on the same footing.
|
|
119
|
+
- **Two iteration verbs**. Use `forEach(arch => …)` to read archetypes. Use
|
|
120
|
+
`forEachChunk((cols, count) => …)` for the high-frequency loop that writes. In that loop, `cols.mut`
|
|
112
121
|
and `cols.read` give you all the columns of one component at the same time.
|
|
113
|
-
- **Change detection
|
|
122
|
+
- **Change detection**. Each `(archetype, component)` pair has a change tick.
|
|
114
123
|
`query.changed(Pos)` visits only the archetypes that changed at or after the threshold tick of
|
|
115
124
|
the system.
|
|
116
|
-
- **Queries for relations and hierarchies
|
|
125
|
+
- **Queries for relations and hierarchies**. Use the wildcards `(R, *)` and `(*, T)`, plus
|
|
117
126
|
`forEachRelatedTo` and `query.hierarchy(rel, depth)`. For **sparse queries**, use
|
|
118
|
-
`query.
|
|
127
|
+
`query.andSparse(...)`. Queries skip disabled entities. To include them, use
|
|
119
128
|
`query.includeDisabled()`.
|
|
120
129
|
|
|
121
130
|
**Systems and the schedule**
|
|
122
131
|
|
|
123
|
-
- **Systems that declare their access
|
|
132
|
+
- **Systems that declare their access**. A system is a plain function in a `SystemConfig` that
|
|
124
133
|
declares `reads` and `writes`. A development-mode access checker holds you to that declaration,
|
|
125
134
|
and the build tool removes that checker from a production build. There are also `(ctx, dt)` and
|
|
126
135
|
`(q, ctx, dt)`
|
|
127
136
|
forms with a query builder, for connection code that touches no data. The lifecycle hooks are
|
|
128
137
|
`onAdded`, `onRemoved`, and `dispose`. Set `exclusive: true` for full-world setup or teardown.
|
|
129
|
-
- **A topological scheduler
|
|
130
|
-
`FIXED_UPDATE`, `PRE_UPDATE`, `UPDATE`, and `POST_UPDATE`. Each phase does a Kahn
|
|
131
|
-
`before` and `after` constraints. Insertion order breaks a tie, which keeps the result
|
|
138
|
+
- **A topological scheduler**. There are seven built-in phases: `PRE_STARTUP`, `STARTUP`,
|
|
139
|
+
`POST_STARTUP`, `FIXED_UPDATE`, `PRE_UPDATE`, `UPDATE`, and `POST_UPDATE`. Each phase does a Kahn
|
|
140
|
+
sort on the `before` and `after` constraints. Insertion order breaks a tie, which keeps the result
|
|
132
141
|
deterministic. Cycle detection is always active.
|
|
133
|
-
- **
|
|
142
|
+
- **An open phase set**. `ecs.addPhase(name, { loop, before, after })` adds one more slot to a loop
|
|
143
|
+
and gives back a `Phase` handle. A plugin owns its own slot that way. `PhaseConfig` is the config.
|
|
144
|
+
`PhaseLoop` is one of `"startup"`, `"fixed"` and `"update"`. `SchedulePhase` is either
|
|
145
|
+
spelling: a `SCHEDULE` member or a handle. `addSystems` takes either. The engine sorts each loop's
|
|
146
|
+
phases the same way, and it throws `UNKNOWN_PHASE` or `CIRCULAR_PHASE_DEPENDENCY` on a mistake. A
|
|
147
|
+
frame trace event carries a `PhaseName`.
|
|
148
|
+
- **A fixed timestep**. An accumulator loop uses the `fixedTimestep` value that you set. A limit
|
|
134
149
|
protects against the spiral of death.
|
|
135
|
-
- **System sets and run conditions
|
|
150
|
+
- **System sets and run conditions**. Use `systemSet(...)` with `configureSet(...)`. The supplied
|
|
136
151
|
conditions are `runIfResourceEq`, `runEveryNTicks`, and `runIfAnyMatch`. You can also write your
|
|
137
152
|
own `RunCondition`.
|
|
138
153
|
|
|
139
154
|
**Structural changes**
|
|
140
155
|
|
|
141
|
-
- **Deferred in a system, immediate on the host
|
|
156
|
+
- **Deferred in a system, immediate on the host**. `ctx.commands` is a facade in the style of the
|
|
142
157
|
Bevy `Commands` type. It holds add, remove, despawn, enable, and disable operations until the
|
|
143
|
-
flush at the end of the phase
|
|
158
|
+
flush at the end of the phase. The flush keeps iterators correct. `commands.spawn` gives you the id
|
|
144
159
|
immediately, but it attaches the components later. Each mutation on the host
|
|
145
160
|
(`ecs.addComponent`, `ecs.removeComponent`, `ecs.despawn`, `ecs.disable`, and `ecs.enable`)
|
|
146
161
|
applies immediately.
|
|
147
|
-
- **Enable and disable for an entity
|
|
162
|
+
- **Enable and disable for an entity**. Use `disable`, `enable`, and `isDisabled`. Disabled rows
|
|
148
163
|
stay in a partition at the end of the archetype, and queries skip them by default.
|
|
149
|
-
- **Templates and bundles
|
|
164
|
+
- **Templates and bundles**. `ecs.template(Pos({ x, y }), …)` makes a blueprint. `spawn` and
|
|
150
165
|
`spawnMany` use that blueprint to create entities with no archetype transition. The same callable
|
|
151
166
|
bundles are the arguments to `spawnBundle(...)` and `addComponents(...)`.
|
|
152
167
|
|
|
153
168
|
**Reactions and relationships**
|
|
154
169
|
|
|
155
|
-
- **Observers**
|
|
156
|
-
`onDisable` callbacks, for a structure or for one entity.
|
|
157
|
-
|
|
170
|
+
- **Observers** (the `observers()` plugin). `ecs.observe(...)` registers `onAdd`, `onRemove`,
|
|
171
|
+
`onSet`, `onEnable`, and `onDisable` callbacks, for a structure or for one entity. A sparse
|
|
172
|
+
component takes the entity-level `onSet`.
|
|
173
|
+
- **Change detection at the row grain**. `ecs.trackRows(def)` keeps a change tick for each row.
|
|
174
|
+
A chunk loop records a row with one store into `cols.ticks(def)`. A reader compares
|
|
175
|
+
`cols.ticksRead(def)` with `cols.since` inside `changed(def).forEachChunk`.
|
|
176
|
+
`ctx.sparseChanged(def, e)` asks the same of a sparse component.
|
|
177
|
+
- **Relations** (the `relations()` plugin). A relation is a `(relation, target)` pair. The
|
|
178
|
+
presets are `ChildOf` and `IsA`.
|
|
158
179
|
A relation is exclusive or multi. Queries go in both directions (`targetOf`, `sourcesOf`,
|
|
159
180
|
`ancestorsOf`, `rootOf`, and `cascadeOf`). The cleanup policy for a deleted target is
|
|
160
181
|
`delete`, `clear`, or `orphan`. Relations use sparse storage. So they cause no archetype
|
|
161
182
|
transition, and they use no identity bit.
|
|
162
|
-
- **Sparse storage
|
|
163
|
-
`removeSparse`.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
183
|
+
- **Sparse storage**. Use `registerSparseComponent` and `registerSparseTag`, then `addSparse` and
|
|
184
|
+
`removeSparse`. A sparse component keeps its data in columns indexed by entity, so a read by id
|
|
185
|
+
is one load. `sparseCursor(def)` with `sparseCursorRead(def)` is the fastest read by id that the
|
|
186
|
+
engine has. Sparse storage is correct for data that a system reads by id, that changes
|
|
187
|
+
frequently, or that is rare. It causes no archetype transition.
|
|
188
|
+
- **Resources**. A resource is a typed global value, keyed with `resourceKey<T>`. It needs no
|
|
189
|
+
plugin. **Events** (the `events()` plugin) are send-and-forget channels in
|
|
190
|
+
struct-of-arrays form, keyed with `eventKey<F>` or `signalKey`. The ECS clears the events at the
|
|
191
|
+
end of each `update`.
|
|
192
|
+
- **Cached refs**. `ctx.ref(def, e)` gives you a writable ref, and it sets the change tick.
|
|
169
193
|
`ctx.refRead(def, e)` gives you a read-only ref. A ref finds the archetype, the row, and the
|
|
170
194
|
columns one time. Then you can write `pos.x += vel.vx * dt`.
|
|
171
|
-
- **Cursors
|
|
195
|
+
- **Cursors**. `ctx.cursor(def)` gives you an accessor that you can use again for a different
|
|
172
196
|
entity. `ctx.cursorRead(def)` gives you the read-only form. The same two functions are on `ecs`.
|
|
173
197
|
You make a cursor one time. Then each `at(entity)` call moves it to a different entity. Use a
|
|
174
198
|
cursor when you read or write many entities from a list of ids. The loop then makes no ref for
|
|
@@ -178,32 +202,56 @@ ecs.getField(e, Pos, "x"); // about 1.667
|
|
|
178
202
|
|
|
179
203
|
**Determinism, storage of state, and integration**
|
|
180
204
|
|
|
181
|
-
- **Determinism** (optional)
|
|
182
|
-
`
|
|
183
|
-
|
|
205
|
+
- **Determinism** (optional). Construct the ECS with
|
|
206
|
+
`ECS.create({ deterministic: true, plugins: [snapshots()] })`. Then use
|
|
207
|
+
`ecs.snapshots.stateHash()`. It gives a 32-bit digest in FNV-1a style. The digest covers the live
|
|
208
|
+
dense bytes, the sparse stores, and the target sets of multi relations. The hash is independent of
|
|
209
|
+
the storage type. A heap ECS and a shared ECS with the same history give the same hash.
|
|
184
210
|
`ecs.snapshots.capture()`, `ecs.snapshots.restore(...)`, and the equivalent functions for sparse
|
|
185
|
-
data
|
|
186
|
-
|
|
187
|
-
|
|
211
|
+
data need the `snapshots()` plugin beside the flag. A restore that does not match the world throws
|
|
212
|
+
`ECSRestoreError`. That is an `ECSError` with the code `SNAPSHOT_RESTORE_FAILED`. The restore
|
|
213
|
+
leaves the world unchanged.
|
|
214
|
+
- **A write path from the host into the ECS**. `installHostCommandSeam(ecs)` applies typed
|
|
188
215
|
`HostCommand` values from outside the schedule, through one approved `exclusive` system. It
|
|
189
216
|
supports record and replay (`HostCommandRecorder` and `replayCommandLog`), and a ring transport
|
|
190
217
|
between threads.
|
|
191
|
-
- **A
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
- **An editor layer
|
|
218
|
+
- **A UI connection** (optional). A Solid app installs the `solid()` plugin from
|
|
219
|
+
`@oasys/oecs/solid`. It projects ECS state into Solid signals, straight off the change feed, and
|
|
220
|
+
a row is one signal. It is the one path into a UI, and this release ships no other framework
|
|
221
|
+
path.
|
|
222
|
+
- **An editor layer**. It adds undo, redo, and field handles above the host write path
|
|
196
223
|
(`@oasys/oecs/editor`).
|
|
197
|
-
- **Frame traces
|
|
224
|
+
- **Frame traces**. `ecs.setTrace(sink)` with `FrameTraceRecorder` gives you a structured stream
|
|
198
225
|
of the events in each frame. It is available in development builds only.
|
|
199
|
-
- **A compute backend connection
|
|
200
|
-
compiled backend, such as WASM, instead of its TypeScript closure.
|
|
226
|
+
- **A compute backend connection**. `ecs.attachBackend(...)` runs the body of a system on a
|
|
227
|
+
compiled backend, such as WASM, instead of its TypeScript closure. A backend body receives the
|
|
228
|
+
phase `dt` and the frame tick, because neither is in the store bytes.
|
|
229
|
+
- **Parallel systems** (the `workers()` plugin). `world.workers.attach({ count })` starts a pool of
|
|
230
|
+
workers on the package's own entry, `@oasys/oecs/worker`. A bundled app passes `workerUrl` instead, because a bundler
|
|
231
|
+
leaves that entry out of its graph. A system that carries a `parallel` config names a kernel a worker
|
|
232
|
+
can load. The kernel is a compiled `WebAssembly.Module` export, or an export of a JavaScript
|
|
233
|
+
module URL. The config also names the columns the kernel receives, in order. The schedule hands
|
|
234
|
+
the pass to the pool, parks the host, and joins before the phase flush. So no structural change
|
|
235
|
+
can overlap the workers. Every
|
|
236
|
+
worker computes its own row range, so the result is deterministic. Below `parallel.minRows`, and
|
|
237
|
+
with no pool, the system runs its own `fn`. In a browser the world lives inside a worker, because
|
|
238
|
+
a main thread cannot park. Blink, Gecko and WebKit all run the pool from there. A `wasm` kernel
|
|
239
|
+
follows a module contract that holds for any toolchain. The contract asks for one memory import
|
|
240
|
+
and one exported function. It also asks for an exported `__stack_pointer` when the body uses a
|
|
241
|
+
stack. Every worker instantiates the module over one memory. So the pool gives each instance its
|
|
242
|
+
own shadow stack, and `stackBytes` says how big one is. `joinTimeoutMs` bounds the wait for a
|
|
243
|
+
join. The suite runs kernels built by Zig, Rust, C and AssemblyScript beside one emitted with no
|
|
244
|
+
toolchain.
|
|
245
|
+
- **A store that starts anywhere in its memory**. `memory.storeBase` places the header at a byte
|
|
246
|
+
offset you choose, and the store writes nothing below it. `storeBaseAbove(exports, extraBytes)`
|
|
247
|
+
reads that offset from a module's `__heap_base`, so a WASM-backed world never lands on the
|
|
248
|
+
addresses the module owns.
|
|
201
249
|
|
|
202
250
|
**Reference**
|
|
203
251
|
|
|
204
|
-
- **Typed errors
|
|
252
|
+
- **Typed errors**. There is an `ECSError` taxonomy with a `category` enum and an `isEcsError`
|
|
205
253
|
guard. The package exports all of them.
|
|
206
|
-
- **Primitives that you can use again** (`@oasys/oecs/primitives`)
|
|
254
|
+
- **Primitives that you can use again** (`@oasys/oecs/primitives`). `BitSet`, `SparseSet`,
|
|
207
255
|
`SparseMap`, `GrowableTypedArray`, `BinaryHeap`, and `topologicalSort` also operate alone.
|
|
208
256
|
|
|
209
257
|
## Entry points
|
|
@@ -211,34 +259,82 @@ ecs.getField(e, Pos, "x"); // about 1.667
|
|
|
211
259
|
The core is `@oasys/oecs`. Each other entry point is optional, and it costs nothing until you
|
|
212
260
|
import it.
|
|
213
261
|
|
|
262
|
+
Six subsystems are **plugins**: relations, events, snapshots, observers, workers and solid. A world
|
|
263
|
+
installs the ones it uses, and carries no code for the rest.
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
import { ECS } from "@oasys/oecs";
|
|
267
|
+
import { relations } from "@oasys/oecs/relations";
|
|
268
|
+
import { observers } from "@oasys/oecs/observers";
|
|
269
|
+
|
|
270
|
+
const world = ECS.create({ plugins: [relations(), observers()] });
|
|
271
|
+
world.relations.register(); // ok
|
|
272
|
+
world.events.emit(Damaged, { amount: 1 }); // compile error, events is not installed
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
`ECS.create` returns the world intersected with the facades its plugins contribute. Thus reaching
|
|
276
|
+
for a plugin you did not install is a compile error, and not a fault at run time. `new ECS()`
|
|
277
|
+
still builds a world, and that world holds none of them. A bundler cannot remove a class method. So
|
|
278
|
+
these live behind an import you make, and not behind a member you always carry.
|
|
279
|
+
|
|
280
|
+
To write a plugin of your own, import the types `Plugin`, `PluginHost` and `PluginsOf`
|
|
281
|
+
from `@oasys/oecs`. `Plugin<X>` is what a factory such as `relations()` returns, and what a
|
|
282
|
+
plugin list holds. Its `install` takes a `PluginHost` and returns `X`, the surface the world
|
|
283
|
+
gains. `PluginsOf` is the surface a plugin list adds to the world. `ChangeFeed` is the store's
|
|
284
|
+
record of what changed, and `ObservationFlags`, `DrainResult` and `StructuralObserverEvents` are
|
|
285
|
+
what crosses it.
|
|
286
|
+
|
|
287
|
+
`PluginHost` carries nine members, and every one is open to any plugin. `store`, `world`,
|
|
288
|
+
`changes`, `context` and `memory` are the state a plugin reads. `onSettle`, `onPrewarm`,
|
|
289
|
+
`onDispose` and `installRoute` are the four hook points. Each is named for what it hooks, and never
|
|
290
|
+
for the plugin that ships it. A plugin that wants a slot of its own in the frame adds a phase with
|
|
291
|
+
`host.world.addPhase`. A plugin that runs a system body itself takes `installRoute`, and gives back
|
|
292
|
+
a `SystemRoutePlanner`. It holds the `RouteControl` that comes back, and hands the schedule a
|
|
293
|
+
`RouteDispatch`. `PluginMemory` is `host.memory`, which names the backing, its source and the store
|
|
294
|
+
base.
|
|
295
|
+
|
|
296
|
+
The [plugins](./docs/api/plugins.md) page documents every host member and the route seam. It also
|
|
297
|
+
documents the rules `ECS.create` checks, and the change feed a plugin drains. It is the one full
|
|
298
|
+
text. The API index
|
|
299
|
+
and the migration guide point at it.
|
|
300
|
+
|
|
214
301
|
| Import | What it is |
|
|
215
302
|
| --- | --- |
|
|
216
|
-
| `@oasys/oecs` | the ECS
|
|
217
|
-
| `@oasys/oecs/dev` | the same ECS with the development guards
|
|
218
|
-
| `@oasys/oecs/shared` | the optional `SharedArrayBuffer` allocators, for worker offload or a WASM backend (this needs COOP
|
|
219
|
-
| `@oasys/oecs/
|
|
220
|
-
| `@oasys/oecs/
|
|
303
|
+
| `@oasys/oecs` | the ECS, the pure-TS heap profile by default (a production build, with the development guards removed) |
|
|
304
|
+
| `@oasys/oecs/dev` | the same ECS with the development guards on, on npm alone. Import this to get the guards directly. See [Development and production](#dev-vs-prod) |
|
|
305
|
+
| `@oasys/oecs/shared` | the optional `SharedArrayBuffer` allocators, `growableSabAllocator`, `fixedSabAllocator` and `wasmMemoryAllocator`, for worker offload or a WASM backend (this needs COOP and COEP) |
|
|
306
|
+
| `@oasys/oecs/relations` | the relations plugin, `(relation, target)` pairs, wildcards and hierarchy traversal |
|
|
307
|
+
| `@oasys/oecs/events` | the events plugin, host-side channels and signals, and `ctx.emit` |
|
|
308
|
+
| `@oasys/oecs/snapshots` | the snapshots plugin, `capture` and `restore` for a live world |
|
|
309
|
+
| `@oasys/oecs/observers` | the observers plugin, `ecs.observe` for `onAdd`, `onRemove` and `onSet` |
|
|
310
|
+
| `@oasys/oecs/workers` | the workers plugin, `ecs.workers`, one pool of workers for the `parallel` systems |
|
|
221
311
|
| `@oasys/oecs/editor` | undo, redo, and field handles above the host write path |
|
|
222
|
-
| `@oasys/oecs/solid` | the
|
|
312
|
+
| `@oasys/oecs/solid` | the solid plugin, `solid()`, ECS state into Solid signals off the change feed (`solid-js` is an **optional** peer dependency) |
|
|
313
|
+
| `@oasys/oecs/worker` | the engine's worker entry, which `world.workers.attach` starts. A bundled app imports it for its URL alone, and passes that as `workerUrl`. `@oasys/oecs/worker/dev` is the guarded build on npm |
|
|
223
314
|
| `@oasys/oecs/primitives` | the data structures that oecs is built from, which also operate alone |
|
|
224
|
-
| `@oasys/oecs/internal` | unstable internal parts (codecs, ABI constants, the access checker)
|
|
315
|
+
| `@oasys/oecs/internal` | unstable internal parts (codecs, ABI constants, the access checker). There are no semver guarantees |
|
|
225
316
|
|
|
226
317
|
<a id="dev-vs-prod"></a>
|
|
227
318
|
|
|
228
319
|
## Development and production
|
|
229
320
|
|
|
230
321
|
A compile-time flag, `__DEV__`, controls each run-time check. The checks include bounds and
|
|
231
|
-
liveness checks
|
|
232
|
-
the system access checker for `reads` and `writes`. The build tool
|
|
233
|
-
production build**. So, when the documentation says that an operation
|
|
234
|
-
that behavior is a development aid. It is not a production guarantee. Two
|
|
235
|
-
each build
|
|
236
|
-
timestep, the memory options, and the cardinality of a relation).
|
|
322
|
+
liveness checks. They also include detection of a system that you added two times. They include
|
|
323
|
+
validation at registration, and the system access checker for `reads` and `writes`. The build tool
|
|
324
|
+
**removes these checks from a production build**. So, when the documentation says that an operation
|
|
325
|
+
"throws in development", that behavior is a development aid. It is not a production guarantee. Two
|
|
326
|
+
checks stay active in each build. One is cycle detection in the scheduler. The other is validation
|
|
327
|
+
of the constructor options (the timestep, the memory options, and the cardinality of a relation).
|
|
237
328
|
|
|
238
329
|
**Production is the default on both channels. You must turn the guards on.** On **npm**,
|
|
239
330
|
`@oasys/oecs` is the production build, with the guards removed. A bundler in development mode
|
|
240
331
|
(`vite dev` or `webpack --mode development`) selects the build with the guards automatically,
|
|
241
332
|
through the `development` export condition. As an alternative, import `@oasys/oecs/dev` directly.
|
|
333
|
+
Each optional entry point has the same subpath: `@oasys/oecs/relations/dev`,
|
|
334
|
+
`@oasys/oecs/events/dev`, `@oasys/oecs/snapshots/dev`, `@oasys/oecs/observers/dev`, `@oasys/oecs/workers/dev`,
|
|
335
|
+
`@oasys/oecs/editor/dev` and `@oasys/oecs/solid/dev`. Take the
|
|
336
|
+
plugin from the same channel as the world. A plugin binds to the core build it was made
|
|
337
|
+
against.
|
|
242
338
|
On **JSR and Deno** there is no bundler, because the package is raw source. The default is also
|
|
243
339
|
production (`__DEV__ = false`). To turn the guards on while you develop, set
|
|
244
340
|
`globalThis.__DEV__ = true` before the first import. For the full details, which include the
|
|
@@ -250,35 +346,39 @@ browser, CDN, and manual paths, read the
|
|
|
250
346
|
- **If oecs is new to you**, start with the [Getting started](docs/GETTING_STARTED.md) tutorial.
|
|
251
347
|
Then read [Best practices](docs/BEST_PRACTICES.md) and the
|
|
252
348
|
[Architecture](docs/ARCHITECTURE.md) overview.
|
|
253
|
-
- **If you use the optional
|
|
254
|
-
|
|
349
|
+
- **If you use the optional entry points**, read the
|
|
350
|
+
[Integration guide](docs/INTEGRATION.md) for Solid, the editor, shared memory, and the
|
|
351
|
+
primitives.
|
|
352
|
+
- **If you upgrade from 0.5**, read the
|
|
353
|
+
[Migration guide (0.5 to 0.6)](docs/MIGRATION-0.5-to-0.6.md) and the [CHANGELOG](CHANGELOG.md).
|
|
255
354
|
- **If you upgrade from 0.4**, read the
|
|
256
|
-
[Migration guide (0.4 to 0.5)](docs/MIGRATION-0.4-to-0.5.md)
|
|
355
|
+
[Migration guide (0.4 to 0.5)](docs/MIGRATION-0.4-to-0.5.md).
|
|
257
356
|
- **If you upgrade from 0.3**, read the
|
|
258
357
|
[Migration guide (0.3 to 0.4)](docs/MIGRATION-0.3-to-0.4.md).
|
|
259
|
-
- **The full API reference
|
|
260
|
-
[components](docs/api/components.md)
|
|
261
|
-
[entities](docs/api/entities.md)
|
|
262
|
-
[queries](docs/api/queries.md)
|
|
263
|
-
[systems](docs/api/systems.md)
|
|
264
|
-
[schedule](docs/api/schedule.md)
|
|
265
|
-
[resources](docs/api/resources.md)
|
|
266
|
-
[events](docs/api/events.md)
|
|
267
|
-
[refs](docs/api/refs.md)
|
|
268
|
-
[change detection](docs/api/change-detection.md)
|
|
269
|
-
[observers](docs/api/observers.md)
|
|
270
|
-
[relations](docs/api/relations.md)
|
|
271
|
-
[sparse storage](docs/api/sparse-storage.md)
|
|
272
|
-
[determinism](docs/api/determinism.md)
|
|
273
|
-
[memory](docs/api/memory.md)
|
|
274
|
-
[WASM backends](docs/api/wasm.md)
|
|
275
|
-
[parallel execution](docs/api/parallel.md)
|
|
276
|
-
[the host write path](docs/api/host-write-seam.md)
|
|
277
|
-
[
|
|
278
|
-
[editor](docs/api/editor.md)
|
|
279
|
-
[traces](docs/api/tracing.md)
|
|
280
|
-
[primitives](docs/api/primitives.md)
|
|
281
|
-
[errors](docs/api/errors.md)
|
|
358
|
+
- **The full API reference.** Start at the [reference index](docs/api/index.md). The pages are:
|
|
359
|
+
- [components](docs/api/components.md)
|
|
360
|
+
- [entities](docs/api/entities.md)
|
|
361
|
+
- [queries](docs/api/queries.md)
|
|
362
|
+
- [systems](docs/api/systems.md)
|
|
363
|
+
- [schedule](docs/api/schedule.md)
|
|
364
|
+
- [resources](docs/api/resources.md)
|
|
365
|
+
- [events](docs/api/events.md)
|
|
366
|
+
- [refs](docs/api/refs.md)
|
|
367
|
+
- [change detection](docs/api/change-detection.md)
|
|
368
|
+
- [observers](docs/api/observers.md)
|
|
369
|
+
- [relations](docs/api/relations.md)
|
|
370
|
+
- [sparse storage](docs/api/sparse-storage.md)
|
|
371
|
+
- [determinism](docs/api/determinism.md)
|
|
372
|
+
- [memory](docs/api/memory.md)
|
|
373
|
+
- [WASM backends](docs/api/wasm.md)
|
|
374
|
+
- [parallel execution](docs/api/parallel.md), the worker pool and the `parallel` system form
|
|
375
|
+
- [the host write path](docs/api/host-write-seam.md)
|
|
376
|
+
- [solid](docs/api/solid.md)
|
|
377
|
+
- [editor](docs/api/editor.md)
|
|
378
|
+
- [traces](docs/api/tracing.md)
|
|
379
|
+
- [primitives](docs/api/primitives.md)
|
|
380
|
+
- [errors](docs/api/errors.md)
|
|
381
|
+
- [plugins](docs/api/plugins.md)
|
|
282
382
|
|
|
283
383
|
## Development
|
|
284
384
|
|
|
@@ -288,18 +388,23 @@ pnpm test # vitest
|
|
|
288
388
|
pnpm bench # vitest bench
|
|
289
389
|
pnpm build # vite library build (multi-entry → dist/)
|
|
290
390
|
pnpm exec tsc --noEmit # type check
|
|
391
|
+
pnpm fmt # oxfmt, write
|
|
392
|
+
pnpm lint # oxlint
|
|
393
|
+
pnpm verify # format, lint, types, tests, build
|
|
291
394
|
```
|
|
292
395
|
|
|
396
|
+
`pnpm verify` is the gate the publish workflow runs. Run it before a tag.
|
|
397
|
+
|
|
293
398
|
## Acknowledgements
|
|
294
399
|
|
|
295
400
|
oecs is built on the work of the ECS community. We thank:
|
|
296
401
|
|
|
297
402
|
- **[Bevy](https://bevyengine.org)**, **[Flecs](https://github.com/SanderMertens/flecs)**, and
|
|
298
|
-
**[bitECS](https://github.com/NateTheGreatt/bitECS)
|
|
403
|
+
**[bitECS](https://github.com/NateTheGreatt/bitECS)**, a continuous source of ideas. Their
|
|
299
404
|
designs gave shape to the archetypes, relations, schedule, and change detection in oecs.
|
|
300
|
-
- **[@clinuxrulz](https://github.com/clinuxrulz)
|
|
405
|
+
- **[@clinuxrulz](https://github.com/clinuxrulz)**, for an excellent demonstration and for very
|
|
301
406
|
valuable comments on the ECS.
|
|
302
407
|
|
|
303
408
|
## License
|
|
304
409
|
|
|
305
|
-
[MIT](
|
|
410
|
+
[MIT](license)
|
|
@@ -18,57 +18,57 @@ interface AccessSets {
|
|
|
18
18
|
}
|
|
19
19
|
declare function setsFor(desc: SystemDescriptor): AccessSets;
|
|
20
20
|
/** The reads-only access surface a run condition declares. A condition
|
|
21
|
-
* can only `reads` components (via a captured query) and `resourceReads
|
|
21
|
+
* can only `reads` components (via a captured query) and `resourceReads`. Every
|
|
22
22
|
* mutation set is empty by construction, so the same `check_*` machinery rejects
|
|
23
|
-
* any write
|
|
23
|
+
* any write, structural or resource-write a misbehaving predicate attempts. */
|
|
24
24
|
interface ConditionAccess {
|
|
25
25
|
readonly name: string;
|
|
26
26
|
readonly reads?: readonly ComponentDef[];
|
|
27
27
|
readonly resourceReads?: readonly ResourceKey<any>[];
|
|
28
28
|
}
|
|
29
29
|
declare class AccessCheck {
|
|
30
|
-
private
|
|
31
|
-
private
|
|
32
|
-
private
|
|
33
|
-
private
|
|
30
|
+
private _activeSystem;
|
|
31
|
+
private _activeSets;
|
|
32
|
+
private _activeName;
|
|
33
|
+
private _exclusive;
|
|
34
34
|
enter(desc: SystemDescriptor): void;
|
|
35
|
-
/** Open a reads-only span for a run condition. No descriptor
|
|
35
|
+
/** Open a reads-only span for a run condition. No descriptor, a
|
|
36
36
|
* condition can gate a whole SystemSet, so it isn't attributable to one
|
|
37
|
-
* system
|
|
37
|
+
* system, only its declared `reads` and `resourceReads` and a name for diagnostics.
|
|
38
38
|
* Paired with `leave()`. */
|
|
39
39
|
enterCondition(cond: ConditionAccess): void;
|
|
40
40
|
leave(): void;
|
|
41
41
|
isActive(): boolean;
|
|
42
42
|
/** Current system descriptor, if any. Null during a run-condition span. */
|
|
43
43
|
current(): SystemDescriptor | null;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
assertRead(def: ComponentHandle): void;
|
|
45
|
+
assertWrite(def: ComponentHandle): void;
|
|
46
|
+
assertAdd(def: ComponentHandle): void;
|
|
47
|
+
assertRemove(def: ComponentHandle): void;
|
|
48
|
+
assertDespawn(): void;
|
|
49
|
+
assertResourceRead(key: ResourceKey<any>): void;
|
|
50
|
+
assertResourceWrite(key: ResourceKey<any>): void;
|
|
51
|
+
assertSparseRead(def: SparseComponentDef): void;
|
|
52
|
+
assertSparseWrite(def: SparseComponentDef): void;
|
|
53
|
+
assertRelationRead(def: RelationDef): void;
|
|
54
|
+
assertRelationWrite(def: RelationDef): void;
|
|
55
55
|
/** A `(*, T)` wildcard (`Query.forEachRelatedTo`) reads every
|
|
56
|
-
* relation's reverse index, so it can't name a specific relation
|
|
56
|
+
* relation's reverse index, so it can't name a specific relation. It is
|
|
57
57
|
* authorised by the `ANY_RELATION` sentinel in `relationReads`. Honoured here
|
|
58
|
-
* exactly like a per-relation read,
|
|
58
|
+
* exactly like a per-relation read, only keyed on the reserved sentinel id
|
|
59
59
|
* (which computeSets folds into `relationReads` like any other entry). */
|
|
60
|
-
|
|
61
|
-
private
|
|
60
|
+
assertRelationReadAny(): void;
|
|
61
|
+
private _optionalScopes;
|
|
62
62
|
enterOptionalScope(optional: readonly number[]): void;
|
|
63
63
|
leaveOptionalScope(): void;
|
|
64
|
-
|
|
65
|
-
private
|
|
66
|
-
private
|
|
67
|
-
private
|
|
68
|
-
private
|
|
64
|
+
assertOptionalFetch(def: ComponentHandle): void;
|
|
65
|
+
private _failComponent;
|
|
66
|
+
private _failSparse;
|
|
67
|
+
private _failRelation;
|
|
68
|
+
private _failResource;
|
|
69
69
|
}
|
|
70
70
|
export declare const accessCheck: AccessCheck;
|
|
71
|
-
/** @internal
|
|
71
|
+
/** @internal, test seam for unit tests that need a fresh tracker. */
|
|
72
72
|
export declare const _accessCheckInternals: {
|
|
73
73
|
create: () => AccessCheck;
|
|
74
74
|
setsFor: typeof setsFor;
|