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: Further improvements to WebXR layers feature testing. #30282

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

toji
Copy link
Contributor

@toji toji commented Jan 7, 2025

Addresses concerns brought up in #30112

Description

Further improves the feature detection for Layers in WebXR so that systems that only allow a single projection layer (which is valid according to the spec) can still take the layers path in Three for most content. Thanks for highlighting the issue, @cabanier! Please let me know what you think about this approach?

Also attempts to address the issue with Pico's browser that was brought up in #30112. I do not have Pico hardware, so I can't test, but my theory is that because the code was previously checking for session but my patch added a check for session.enabledFeatures before that if it was hit this code path prior to a session being created it would display errors in the console. If anyone has access to the Pico browser and could verify that hypothesis, I'd appreciate it!

Pushed as a draft initially because I haven't had a chance to test the patch against the Meta browser just yet. I'll take off the draft label once I validate that it works there.

Copy link

github-actions bot commented Jan 7, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.51
79.09
339.52
79.1
+11 B
+7 B
WebGPU 490.96
136.34
490.96
136.34
+0 B
+0 B
WebGPU Nodes 490.43
136.23
490.43
136.23
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.35
112.14
465.36
112.15
+11 B
+9 B
WebGPU 560.26
151.75
560.26
151.75
+0 B
+0 B
WebGPU Nodes 516.35
141.53
516.35
141.53
+0 B
+0 B

@toji toji force-pushed the xr-layers-check-2 branch from 9dd259f to 5c4e080 Compare January 8, 2025 23:44
@toji toji marked this pull request as ready for review January 8, 2025 23:45
@Mugen87 Mugen87 added this to the r173 milestone Jan 9, 2025
@Mugen87 Mugen87 changed the title Further improvements to WebXR layers feature testing WebXRManager: Further improvements to WebXR layers feature testing. Jan 9, 2025
@Mugen87 Mugen87 merged commit e648b56 into mrdoob:dev Jan 10, 2025
12 checks passed
@toji toji deleted the xr-layers-check-2 branch January 10, 2025 17:51
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.

3 participants