Lysa Nodes  0.0
Lysa Nodes — Scene Graph for the Lysa Engine
What's next?

Common next steps

Load more assets : call Loader::load again and addChild the returned root. Use Loader::loadAsync for assets that should not block the main thread.

Clone for multi-instance scenes : Node::duplicate() performs a deep copy of a loaded subtree, creating independent MeshInstance nodes that share the same underlying GPU geometry. The original and every duplicate can be transformed independently.

Animate nodes : AnimationPlayer is a full-featured node. Add it as a child of any node whose subtree should be animated, then call player->play("animation_name").

Smooth rotation towards a target : Node::lookAt(target) instantly orients a node towards a world-space point. Node::lookAtSmooth(target, duration) performs the same rotation as a Tween registered in the engine context, for cinematic camera rigs or turret tracking.

React to scene events : override onEnterScene() and onExitScene() in a custom node subclass to run code when a node is added to or removed from the scene. Override onReady() for one-time post-construction setup that requires scene access (e.g., finding other nodes by path).

Groups : node->addToGroup("enemies") tags a node; SceneTree provides findAllChildrenByGroup<T>("enemies") to retrieve all tagged nodes in one call.

Remove nodes at runtime : removeChild(node) detaches a node from the renderer and removes it from the tree. The node is destroyed when the last shared_ptr reference drops.

Raycasting without physics : SceneTree::rayCast(ray) tests all registered MeshInstance nodes and returns the closest hit. Camera::rayCast(target) is a convenience wrapper that casts from the camera's position towards a target point.

Custom shaders : derive from lysa::ShaderMaterial and bind a Slang shader to a pipeline; assign it per-surface via MeshInstance::setSurfaceOverrideMaterial.

Lua scripting : when the engine is built with LUA_BINDING ON, any Node subclass (including SceneTree) can attach a Lua script with node->setScript("app://scripts/my_script.lua"). The script's _process, _physics_process, _input, and _ready functions are called by the engine at the appropriate times.