3.1.0 defaults to using Medium SSAO on mobile devices
Strepto opened this issue · comments
reveal/viewer/packages/api/src/public/migration/renderOptionsHelpers.ts
Lines 140 to 142 in a4d35b8
There is a bug here where the default fallthrough of restrictSsaoOptionBasedOnDevice
is the input value, and the input value might be undefined
. This makes the switch here
just use the default value, which is "SSAO medium", and this makes performance on mobile unusable. Its easy to work around in the client by specifying the quality to 'disabled
, but it might be nice for new users fo the library to not have to specify the ssaoQualityHint.
(Remark: i have looked at this for about 10 minutes and did not actually verify this is a fix)
Also:
The isMobileOrTablet check does not detect iPad when they have "Request Desktop Website" (Which is the default). Then the iPad returns same user agent as a Intel Mac 🎉 ...
An ugly workaround using deprecated everything could be:
function iOS() {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13+ detection ('Request Desktop Website' workaround)
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document) // Super hacky and will fail when Macs get touch...
}
Thanks for reporting!
I'll try to get a patch out tomorrow to fix this.
@Strepto Has been merged now. Is this something you need us to release asap. or is it ok to defer?
No rush for us.
Feel free to close the issue 🥇