Open shunter opened 7 years ago
Hi I'm new at cesium.
I'm using the ConstantProperty to update the value is set value is used. how to do it using definitionChanged?
My updating works like this:
var trailwall = { wall : { positions: [], material : Cesium.Color.RED.withAlpha(0.5), } } var trail = datasource.entities.add(trailwall);
// ... then inside a tick method
trail.wall.positions.setValue(newpositions(time))
@EKoetsjarjan I'm sorry, I don't understand your question. Please ask this question on the forum instead: https://groups.google.com/forum/?hl=en#!forum/cesium-dev
We use GitHub exclusively for tracking bugs and planning new features. A lot more people are on the forum, and your post might help someone else who has the same question. Members of our team also monitor the forum to make sure all questions get answered. Thanks!
ok thank you
I'd like to :+1: this, since it comes up so often, and even our own Sandcastle examples struggle with this. The drawing on terrain Sandcastle uses a CallbackProperty when drawing so it's smooth, but when switches to a static entity when done, which causes a very noticable flicker while the entity is being created asynchronously:
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Drawing%20on%20Terrain.html
Being able to say "I'd like this entity to be created synchronously if possible" would fix this.
This came up in https://github.com/CesiumGS/cesium/issues/11315 in regards to requestRenderMode
. The user would like the ability to perform value updates, but would still like the ability to not have to render every frame and evaluate the callback.
Any updates on the matter? Really interested on this one.
@Fedec96 There hasn't been any activity on this recently.
If you'd like to add more information about your use case, that may help us prioritize. If you are interesting in contributing, please let us know and we'd be happy to discuss implementation or review a PR. Thanks!
@ggetz Hi Gabby, thanks for confirming. I'm not even sure the issue I'm having is related, so I'll post a separate issue which maybe can help others. :)
This issue has been discussed many times, but I couldn't find an issue for it, so filing this for reference.
In many cases, using the entity layer to create geometry produces bad results, because all non-time varying geometry is created asynchronously, causing significant latency when updating due to the enormous overhead of the web workers.
Our current recommendation is to use
CallbackProperty
to work around this bug, (see related #4791) but this workaround has significant performance penalty - the callback is run every frame, and the updaters are built expecting the values to change every frame. For truly time-varying properties, this is desirable, but in many cases, the value doesn't vary with simulation time, but does change at unknown or unpredictable times - through user input perhaps, or via updates from a server. In these cases, thedefinitionChanged
event approach used byConstantProperty
is the right approach for efficiency.The real solution would be to provide a hint to declare that a particular graphics should always be created synchronously. Then the natural and obvious approach of simply assigning new values would work as expected.