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

[GUI] Lines array is generated later #12670

Merged
merged 1 commit into from
Jun 21, 2022
Merged

[GUI] Lines array is generated later #12670

merged 1 commit into from
Jun 21, 2022

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented Jun 21, 2022

this._lines is generated when the control is in view. If you create a control that is not in view it will fail.

This makes sure it doesn't fail even when out of view.

Test playground - https://www.babylonjs-playground.com/#XCPP9Y#13890

@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

@sebavan
Copy link
Member

sebavan commented Jun 21, 2022

overall It sounds weird we are going in render if we do not have the required infos ???

@RaananW
Copy link
Member Author

RaananW commented Jun 21, 2022

overall It sounds weird we are going in render if we do not have the required infos ???

That is the GUI render loop. and I agree. Those objects are only initialized on the first actual render, but the function is running on every render call, even if outside of the frustum.

This requires a slight overhaul of the GUI render loop.

@RaananW RaananW merged commit 9b2aa05 into BabylonJS:master Jun 21, 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.

None yet

2 participants