model-gltf must work with gltf model with cameras?
Hi mrdoob
I try to load some glTF sample models (To be specific, Box, CesiumMan, BrainStem ), and these are the error logs:
Uncaught TypeError: Cannot read property 'updateMatrixWorld' of undefined
at GLTFShader.update (model-gltf.js:40982)
at model-gltf.js:40926
at _each (model-gltf.js:41369)
at Object.update (model-gltf.js:40922)
at animate (model-gltf.js:42567)
I searched for "camera" in these gltfs and find nothing. Is it because currently model-gltf only works for gltf model with cameras? (VC.gltf has camera)
I load these models with gltf loader in three.js (r80). And there's no problem.
@mrdoob @donmccurdy any thoughts on this one? We wanted to use model-tag for a really simple workflow to public glTF models exported from Blender.
@pjcozzi @shrekshao For now, AVGP/gltf-viewer should do what you need; it creates its own camera, and has a more recent version of the glTF loader. The glTF loader in this repo a bit out of date (glTF 1.0), and I see there's another using glTF 0.6.
@mrdoob do you have time to update this repo, or is this more of a prototype? I wish there were a way to publish loaders from examples/js/ to npm. Keeping dependencies up to date seems time-consuming when they must be copied and then edited to include CommonJS exports. 🤔
Perfect, we'll check out AVGP/gltf-viewer, thanks @donmccurdy!