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

Grid children disappear once linked mesh is outside view #12607

Merged
merged 2 commits into from
May 31, 2022
Merged

Grid children disappear once linked mesh is outside view #12607

merged 2 commits into from
May 31, 2022

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented May 30, 2022

Fixes #12602
This forces resetting the clipping state of children when their matrix is set as dirty.

@@ -142,6 +142,7 @@ export class Container extends Control {

public _flagDescendantsAsMatrixDirty(): void {
for (const child of this.children) {
child._isClipped = false;
child._markMatrixAsDirty();
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn t the marMatrixAsDirty set the flag ??? just wondering :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, this is a very special case! I was struggeling with this decision.
This special case appears ONLY when a container has a container as a child. Setting isClipped every time the matrix is set dirty will be redundant. This is the least amount of isClipped-resetting.
But I agree with you that it does feel a bit off.

Copy link
Member

Choose a reason for hiding this comment

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

maybe let s wait for @deltakosh feedback tomorrow as I remember the caching was pretty heavy to put in place :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

I am anyhow not merging this until approved :-)

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

@deltakosh deltakosh merged commit 8e2fbe2 into BabylonJS:master May 31, 2022
alvov-evo pushed a commit to alvov-evo/Babylon.js that referenced this pull request Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid children disappear once linked mesh is outside view
3 participants