Passing blob into model-viewer src, webxr errors #3767
-
DescriptionI have a threejs scene I export on button click, this exported glb is passed as a blob to the src of my model-viewer.
This works perfectly for iOS and has worked for webxr (scene-viewer won't accept a blob). However, I now receive an error on my Samsung S20Plus with Android 12: I have used the same model with a hardcoded src and it works fine, so the issue is passing the blob. Live Demohttps://arc-solutions.co.uk/fit-show/ Version
Browser Affected
OS
AR
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
So, I'd bet this is an async issue. WebXR has always required "user activation": basically you can't just have JS start a WebXR session, there has to be a user click that caused it. The trick is, that's slightly heuristic on Chrome's side. If they click something and you immediately start WebXR (like when you have a hardcoded src), then it's all fine. If you click, then wait a while for the scene to export, and then start WebXR, it may have taken long enough that your click doesn't count anymore. I think there are a number of ways around this. You might just put in a dummy src, then on click, start WebXR first and then do your scene export and src swap in the background. |
Beta Was this translation helpful? Give feedback.
-
Hi @ZackARC-solutions You have a beautiful setting on glass. Can you share with me what your values are on PBR glass material? it looks looks realistic |
Beta Was this translation helpful? Give feedback.
So, I'd bet this is an async issue. WebXR has always required "user activation": basically you can't just have JS start a WebXR session, there has to be a user click that caused it. The trick is, that's slightly heuristic on Chrome's side. If they click something and you immediately start WebXR (like when you have a hardcoded src), then it's all fine. If you click, then wait a while for the scene to export, and then start WebXR, it may have taken long enough that your click doesn't count anymore.
I think there are a number of ways around this. You might just put in a dummy src, then on click, start WebXR first and then do your scene export and src swap in the background.