-
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
Fix pick with skyatmosphere #4790
Conversation
Please review changes thoroughly --- I'm not familiar with CesiumJS internals. |
What is expected pickId when picking not-object (stars, Earth tiles)? Shouldn't Context.getObjectByPickColor get zero color for anything but not object? Because I see that Context.getObjectByPickColor gets colors like the following:
|
Thanks @rutsky! Most of the team is out of the office this week, but we'll try review this soon. |
|
||
//>>includeStart('debug', pragmas.debug); | ||
if (pickedResult === prevPickedResult) { | ||
throw new DeveloperError( |
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.
This would mask a bug elsewhere - basically setting a primitive's show
to false
not working. Can you remove this and keep the scope of this bug to picking the atmosphere?
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.
I excluded commit with adding DeveloperError
from the pull request.
Are you sure there is no benefit in adding such internal consistency check? (I can open second PR with this change.)
IMO this check costs almost nothing, but can improve debugging experience next time when pick issue will arise.
@rutsky usually we would add a new test, but it will be hard to reasonably do so without tightly coupling the test to the engine code so don't worry about it. |
Looking at the sky box, sun, and moon The globe tiles won't generate any pick commands, other than writing depth, but they are processed in the right place so they are unlikely to be an issue. I can finish this PR up next week if that is OK with you. Just address #4790 (comment) in the meantime, please. |
149d540
to
a7c2a64
Compare
Thanks, @pjcozzi , it's better if you finish this PR, since it requires deeper knowledge of Cesium internals that I have, plus it's holidays here in Russia next week. I removed commit with consistency check --- see my comment. |
This comment, #4783 (comment), was meant for this PR:
|
Add raising
DeveloperError
if previously picked object is picked again indrillPick
.Don't draw SkyAtmosphere when picking.
Fixes #4783 and #4784.