gltf-boundingsphere

1.0.1 • Public • Published

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 
// }

Versions

Current Tags

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

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i gltf-boundingsphere

Weekly Downloads

2

Version

1.0.1

License

Apache-2.0

Last publish

Collaborators

  • xingwangchan