I decided to try out gltf format for rendering models in Three.js and I'm using this converter (http://cesiumjs.org/convertmodel.html) to convert the model from Collada to GlTF. It spits out a *.gltf file, however in the examples in Three.js they pass a *.json file. How can I load the *.gltf file or how can I get the proper set of files to load? Thanks
2 Answers
2
votes
You can use THREE.glTFLoader
which can be found in the examples/js/loaders directory.
For a demo, see http://threejs.org/examples/webgl_loader_gltf.html.
three.js r.95
1
votes
The gltf file is a valid json file as far as I understand it. I opened a file converted from collada to gltf and it is just plain json. I put it also through the validator at JSONLint. I would suggest to change the file ending from .gltf to .json .