Commit Graph

5 Commits

Author SHA1 Message Date
hypercross 46da8abbe1 refactor: remove rxjs dependency
Replace rxjs with a lightweight internal Subject implementation
to reduce package size and complexity.
2026-05-31 16:38:27 +08:00
hypercross 81efb6cb0a refactor: split WorldEvent into EntityEvent and RelEvent 2026-05-31 16:31:27 +08:00
hypercross 24616a0855 perf(observable): index observers by component for faster dispatch
Introduce a component-to-observer index to avoid iterating over all
observers for every world event. This optimizes event dispatching by
only notifying observers whose queries are relevant to the specific
component being added, removed, or changed.
2026-05-31 16:10:51 +08:00
hypercross 32f8f29912 feat: add relationship support and observability
Introduces relationship management to the World, including
storage for forward and reverse relationships. Adds new observable
events and a `RelationshipUpdate` stream to track when relationships
are added or removed.
2026-05-31 15:54:21 +08:00
hypercross 4ede2d7f3b feat: implement core ECS engine with RxJS observability
Initial implementation of an Entity-Component-System (ECS) featuring:
- Sparse set-based component storage for efficient access.
- Entity lifecycle management with generation-based recycling.
- Reactive query system using RxJS for change tracking.
- Batched event flushing to support frame-based updates.
- Type-safe component definitions via TypeScript inference.
2026-05-31 15:45:20 +08:00