You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the tileVisible Event on the Cesium3DTileset to style features based on some externally managed maps. This was working fine with the old Model Code. The new Model Code now applies the style after calling tileVisible.
The documentation also states that The style is applied to a tile before the [Cesium3DTileset#tileVisible](https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileset.html#tileVisible) event is raised
the relevant code is the following in Cesium3DTileset.js raises the Event before Update. If i call update before tileVisible.raiseEvent it works as expected.
Thanks for the report @jbo023! Taking a quick look at this, it doesn't appear that the order of applyStyle and raising the tileVisible event has changed, but rather how model applies the style.
One solution would be to already apply the style to the tiles during processing.
I implemented this solution with the following commit: virtualcitySYSTEMS@97e72e7
But i am not sure what kind of different consequences this could have. Is this a valid approach, and should i open a Merge request ?
In practice, applyStyle just signals to the model that the style will need an update next frame, which will not happen if resources aren't loaded and the model is ready to be styled. So I don't believe the solution you provided here would hurt, but I am concerned this issue may be a symptom of a larger problem within the refactored model code.
We are using the tileVisible Event on the Cesium3DTileset to style features based on some externally managed maps. This was working fine with the old Model Code. The new Model Code now applies the style after calling tileVisible.
The documentation also states that
The style is applied to a tile before the [Cesium3DTileset#tileVisible](https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileset.html#tileVisible) event is raised
the relevant code is the following in Cesium3DTileset.js raises the Event before Update. If i call update before tileVisible.raiseEvent it works as expected.
Sandcastle example
The text was updated successfully, but these errors were encountered: