Is there any way to scale Geometry Instances in Primitive preserving it's origins?


We have a use case where we need to render thousands of identical Geometries with different position and orientation, so for proper performance we use Primitive with Geometry Instances.

Such Geometries may be very close to each other or relatively far from each other, so we want to scale them depending on current distance from camera to it’s bounding sphere center, so the size of each individual geometry will allow us to recognize them.

There is a handy method setMatrixAt() in Three JS but unfortunately we haven’t found a way to change the modelMatrix of each individual GeometryInstance on the fly in Cesium JS.

So the question is - if it is possible to somehow scale Geometry Instances preserving it’s original positions? And if it’s not, are there any other options or workarounds, that community can advise?

Appriciate any help.

I found that it is possible to modify modelMatrix of ModelInstanceCollection instances . There is Sandcastle Example and it works just as needed.

Is there any chance to achieve the same with Primitive Geometry Instances ?