Skip to main content

Crate pite_core

Crate pite_core 

Source
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::NodeTypeRegistry and crate::LifecycleSink, so the tree stays free of subsystem types.
NodeDesc
Input used to build a Node, e.g. from a scene file entry.
NodeId
Handle to a node inside a NodeTree.
NodeTree
The scene tree. Owns all nodes; dropping a subtree drops its scripts.
NodeTypeRegistry
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.
ScriptRef
Script attachment: project-relative path plus the exported class name.
SignalDef
A signal is a name plus ordered payload type names, registered at class-load. connect/emit dispatch through the host; drop-disconnect is handled on node drop.
SignalRegistry
Vec2
2D vector shared by value (composition, not inheritance).

Enums§

CoreError
Errors produced by the core tree and its registries.
PropValue
Typed prop values. New props don’t change the tree struct (§12).

Traits§

LifecycleSink
Lifecycle dispatch seam (_ready, _process, _draw).

Functions§

global_position
A node’s global position is its local position plus every ancestor’s, up to the root. Nodes without a position prop contribute nothing. Moving a parent carries children.

Type Aliases§

NodeFactory
Factory producing a default node record for a registered type.
Result
Convenience alias for core results.