How yagestudios/bitecs works
Main Components
a) Core ECS Components:
• World Manager (World.js)
• Entity Manager (Entity.js)
• Component Manager (Component.js)
• Query System (Query.js)
• System Manager (System.js)
b) Supporting Systems:
• Serialization Layer (Serialize.js)
• Storage Management (Storage.js)
• Utilities (Util.js)
┌─ Application Layer ─────────────────────┐
• (User Systems & Components) │
• ┬───────────────────────┬─┘
┌───────────────▼───────────────────────▼─┐
• Core ECS Layer │
• ┤
• ┌─────────┐ ┌──────────┐ ┌─────────┐ │
• World │──│ Entity │──│Component│ │
• ┘ └──────────┘ └─────────┘ │
• ┌─────────┐ ┌──────────┐ ┌─────────┐ │
• Query │──│ System │──│ Storage │ │
• ┘ └──────────┘ └─────────┘ │
• ┬───────────────────────┬─┘
┌───────────────▼───────────────────────▼─┐
• Infrastructure Layer │
• (Serialization, TypedArrays) │
• ┘
Important Relationships
a) Data Flow:
• World contains Entities
• Entities reference Components
• Queries filter Entities/Components
• Systems process Query results
b) Key Interactions:
• How TypedArrays are used for component storage
• Query system's relationship with components
• Demonstrate system pipeline flow
Implementation Details
Use these symbols and notations:
• Double lines for containment relationships
• Diamond endings for composition relationships
Performance Aspects
Performance-critical paths:
• Component data access patterns
• Query execution paths
• System update cycles
Additional Elements
• Component type definitions
• System pipeline structure
• Query definition patterns
Remember to:
• Keep the main ECS architecture clear and central
• Data-oriented nature of the design
• Functional and minimal approach
• TypeScript support indicators