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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i gltf2

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • urish