gltf2
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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

/gltf2/

    Package Sidebar

    Install

    npm i gltf2

    Weekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • urish