google / model-viewer

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

Model viewer AR trouble on IOS (probably conflict with swiper slider) #4876

Open Parambalamba opened 2 weeks ago

Parambalamba commented 2 weeks ago

Model Viewer built in via js code (replace swiper slide to model-viewer). Play and AR works on android, but AR doesn't work on IOS - looks like after click ar-button model reloaded.

Live Demo

https://superpet.me/urun/tasarimci-seramik-kase-copy/

Version

3.5.0

Browser Affected

All browsers on IOS

OS

AR

All modes

danilokrulj commented 2 weeks ago

Do you have a usdz model created for iOS? Because animations don't get converted with the auto-conversion and I feel like the conversion is breaking the app. If you don't, you should create a usdz model manually and set its path in ios-src="path/to/model"

I'm not sure that is the issue but its worth to try :) Also, you can test with a model that doesn't have animations and see how that works.

elalish commented 2 weeks ago

Good suggestions, though in any case it shouldn't crash out of our function like that. I can repro, nothing useful in the log. It appears to be crashing while zipping up the output of our USDZExporter, deep in our Three.js internals. The weirdest part is that USDZ export seems to work just fine for that file using https://threejs.org/editor/, which is the same function we use. At least that can be used as an ios-src.

Parambalamba commented 2 weeks ago

@danilokrulj @elalish I had tried to use ios-src attribute, but it didn't help. Besides, it works on IOS without usdz model - I had checked it. I think the trouble in compatibility between modelviewer and swiper slider. But thanks anyway for your tips!