Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(view): add WebXR support. #2092

Merged
merged 1 commit into from
Nov 21, 2023
Merged

feature(view): add WebXR support. #2092

merged 1 commit into from
Nov 21, 2023

Conversation

gchoqueux
Copy link
Contributor

@gchoqueux gchoqueux commented May 10, 2023

Description

Add WebXR partial support.

Features added

  • headset;
  • stop VR session;
  • Add option to scale webxr transformation;

Work for the next PR

  • add VR controllers;
  • fix asynchronization between MainLoop.update and vr.renderer;
  • fix wrong WebXR transformation in session starting;
  • fix labels are hidden
  • fix realistic atmosphere is hidden

image

@gchoqueux gchoqueux marked this pull request as draft May 10, 2023 14:19
@gchoqueux gchoqueux added this to the 2.xx.x milestone May 10, 2023
@gchoqueux gchoqueux added the feature 🍏 Adds a new feature label May 10, 2023
@gchoqueux gchoqueux mentioned this pull request May 15, 2023
2 tasks
@gchoqueux gchoqueux force-pushed the webXR branch 2 times, most recently from 09fc019 to cd9b9b3 Compare May 15, 2023 16:02
@gchoqueux gchoqueux marked this pull request as ready for review May 15, 2023 16:53
src/Renderer/WebXR.js Outdated Show resolved Hide resolved
examples/view_3d_map_webxr.html Outdated Show resolved Hide resolved
src/Renderer/WebXR.js Outdated Show resolved Hide resolved
src/Renderer/WebXR.js Outdated Show resolved Hide resolved
src/Renderer/WebXR.js Outdated Show resolved Hide resolved
test/unit/bootstrap.js Outdated Show resolved Hide resolved
@jailln jailln requested a review from AnthonyGlt June 19, 2023 09:09
@jailln jailln requested review from jogarnier and removed request for AnthonyGlt September 6, 2023 13:07
@jogarnier
Copy link
Contributor

No more feedback from my side. Just take a look of the previous ones to resolve them

@Desplandis Desplandis force-pushed the webXR branch 3 times, most recently from 4cf649d to ec64d2b Compare November 17, 2023 11:06
@Desplandis
Copy link
Contributor

@mgermerie @jogarnier I added some TODOs for the "asynchronization between MainLoop.update and vr.renderer problem.

I'll open a PR to replace calls to Window#requestAnimationFrame by the three's WebGLRenderer#setAnimationLoop. The doc says that:

For WebXR projects this function must be used.

Copy link
Contributor

@mgermerie mgermerie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's all good for me, except for one question on architecture : would it be possible to leave the VR button creation responsibility to user ? We would just have the sessionstart event listener in src/Renderer/WebXR.js and user would need to trigger this event with his/hers own button or three.js premade button.
The current behavior enforces user to use three.js button.

examples/view_3d_map_webxr.html Outdated Show resolved Hide resolved
examples/view_3d_map_webxr.html Outdated Show resolved Hide resolved
@Desplandis Desplandis force-pushed the webXR branch 3 times, most recently from 580daad to c985d7c Compare November 20, 2023 15:54
@Desplandis
Copy link
Contributor

@mgermerie Following your comment, I moved the VRButton instantiation from the Core to the example.

@Desplandis Desplandis requested a review from mgermerie November 20, 2023 20:42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no functional test on this example, but from what I remember from testing for ColladaLoader, the functional tests fail with importmap.

@jogarnier jogarnier merged commit 1d10290 into iTowns:master Nov 21, 2023
7 checks passed
@gchoqueux gchoqueux deleted the webXR branch February 19, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🍏 Adds a new feature
Projects
Status: Long term
Development

Successfully merging this pull request may close these issues.

5 participants