0.1.0 • Published 6 years ago
gltf2 v0.1.0
gltf2 utils
Utils for processing glTF 2.0 3D model files.
Usage example
import { GLTFReader } from 'gltf2';
const model = new GLTFReader('input.gltf');
if (model.gltf.textures) {
console.log('Texture count:', model.gltf.textures.length);
}
// This will remove unused data from glTF buffers
const savedSpace = model.compactBuffers();
console.log('saved', savedSpace, 'bytes');
model.save('output.gltf');
0.1.0
6 years ago