Skip to main content

Module scene

Module scene 

Source
Expand description

Scene module containing the Scene struct and related functionality.

Re-exports§

pub use registry::*;
pub use migrations::*;

Modules§

migrations
Scene format migrations.
registry
Open component registration system for scene serialization.

Structs§

ArchetypeSerializationStrategy
A serialization strategy that uses the “Archetype” strategy.
ComponentDefinition
A single component in the stable intermediate representation.
DefinitionSerializationStrategy
A serialization strategy that uses a stable, intermediate representation.
EntityDefinition
An entity definition in the stable intermediate representation.
MessagePackSerializationStrategy
MessagePack-encoded SceneRecipe. Identifier KH_MESSAGEPACK_V1.
RecipeSerializationStrategy
A serialization strategy that uses a sequence of commands (SceneRecipe).
SceneDefinition
The full scene definition in stable intermediate representation.
SceneRecipe
The root container for a scene recipe. It’s simply a list of commands.

Enums§

DeserializationError
An error that can occur during the deserialization process.
SceneCommand
A single, atomic operation required to construct a scene.
SerializationError
An error that can occur during the serialization process.

Traits§

SerializationStrategy
The abstract contract for a scene serialization strategy.

Functions§

instantiate_subtree
Inverse of serialize_subtree. Decodes the recipe bytes and spawns the subtree into world, returning the new root’s EntityId so the caller can position it / reparent it / treat it as the drop target’s child.
serialize_subtree
Encodes the subtree rooted at root (root + all descendants reached via the Children component) as a stand-alone bincode-encoded SceneRecipe. Exists to back the editor’s “Save as Prefab” flow: the resulting bytes round-trip through instantiate_subtree.