Static
__createCreates glTF2 BufferViews and Accessors for all geometry and animation data.
This method processes mesh geometry, animation data, and skeletal information to create the necessary buffer views and accessors required for glTF2 format. It handles data deduplication and proper memory layout.
The glTF2 JSON document to populate
Array of entities to process for buffer creation
Static
__createCreates glTF2 materials and textures from Rhodonite materials.
Processes all materials used by mesh entities, converting Rhodonite material properties to glTF2 PBR format. Handles texture extraction, optimization, and proper format conversion including support for various material extensions.
The glTF2 JSON document to populate with materials
Mesh entities containing materials to convert
Export options affecting material processing
Promise that resolves when all materials and textures are processed
Static
__createCreates glTF2 nodes representing the scene graph structure.
Converts Rhodonite entities into glTF2 nodes, preserving hierarchical relationships, transformations, and component associations (meshes, cameras, skins). Handles special cases like billboard nodes and blend shape weights.
The glTF2 JSON document to populate with nodes
All entities to convert to nodes
Root-level entities for the scene
Static
__downloadInitiates download of the exported glTF2 data as a .glb file.
Creates a downloadable .glb file containing the complete glTF2 scene in binary format. Uses browser download API to save the file locally.
The glTF2 JSON document
Base filename for the download
Binary data buffer containing the .glb file
Static
__downloadInitiates download of the exported glTF2 data as separate .gltf and .bin files.
Creates downloadable .gltf (JSON) and .bin (binary) files representing the complete glTF2 scene in text format with external binary references.
The glTF2 JSON document
Base filename for the downloads
Binary data buffer for the .bin file
Static
exportExports scene data from the Rhodonite system in glTF2 format.
This is the main entry point for glTF2 export functionality. It processes the scene graph, materials, animations, and other data to create a complete glTF2 output in the specified format.
The target output filename (without extension)
Export configuration options
Promise that resolves to the generated glTF2 ArrayBuffer
The glTF2 format Exporter class.
This class provides functionality to export Rhodonite scene data to glTF 2.0 format. It supports various export formats including .gltf, .glb, and embedded formats.