0.1.0 • Published 6 years ago

gltf2 v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

gltf2 utils

Build Status

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');