![]() |
Lysa Nodes
0.0
Lysa Nodes — Scene Graph for the Lysa Engine
|
Centralized loader for scene trees and external resources.
The Loader resolves a file path from an URI and builds a tree of Node instances from supported formats:
The loader optionally caches root nodes to allow fast re-use across the application lifetime. Access is thread-safe via an internal mutex.
Classes | |
| struct | SceneNode |
Static Public Member Functions | |
| template<typename T = Node> | |
| static std::shared_ptr< T > | load (const std::string &uri, const bool useCache=false) |
| template<typename T = Node> | |
| static void | loadAsync (const std::string &URI, LoaderHandlerCallback callback, const bool useCache=false) |
| template<typename T = Node> | |
| static std::shared_ptr< T > | loadScene (const std::string &uri) |
| template<typename T = Node> | |
| static std::shared_ptr< T > | findFirst (const std::string &nodeName) |
| static void | clearCache () |
|
static |
Clears the global resources cache.
All previously cached root nodes become eligible for destruction once no other shared references exist.
|
inlinestatic |
Searches all cached resource trees and returns the first node that matches the provided name and type.
| T | Node subtype used for the search and cast. |
| nodeName | Name to match against children of cached roots. |
|
inlinestatic |
Loads a JSON Scene or an AssetPack and returns the constructed node tree.
| uri | URI to the JSON/glTF/ZRes file |
| useCache | When true, store and re-use the loaded root from a global cache. |
|
inlinestatic |
Loads an assets pack from a URI in a background thread
| URI | The URI of the node to load |
| callback | callback called at the start of the frame following the loading |
| useCache | When true, store and re-use the loaded root from a global cache. |
|
inlinestatic |
Loads a JSON Scene and returns the constructed node tree.
| uri | URI to the JSON scene |