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

Layers: add recursive property #28427

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

CodyJasonBennett
Copy link
Contributor

@CodyJasonBennett CodyJasonBennett commented May 19, 2024

Related issue: #18937

Description

Continues #19012 with handling wherever a visibility test is performed. I did not update layers tests in render-lists or transmission pass code since it was not clear to me if those lists were in any hierarchical order.

When Layers.recursive = true for an object and it fails the visibility test, its children are not processed.

Copy link

github-actions bot commented May 19, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
678.5 kB (168.2 kB) 678.8 kB (168.3 kB) +307 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
456.7 kB (110.3 kB) 456.9 kB (110.4 kB) +271 B

@Mugen87 Mugen87 added this to the r165 milestone May 21, 2024
@mrdoob mrdoob modified the milestones: r165, r166 May 31, 2024
@@ -3,6 +3,7 @@ class Layers {
constructor() {

this.mask = 1 | 0;
this.recursive = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe the default should be configurable with a static property Layers.DEFAULT_RECURSIVE?

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.

None yet

3 participants