-
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
Entity show not getting applied immediately #7024
Comments
This seems to have reasonable behavior to me. If you disagree can you make a side-by-side comparison with how it should be using the primitive api? |
The primitive gets hidden and does not get picked, which is the correct behavior. In the entity api |
For performance, the entity primitives don't get updated until the next clock tick. I don't think this is something we'll change. In your demo, if you add the line @mramato can chime in, but I think we should close this issue as a |
I mostly agree with @hpinkos here, there are plenty of things things in Cesium that don't get updated until a full frame is rendered and you can fall into a lot of issues if you call pick immediately after changing things. I would recommend scheduling a postRender callback to actually perform the pick. That being said, drillPick works fine with entities because it just iterates all primitives and turns them off as it goes (setting the value back to the original value after it's done). I'm not sure what sampleHeight is doing, but is there a reason for it to work at the entity level instead of the primitive level? One possible way to make entities be reflected immediately in pick (without giving scene knowledge of Entities) would be to have entities actually update in |
Ok, as long as this is expected behavior I'm fine with a workaround. Using a callback won't work with the current design but drill pick should, I was thinking about using it internally in some way. For a little more background
|
Setting
entity.show
does not seem to get applied immediately.Sandcastle demo
Ran into this bug while working on #6934 where
sampleHeight
needs the ability to hide certain entities or primitives immediately before getting the height.The text was updated successfully, but these errors were encountered: