Skip to main content

Crate pite_core

Crate pite_core 

Source
Expand description

Core scene-graph primitives for the Pite game engine: node handles, the hierarchical scene tree, properties, the node-type registry, signals, and lifecycle dispatch.

Defines foundational abstractions of the scene model with no direct dependencies on Python scripting (pite-script), rendering (pite-render), or scene file serialization (pite-scene). External subsystems plug in through the traits re-exported here to maintain modular architectural boundaries.

Re-exports§

pub use schema::all_props;
pub use schema::inheritance_chain;
pub use schema::is_valid_custom_prop_type;
pub use schema::node_type_schema;
pub use schema::type_props;
pub use schema::validate_custom_prop_type;
pub use schema::DefaultPropVal;
pub use schema::NodeTypeSchema;
pub use schema::PropHint;
pub use schema::PropSchema;
pub use schema::NODE_SCHEMAS;

Modules§

nodes
One file per node type. Each module owns its SCHEMA and PROPS.
schema
Schema definitions for engine node types, properties, inheritance, and validation.

Structs§

Color
An 8-bit per channel sRGB color with straight (unmultiplied) alpha.
Node
A node instance within a NodeTree.
NodeDesc
Descriptor used to construct a Node, typically parsed from a .ptscn scene file.
NodeId
Unique identifier for a node within a NodeTree.
NodeTree
Hierarchical node tree managing node lifecycles and parent-child relationships.
NodeTypeRegistry
Registry managing instantiable node types and their corresponding construction factories.
Props
Key-value property map associated with a Node.
ScriptRef
Script attachment referencing a project-relative Python file and target class.
SignalDef
A registered signal definition specifying its event name and typed payload arguments.
SignalRegistry
Registry storing signal definitions for validation and dynamic dispatch.
Vec2
A 2D floating-point vector with x and y components.

Enums§

CoreError
Errors produced by the core tree and its registries.
PropValue
Dynamically-typed property values supported by the engine’s scene and node model.

Constants§

CUSTOM_PROP_TYPES
Supported type declarations permitted in manifest [props] tables.

Traits§

LifecycleSink
Lifecycle dispatch interface through which engine systems invoke script lifecycle hooks.

Functions§

global_position
Calculates the global world-space position of a node within a NodeTree.

Type Aliases§

NodeFactory
Factory function closure producing a newly instantiated Node record for a given NodeId.
Result
Convenience alias for core results.