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§
- Active
Events - Indicates that an entity should receive collision events. By default, the physics engine does not report collisions for every entity to save on performance. Adding this component enables reporting for this entity.
- 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.
- Collider
- Component representing a collider attached to an entity.
- Collision
Events - A component that stores collision events for the current frame. Typically attached to a singleton entity or used as a resource.
- Collision
Pair - A pair of entities that are potentially colliding.
- Collision
Pairs - A component that stores potential collision pairs identified during broadphase.
- 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.
- Domain
Bitset - A simple bitset wrapped around a
Vec<u64>. - Domain
Stats - Simple statistics for a semantic domain.
- 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.
- Kinematic
Character Controller - Component for kinematic character movement. It provides high-level movement resolution (slopes, steps, etc.) that is more suitable for player characters than raw rigid-body physics.
- 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.
- Physics
Debug Data - Component that holds debug rendering data for the physics simulation.
- Physics
Material - Defines the physical properties of a collider surface.
- 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. - Query
Plan - A pre-calculated execution strategy for a specific set of component types.
- Rigid
Body - Component representing a rigid body in the physics simulation.
- 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.
- Query
Mode - Defines whether a query can be executed “natively” or requires a transversal join.
- 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.