glTF loader for the PEX library
npm install pex-gltf --save
var loadGLTF = require('pex-gltf');
loadGLTF('scene.gltf', function(err, data) {
if (!err) {
//data.meshes
//data.scenes
//...
}
})
Download the Khronos Group glTF repository containing example models (warning: it's 500MB) either by clonning the glTF repository:
cd example
git clone https://github.com/KhronosGroup/glTF
or by downloading the ZIP copy and unpacking it into pex-gltf/example/glTF
MIT, see LICENSE.md for details.