casual-simulation / casualos

Casual Open Simulation for the Web
https://ab1.bot
MIT License
48 stars 8 forks source link

Added eye tracking based `transient-pointer` support for Apple Vision Pro #443

Closed Blitzy closed 3 months ago

Blitzy commented 3 months ago

Adds support for visionOS style natural input to the CasualOS WebXR session for Apple Vision headsets.

Implements new transient-pointer input source type. Some modification were done to WebXRControllerMesh to allow for the toggling of pointer rays and controller meshes now that we have unique input methods like transient-pointer that are controller inputs but we don't want to necessarily represent visually.

Compatibility testing was done on HoloLens 2 and Quest 2 (hands and controllers).

Fixes issues #437 and #438

WebKit blog post reference: https://webkit.org/blog/15162/introducing-natural-input-for-webxr-in-apple-vision-pro/