three.js icon indicating copy to clipboard operation
three.js copied to clipboard

Improve layers implementation

Open dmarcos opened this issue 2 years ago • 6 comments

Description

We have now a simple implementation:

https://github.com/supermedium/three.js/blob/dev/src/renderers/webxr/WebXRManager.js#L373

It can be tested in

https://aframe.io/aframe/examples/showcase/comicbook/

Can switch layers by pressing thumbstick. Feature only available in immersive mode and Meta Browser on Quest.

I think there are new features available like punch through that I'm happy to incorporate.

@cabanier What do you think? Any code we can incorporate? PRs also super welcome? Thanks!

Solution

n/a

Alternatives

n/a

Additional context

No response

dmarcos avatar May 05 '23 20:05 dmarcos

This commit adds support for hole punching of Quad and Cylinder layers: https://github.com/mrdoob/three.js/pull/25254/commits/ea1fad2b919fd51dfc4fafed68b8859393684f6c

This allows layers to mix with the VR scene. The PR is stuck since January :-\

cabanier avatar May 05 '23 21:05 cabanier

Thanks. Do you think it would be possible to move those WebGLTexture changes somewhere else. WebXRManager for instance? WebGLTexture, WebGLRenderer files have a lot of churn and it's hard to maintain in the fork so I try to avoid as much as possible.

dmarcos avatar May 05 '23 21:05 dmarcos

It's actually only a very small change (1 extra check) but for some reason it looks large in the diff because it got confused.

cabanier avatar May 05 '23 21:05 cabanier

I see, thanks. If you have some time to open a PR against the dev branch in this repo I'll review and merge. Probably quick for you since you're familiar with the code. If busy, no worries. I'll incorporate as soon as I have some bandwidth. Thanks for getting back so quickly

dmarcos avatar May 05 '23 22:05 dmarcos

The additional changes in the diff could indentation, empty space? I have similar issues sometimes since don't have a three style linter on my editor

dmarcos avatar May 05 '23 22:05 dmarcos

Some editors set to replace spaces for tabs on save or viceversa

dmarcos avatar May 05 '23 22:05 dmarcos