x3dom / x3dom

X3DOM. A framework for integrating and manipulating X3D scenes as HTML5/DOM elements.
http://x3dom.org
Other
813 stars 271 forks source link

Add viewpoint and navigation support in webxr #1257

Closed rghv96 closed 1 year ago

rghv96 commented 1 year ago

@andreasplesch @tsturm @msub2

Please review this PR.

andreasplesch commented 1 year ago

Could you please start from the current webxr branch, so that only your changes are listed in this or a new PR ?

So pick the webxr branch, update X3DCanvas.js and VRControllerManager.js (I think these are the two files modified), and create a new PR from there. If you want I can do it.

rghv96 commented 1 year ago

I have updated the PR.

rghv96 commented 1 year ago

@andreasplesch I have added the scaleFactor of 0.001 in the fit function in VRControllerManager. Also, I don't fully understand why do we need this function as ideally, we should not need any movement in viewArea when we enter VR mode.

andreasplesch commented 1 year ago

I think it was an attempt to automatically have a better view when switching to XR. It may not be needed with viewpoint support. I used the small scale factor only as a safe way to disable the fit function without removing it.

rghv96 commented 1 year ago

Alright, I think the PR is ready to review @andreasplesch

andreasplesch commented 1 year ago

@tsturm and @msub2 ?

msub2 commented 1 year ago

Apologies for delay, looks good to me though

andreasplesch commented 1 year ago

Thanks.