I am developing a web application that leverages ThreeJS to display 3D content. The app would benefit from tracking headset movement when viewing the 2D page as a Window while wearing Vision Pro. This would ultimately allow me a way to convey the idea of the 2D Window acting as a portal into a virtual environment, as the rendered perspective of the 3D environment would match that of the user wearing the headset.
This is a generic request/goal, as it would be applicable to any browser and any 6dof device, but I am particularly more interested in knowing if it is currently possible with Vision Pro (and the Simulator) and its version of Safari for “spatial computing”. I can track the head movement while in a WebXR XR or “immersive” session, but I would like to be able to have ThreeJS’s virtual camera track the movement of the user’s head without going into VR mode. Is this possible? If so, how?