Expand description
Pure ECS operations used by the editor application.
StructsΒ§
- Node
Info π - Display data for one entity, gathered in the first pass so the tree can be
assembled top-down afterwards without touching the
Worldagain.
FunctionsΒ§
- add_
component_ to_ entity - Adds a new component to an existing entity by dispatching through the inventory registry.
- apply_
edits - Applies queued property edits back into ECS components.
- build_
scene_ πnode - Builds the
SceneNodeforentityand, recursively, its children. - default_
surface_ πmaterial - Processes pending spawn requests from the scene tree panel. The material the editor attaches to a freshly-spawned primitive so it is immediately visible and editable. The engine projection has no implicit default material (a meshed entity without one is a clear, logged error), so the authoring tool supplies an explicit one β a neutral matte grey the user then tweaks in the inspector.
- delete_
selection - Deletes every currently selected entity and clears selection/inspector state.
- domain_
tag π - Maps [
SemanticDomain] to the small integer tag the editor side uses in [ComponentJson::domain]. Kept here sokhora-coredoesnβt have to know aboutkhora-dataβs domain enum β the inspector reads the tag and dispatches to category labels. - duplicate_
entity - Duplicates an entity and everything below it.
- extract_
inspected - Extracts inspectable component snapshots for the single selected entity.
- extract_
scene_ tree - Extracts a scene tree snapshot from the ECS world into editor state.
- process_
reparents - Drains
state.pending_reparentand applies it to the ECS hierarchy. - process_
spawns - spawn_
mesh_ asset - Spawns an entity that references a mesh asset by UUID at a world point,
attaching a default surface material so it renders immediately. The
asset_resolver_systemloads the mesh from theMeshRef::Assetnext tick. Returns the new entity.labelis used to derive a readableName. - sync_
scene_ cameras_ for_ mode - Keeps ECS scene-camera activation consistent with the current play mode.