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¶
Load a glTF file and return a Node3D hierarchy ready for the scene tree.
Each glTF node becomes a Node3D, MeshInstance3D, core light (KHR_lights_punctual -> DirectionalLight3D / PointLight3D / SpotLight3D) or Camera3D. 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.Raises
FileNotFoundErrornaming the path when the file does not exist, and lets a parse error propagate with the path attached as a note: a scene whose asset is missing must never load as a plausible empty root.Skeleton and animations are attached to nodes that reference glTF skins.