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

Entity flickers when using availability #7048

Closed
OmarShehata opened this issue Sep 18, 2018 · 7 comments
Closed

Entity flickers when using availability #7048

OmarShehata opened this issue Sep 18, 2018 · 7 comments

Comments

@OmarShehata
Copy link
Contributor

Open this Sandcastle, speed up the time, and pause it once you start to see flickering.

Came up on the forum. It looks like availability.contains(time) inside Entity.prototype.isAvailable is returning true even after the time is outside the range. More strangely, it alternates between true and false even when the input time does not change?

@hpinkos
Copy link
Contributor

hpinkos commented Sep 18, 2018

@OmarShehata the use of setInterval in this sandcastle example doesn't make sense. It's adding a new polyline each second the example is running. I'm pretty sure the problem is with the end user code, not with Cesium. I couldn't reproduce the problem using a for loop to add lines.

@hpinkos hpinkos closed this as completed Sep 18, 2018
@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/forum/#!topic/cesium-dev/wtcrYum0dTA

If this issue affects any of these threads, please post a comment like the following:

The issue at #7048 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@OmarShehata
Copy link
Contributor Author

OmarShehata commented Sep 18, 2018

@hpinkos why does using setInterval not make sense? The scenario this is simulating is data that comes from a server, so it wouldn't all be available from the beginning. Why does it matter when the entities are created? I feel like the fact that adding new entities causes other entities with availability whose end time has passed to be visible again is a bug.

I think this is the expected behavior. My workaround here is removing the entities after their availability is up.

@hpinkos
Copy link
Contributor

hpinkos commented Sep 18, 2018

@OmarShehata I'm sorry, you're right. I was thrown off by how the example was written. I've created a minimal version to reproduce the problem here: Example

Every time you press the add sample button it does show lines that are past the availability.

@mramato
Copy link
Contributor

mramato commented Sep 18, 2018

@hpinkos did you fix a similar bug that had to do with outdated show properties being used when the primitives are re-created? This could be a similar issue where show isn't updated until after the first render instead of using the current value at creation time.

@cleroux
Copy link
Contributor

cleroux commented Sep 20, 2018

I'm the original poster on the forums.

This PR fixes a regression caused by #6835 which resolved issues #2909, #4714, #6830, and #5371.
I confirmed each of these issues and they are all fixed with this PR.

I was reluctant to create a pull request that removes this code because there must be a reason why it exists. I still can't figure that out. But I've run every test I can and everything seems to work OK.

hpinkos pushed a commit that referenced this issue Sep 21, 2018
Fix entity show issues, issue #7048
@hpinkos hpinkos closed this as completed Sep 21, 2018
@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/forum/#!topic/cesium-dev/wtcrYum0dTA

If this issue affects any of these threads, please post a comment like the following:

The issue at #7048 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants