Skip to content

Computes the global bounding box of a gltf model

License

Notifications You must be signed in to change notification settings

yakyouk/gltf-bounding-box

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gltf-bounding-box

Computes the global bounding box of a gltf model

npm version Travis build status Dependency Status devDependency Status

Usage

import gltfBoundingBox from 'gltf-bounding-box';

const model = JSON.parse(fs.readFileSync('suzanne.gltf'), 'utf8');

const boundings = gltfBoundingBox.computeBoundings(model);

// boundings:
{
  dimensions: {
    width: 3,
    depth: 2,
    height: 2,
  },
  center: {
    x: 0,
    y: 0,
    z: 0,
  },
}

About

Computes the global bounding box of a gltf model

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%