-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
#8006 Fix incorrect billboard clamping when terrain provider changes #9079
#8006 Fix incorrect billboard clamping when terrain provider changes #9079
Conversation
…ltiple callbacks being registered for the same billboard in invalidateAllTiles, resulting in leaked/stale callbacks and bad clamped locations.
…or for other primitive types
Thanks for the pull request @bn-dignitas!
Reviewers, don't forget to make sure that:
|
Thanks for the PR @bn-dignitas! I should have time to review this and test it out before the September release |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
6 similar comments
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 90 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 90 days. If you'd like me to stop, just comment with |
1 similar comment
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 90 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 90 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bn-dignitas! No one has commented on this pull request in 90 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 90 days. If you'd like me to stop, just comment with |
@@ -206,6 +206,20 @@ QuadtreePrimitive.prototype.invalidateAllTiles = function () { | |||
this._tilesInvalidated = true; | |||
}; | |||
|
|||
function containsOwnerHeightCallbackData(heightCallbacks, owner) { | |||
var found = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be changed to delete the found
variable, replace found = true; break;
with return true;
inside the for-loop, and return false;
at the end instead of return found
?
owner._clampedPosition | ||
); | ||
|
||
// Billboards can be reused, i.e. by EntityCluster so check that the height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, is this also intended to fix the bug from your comment on the issue?
It looks like the QuadtreePrimitive customData list keeps growing and some stale height callbacks are being made with old coordinates.
I don't think the comment in the code is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bn-dignitas! I confirmed the change fixes the billboard issue in the Sandcastle from #8006.
There are a few things left like a CHANGES.md entry and changing var
to let
and const
but I think this is a good change.
Due to inactivity, I'm going to close this PR to keep things tidy. @bn-dignitas if you get the chance to update this, please feel free to re-open. Thanks! |
#8006 Pass id of billboard to callback function to prevent multiple callbacks being registered for the same billboard in invalidateAllTiles, resulting in leaked/stale callbacks and bad clamped locations.