Skip to content

iWun/gltf-boundingsphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gltf-boundingsphere

Computes the bounding sphere of a gltf model

Usage

const fs = require('fs');
const gltfBoundingSphere = require('gltf-boundingsphere');
 
var gltf = fs.readFileSync('box.gltf'); 
const model = JSON.parse(gltf, 'utf8');
 
const boundingSphere = gltfBoundingSphere.computeBoundingSphere(model);
// BoundingSphere {
//   center: Cartesian3 { x: 0, y: 0, z: 0 },
//   radius: 0.8660254037844386 
// }

About

Computes the bounding sphere of a gltf model

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published