model-tag icon indicating copy to clipboard operation
model-tag copied to clipboard

model-gltf must work with gltf model with cameras?

Open shrekshao opened this issue 8 years ago • 3 comments

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.

shrekshao avatar Feb 22 '17 04:02 shrekshao

@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 avatar Jul 04 '17 12:07 pjcozzi

@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. 🤔

donmccurdy avatar Jul 04 '17 16:07 donmccurdy

Perfect, we'll check out AVGP/gltf-viewer, thanks @donmccurdy!

pjcozzi avatar Jul 04 '17 20:07 pjcozzi