Updating position of SVG elements

What is exactly the proper way to attach a SVG element to any Cesium primitive?

Currently I’m creating a div dynamically, then I put the SVG content inside.
This is followed by creating a new Javascript timer, which calls a function that calculates the screen space position of the Primitive to who I attached the div, and changing the div screen position, thus making the div/SVG follow the primitive on the screen.

However this solution causes a visible lag, in which the SVG elements move “behind” the 3d Primitives.
Increasing the timer frequency is not enough, ideally I should update the div position every time the camera moves, what is the correct way to do this?

See this thread: https://groups.google.com/d/msg/cesium-dev/UZOXHfNFkbA/iDn3idmzTeYJ

The same thing applies for SVG that applies for HTML. You probably want to listen to the scene.preRender event.

Thanks, that seems it! :slight_smile: