immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
378 stars 84 forks source link

Significantly refactor how Spaces work #122

Closed toji closed 4 years ago

toji commented 4 years ago

Fixes an issue that appeared when trying to compose view transforms from multiple poses. (See this sample for a demonstration of the issue.) This was primarily caused by re-using the same viewerPose object for each pose. The entire system was built on fragile special cases, though, and it was badly in need of a more general approach.

Input spaces are still a special case but don't really need to be anymore. I just don't want to make this PR any bigger.