-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
XRButton: allow specifying optional and required features #27030
XRButton: allow specifying optional and required features #27030
Conversation
Update the XRButton so that it can be passed optional and required features to be enabled on the XRSession. This is useful for enabling light estimation. Update the WebXRManager interface to offer light estimation. Also update the English documentation to document the new light estimation method.
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
not sure if this is the right forum, but @snagy would you know if you folks at Meta have a timeline for implementing this in the Quest Browser? |
Related example: https://threejs.org/examples/webxr_ar_lighting Question: Do we need a new method like |
Neat, that looks like it already does what I wanted to do, and shows how to! At this point that makes this PR kind of irrelevant. |
One thing we could still use this PR for is to support passing requested WebXR features through the XRButton. |
Updated the PR and the description. |
@@ -1,6 +1,6 @@ | |||
class XRButton { | |||
|
|||
static createButton( renderer ) { | |||
static createButton( renderer, sessionInit = {} ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't merge this PR until @mrdoob approves since I'm not sure why sessionInit
wasn't added in the first place (similar to ARButton
). Looking at the code, the module request multiple optional features at once. Maybe this was done in order to keep the interface simple. Adding sessionInit
means devs have to know how the options
of requestSession()
is structured.
I'll have to think about this one... |
Oh true... Then I'll merge it. |
Update
XRButton
to let user pass optional and required WebXR featuresUpdate
XRButton
so that it can be passed optional and required features to be enabled on theXRSession
. This is useful for enabling e.g. light estimation: