Expand description
Implements Khora’s custom Chunked Relational Page ECS (CRPECS).
This module contains the complete implementation of the engine’s Entity-Component-System, which is the heart of the [D]ata layer in the CLAD architecture.
The CRPECS is designed from the ground up to enable the Adaptive Game Data Flows (AGDF) concept from the SAA philosophy. Its key architectural feature is the dissociation of an entity’s identity from the physical storage of its component data, which allows for extremely fast structural changes (adding/removing components).
The primary entry point for interacting with the ECS is the World struct.
Structs§
- Audio
Listener - An ECS component that defines the point of audition in the scene.
- Audio
Source - An ECS component that makes an entity an emitter of sound.
- Camera
- A component that defines a camera’s projection parameters.
- Children
- A component that lists the direct children of an entity.
- Component
Page - A page of memory that stores the component data for multiple entities in a Structure of Arrays (SoA) layout.
- Component
Registry - A registry that maps component types to their semantic domains.
- Entity
Metadata - Represents the central record for an entity, acting as a “table of contents”
that points to the physical location of its component data across various
ComponentPages. - Global
Transform - A component that stores the final, calculated, world-space transformation of an entity.
- Handle
Component - A generic ECS component that associates an entity with a shared asset resource. It holds both a handle to the loaded data and the asset’s unique identifier.
- Light
- A component that adds a light source to an entity.
- Material
Component - A component that attaches any type of material to an entity.
- Page
Index - A logical address pointing to an entity’s component data within a specific
ComponentPage. - Parent
- A component that establishes a parent-child relationship.
- Playback
State - The internal playback state of an active sound.
This will be managed by the
AudioMixingLane. - Query
- An iterator that yields the results of a
WorldQuery. - Query
Mut - An iterator that yields the results of a mutable
WorldQuery. - Serializable
Parent - Serializable representation of a
Parentcomponent. - Serializable
Transform - Serializable representation of a
Transformcomponent. - Transform
- A component that describes an entity’s position, rotation, and scale
relative to its
Parent. If the entity has noParent, this is relative to the world origin. - Type
Registry - A registry that provides reflection data, like type names.
- Without
- A
WorldQueryfilter that matches entities that do NOT have componentT. - World
- The central container for the entire ECS, holding all entities, components, and metadata.
Enums§
- AddComponent
Error - Errors that can occur when adding a component to an entity.
- Projection
Type - Defines the type of camera projection.
- Semantic
Domain - Defines the semantic domains a component can belong to.
Traits§
- AnyVec
- An internal helper trait to perform vector operations on a type-erased
Box<dyn Any>. - Component
- A marker trait for types that can be used as components in the ECS.
- Component
Bundle - A trait for any collection of components that can be spawned together as a single unit.
- World
Maintenance - A trait providing low-level access to the World for maintenance tasks.
- World
Query - A trait implemented by types that can be used to query data from the
World.