google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.84k stars 807 forks source link

openIOSARQuickLook is not awaited in activateAR #4404

Closed heatblayze closed 1 year ago

heatblayze commented 1 year ago

The openIOSARQuickLook function that's called internally inside activateAR() is asynchronous, but it is not awaited. When an iOS src is provided it looks like it will resolve immediately, but when generating a local USDZ version of a GLTF file it will resolve after that process is complete.

https://github.com/google/model-viewer/blob/6af7342d5bc8cde108636b2d95ecbc71a596de93/packages/model-viewer/src/features/ar.ts#L369-L374

https://github.com/google/model-viewer/blob/6af7342d5bc8cde108636b2d95ecbc71a596de93/packages/model-viewer/src/features/ar.ts#L197-L202