CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.98k stars 3.5k forks source link

Cesium Map flickers when showing two or more labels #12231

Open timeichfeld-msa opened 1 month ago

timeichfeld-msa commented 1 month ago

What happened?

Hello,

I added a model via CZML and played the animation through the timeframe. When the ModelGraphic appears on the surface, the entire map blinks out. Sometimes it takes .25 seconds or more for the map to come back. It is very noticeable.

This did not happen in the last version 1.120 It is happening in 1.121 (October release)

During animation, when many hundreds of models are added to the map, all at close timeframes, it creates a strobe effect. The map flickers for each item initially placed on the map. Once the item is on the map, it does not flicker.

Please play through the sandcastle example an dlet it loop a couple times. you will need to reload th emap to reproduce the effect. (click 'run' again)

Reproduction steps

  1. navigate to Sandcastle Example
  2. Run the animation.
  3. When the modelGraphic is first shown on the map, the entire map dissappears for a moment.
  4. Once the item has been shown on the map, the map does not flicker when the model dissappears and reappears on the map. (loop or use the time controls). ...

Sandcastle example

sandcastle

Environment

Browser: chrome (any) CesiumJS Version: 1.121 Operating System: windows

ggetz commented 1 month ago

Thanks for the report @timeichfeld-msa!

Just to clarify, I see the blink in version 1.122, but not 1.121. Is this the same on your end? Or are you indeed seeing this in 1.121?

timeichfeld-msa commented 1 month ago

Hi Gabby, yes, sorry about that, I see the flicker in 1.122, not 1.121

Thanks much :) -Timothy

ggetz commented 3 weeks ago

As pointed out in https://github.com/CesiumGS/cesium/issues/12261, this appears to be due to the label, not the model itself.

For instance, id I comment out the label property in the CZML, the issue does not appear.

netcanol commented 2 weeks ago

As pointed out in #12261, this appears to be due to the label, not the model itself.

For instance, id I comment out the label property in the CZML, the issue does not appear.

It is OK with one label, and flashes when there are more than two

ggetz commented 1 week ago

Also reported in https://github.com/CesiumGS/cesium/issues/12287

edgexie commented 5 days ago

As pointed out in #12261, this appears to be due to the label, not the model itself.

For instance, id I comment out the label property in the CZML, the issue does not appear.

yes, when only add an entity with label, the problem will appear