model-viewer
model-viewer copied to clipboard
Click-to-center breaks with meshopt-compressed GLB files
Description
Seems something goes wrong either with the bounds calculation or with click-to-zoom when meshopt compression is used (nodes might be scaled?). Trying to navigate in this model in modelviewer.dev/editor leads to a white screen; can't be navigated / explored. Double-click on the background brings me back to the original view.
Live Demo
Drag this model into modelviewer.dev/editor:
LargePlane.meshopt.zip
Then, try to click on the little sphere (or pan-and-center) and zoom in on it.
Thanks, I can repro, but this feels like a three.js bug. We use a raycast for this feature, so I'd guess you could make a simple repro using that in three.js and file an issue there. In fact there's a known issue regarding normalized accessors that's in the middle of getting fixed, which is a likely culprit: https://github.com/mrdoob/three.js/pull/22874
Thanks, I think no need to report another issue then, seems there's already good progress (and this one here is now linked as well).
This was fixed by you when we pulled into r144, so thanks for that!