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

Click-to-center breaks with meshopt-compressed GLB files

Open hybridherbst opened this issue 2 years ago • 2 comments

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. image

hybridherbst avatar May 06 '22 19:05 hybridherbst

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

elalish avatar May 06 '22 20:05 elalish

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).

hybridherbst avatar May 06 '22 21:05 hybridherbst

This was fixed by you when we pulled into r144, so thanks for that!

elalish avatar Oct 11 '22 22:10 elalish