simvx.graphics.assets.scene_import¶
Import glTF scenes into SimVX node tree.
Backend-agnostic: produces Node3D / MeshInstance3D trees with
simvx.core.Material objects whose texture URIs (or embedded bytes) are
resolved lazily by whichever TextureManager the active backend owns
(Vulkan on desktop, WebRenderer on Pyodide). A single import_gltf
call therefore works identically in both runtimes — no backend probe
needed at the import level.
Module Contents¶
Functions¶
Load a glTF file and return a Node3D hierarchy ready for the scene tree. |
Data¶
API¶
- simvx.graphics.assets.scene_import.__all__¶
[‘import_gltf’]
- simvx.graphics.assets.scene_import.log¶
‘getLogger(…)’
- simvx.graphics.assets.scene_import.import_gltf(file_path: str) simvx.core.Node3D[source]¶
Load a glTF file and return a Node3D hierarchy ready for the scene tree.
Each glTF node becomes a Node3D or MeshInstance3D. Materials are converted to simvx.core.Material with PBR texture URIs set so the active backend (Vulkan
Engineor webWebRenderer) can resolve them through the sharedTextureManager.Returns an empty
Node3Dif the file is missing or the parser cannot read it — callers get a usable (if bare) scene root rather than a crash, matching the engine’s “errors logged, normal operation silent” rule.Skeleton and animations are attached to nodes that reference glTF skins.