| Crates.io | asset-importer-rs-gltf-v1 |
| lib.rs | asset-importer-rs-gltf-v1 |
| version | 0.3.0 |
| created_at | 2025-05-27 23:44:47.676862+00 |
| updated_at | 2025-07-28 23:55:01.953278+00 |
| description | GLTF V1 module for asset-importer-rs |
| homepage | |
| repository | https://github.com/crazyjackel/asset-importer-rs |
| max_upload_size | |
| id | 1692109 |
| size | 148,555 |

asset-importer-rs-gltf-v1 provides glTF 1.0 import and export functionality for the asset-importer-rs project. This implementation supports the legacy glTF 1.0 specification, including the KHR_materials_common extension, making it essential for handling older glTF assets and maintaining backward compatibility.
This crate provides the essential functionality for:


The following glTF 1.0 extension is fully supported:


Add the following to your Cargo.toml:
[dependencies]
asset-importer-rs-gltf-v1 = "0.3.0"
# Or for development from source:
asset-importer-rs-gltf-v1 = { path = "../path/to/asset-importer-rs-gltf-v1" }
# Enable KHR_materials_common extension
[features]
default = ["KHR_materials_common"]

Basic glTF 1.0 import example:
use asset_importer_rs_gltf_v1::{
GltfImporter,
GLTFImportError,
};
use std::path::Path;
// Create an importer
let importer = GltfImporter::new();
// Import a glTF 1.0 file
let scene = importer.import_file(Path::new("legacy_model.gltf"))?;
// Access scene data
println!("Scene has {} meshes", scene.meshes.len());
println!("Scene has {} materials", scene.materials.len());
Basic glTF 1.0 export example:
use asset_importer_rs_gltf_v1::{
GltfExporter,
GltfExportError,
};
use asset_importer_rs_scene::AiScene;
// Create an exporter
let exporter = GltfExporter::new();
// Export scene to glTF 1.0
let scene = AiScene::default(); // Your scene data
exporter.export_file(&scene, Path::new("output_v1.gltf"))?;
Working with KHR_materials_common:
use asset_importer_rs_gltf_v1::GltfImporter;
// Create importer with KHR_materials_common support
let importer = GltfImporter::new();
// Import with legacy material support
let scene = importer.import_file("model_with_common_materials.gltf")?;
// Access legacy material data
for material in &scene.materials {
// Handle KHR_materials_common properties
println!("Material: {:?}", material);
}

The glTF v1 crate provides a complete implementation of the legacy glTF 1.0 specification with a focus on backward compatibility and legacy asset support. The importer handles scene graph construction, legacy material processing, and mesh optimization, while the exporter manages serialization, texture handling, and extension support for the older format.
The crate integrates seamlessly with the asset-importer-rs ecosystem, providing glTF 1.0-specific implementations of the core import/export traits while maintaining compatibility with the broader 3D asset pipeline and ensuring legacy assets can be properly handled.


This crate is specifically designed for handling legacy glTF 1.0 files and maintaining backward compatibility with older assets. For modern glTF 2.0 support with the latest features and extensions, please use the asset-importer-rs-gltf crate instead.
The glTF 1.0 specification has been superseded by glTF 2.0, but this crate ensures that legacy assets can still be properly imported, processed, and exported within the asset-importer-rs ecosystem.

This project is part of the asset-importer-rs workspace and follows its licensing terms. See the main project LICENSE file for details.
Copyright (c) 2024 Jackson Levitt