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

WebXRManager: Use async/await in setSession(). #20754

Merged
merged 2 commits into from
Jan 16, 2021
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 24, 2020

Related issue: Fixed #20715.

Description

@ranbuch Do you mind testing this change? I've tried it with an Oculus Quest and it seems to work.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 24, 2020

Oh, misc_legacy is broken. The build three.js produces a strange runtime error now:

three.js:16787 Uncaught ReferenceError: regeneratorRuntime is not defined

Looks like babel has issues to transpile the code.

@marcofugaro Any ideas 😇? It's the first time the core uses async/await.

@marcofugaro
Copy link
Contributor

@Mugen87 I'll look into it!

@cabanier
Copy link
Contributor

@mrdoob Without this change, three.js experiences will start failing as soon as Chrome 88 ships.
Can we merge it?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jan 14, 2021

@mrdoob We also need this #20761 otherwise the build will fail.

@cabanier
Copy link
Contributor

@Mugen87 it seems this PR is still failing. Are you looking into fixing it?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jan 15, 2021

Are you looking into fixing it?

Yes. I'm on it 😊 .

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jan 15, 2021

Okay, the problem is that misc_legacy is failing because the PR #20761 is missing.

It is required so babel can correctly transpile the code for the build files three.js and three.min.js.

@toji
Copy link
Contributor

toji commented Jan 15, 2021

Just voicing my concern as well that this is able to land quickly. Happy to contribute directly if I can, though I'm not familiar with the blocking dependency.

@mrdoob mrdoob added this to the r125 milestone Jan 16, 2021
@mrdoob mrdoob merged commit 156e9af into mrdoob:dev Jan 16, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jan 16, 2021

Thanks!

@toji
Copy link
Contributor

toji commented Jan 17, 2021

Thank you!

0b5vr pushed a commit to 0b5vr/DefinitelyTyped that referenced this pull request Feb 4, 2021
setSession should return Promise<void> instead of void since r125
See: mrdoob/three.js#20754
0b5vr pushed a commit to 0b5vr/DefinitelyTyped that referenced this pull request Feb 8, 2021
setSession should return Promise<void> instead of void since r125
See: mrdoob/three.js#20754
0b5vr pushed a commit to 0b5vr/three-ts-types that referenced this pull request Feb 8, 2021
setSession should return Promise<void> instead of void since r125
See: mrdoob/three.js#20754
joshuaellis pushed a commit to three-types/three-ts-types that referenced this pull request Feb 8, 2021
* fix (three): update WebXRManager
getReferenceSpace / getSession should be nullable

* fix (three): Update WebXRManager
setSession should return Promise<void> instead of void since r125
See: mrdoob/three.js#20754

* fix (three): Update WebXRManager
Trivial rename of arguments

* test (three): add a test
webxr-vr-cube.ts, a simple example featuring WebXR VR

* fix (three): Update XRSession
XRSession should extend EventTarget

* chore (three): Modify tsconfig.json
Forgot to add `webxr-vr-cube.ts` to the tsconfig.json

* docs: add FMS-Cat as a contributor

* refactor: ran prettier:write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebGL context must be marked as XR compatible in order to use with an immersive XRSession
5 participants