catmaid / CATMAID

Collaborative Annotation Toolkit for Massive Amounts of Image Data
https://catmaid.org
GNU General Public License v3.0
182 stars 56 forks source link

Migrate from deprecated WebVR to WebXR #2230

Closed aschampion closed 1 year ago

aschampion commented 1 year ago

WebVR has been deprecated for some time and as such the 3D viewer VR feature no longer works in Firefox or Chrome. This migrates to the successor WebXR API to restore functionality in Firefox (with the dom.vr.webxr.enabled flag set and only when served over HTTPS).

Fixing Chrome would require upgrading Three to r125 or later. Three's WebXR support has evolved considerably since r122 so would likely require some small changes in addition to this PR if it is upgraded.

This feature can be tested without a VR headset using this extension from Mozilla Reality.

A few driveby commits resulting from getting minimal tsc checking running on the 3D viewer are included.

tomka commented 1 year ago

Nice, thanks for this update! I also wasn't aware of the WebXR API emulator for Firefox, which seems handy for debugging (and testing like here).