gltf-bounding-box
v0.4.1
Published
Computes the global bounding box of a gltf model
Downloads
715
Readme
gltf-bounding-box
Computes the global bounding box of a gltf model
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,
},
}