Expand description
Core scene-graph primitives: node handles, the node tree, props, the node type registry and lifecycle dispatch.
Knows nothing about Python (pite-script), rendering (pite-render) or the
scene file format (pite-scene). Those plug in through the traits re-exported
here, which is where the crate boundaries are drawn.
Structs§
- Node
- A node record. Data only: behaviour lives in
crate::NodeTypeRegistryandcrate::LifecycleSink, so the tree stays free of subsystem types. - Node
Desc - Input used to build a
Node, e.g. from a scene file entry. - NodeId
- Handle to a node inside a
NodeTree. - Node
Tree - The scene tree. Owns all nodes; dropping a subtree drops its scripts.
- Node
Type Registry - Registry for node types. New nodes = new registration, never a core match-statement edit.
- Props
- String→value prop map with typed accessors. Unknown props preserved.
- Script
Ref - Script attachment: project-relative path plus the exported class name.
- Signal
Def - A signal is a name plus ordered payload type names, registered at
class-load.
connect/emitdispatch through the host; drop-disconnect is handled on node drop. - Signal
Registry - Vec2
- 2D vector shared by value (composition, not inheritance).
Enums§
- Core
Error - Errors produced by the core tree and its registries.
- Prop
Value - Typed prop values. New props don’t change the tree struct (§12).
Traits§
- Lifecycle
Sink - Lifecycle dispatch seam (
_ready,_process,_draw).
Functions§
- global_
position - A node’s global position is its local
positionplus every ancestor’s, up to the root. Nodes without apositionprop contribute nothing. Moving a parent carries children.
Type Aliases§
- Node
Factory - Factory producing a default node record for a registered type.
- Result
- Convenience alias for core results.