Creating managing 3D shapes and update dimension dynamically

i am new to Cesium trying to figure out the best approach to add a bunch of 3d shapes and manage these the added entities (add, delete, edit dimension)

i went through some of examples in sandcastle however i am still not sure if this is an efficient way to resize a ellipsoid shape

i added an entity as follow:

>     entity = viewer.entities.add({
>                                      name: "entity1",
>                                      position: Cesium.Cartesian3.fromDegrees(lon, lat),
>                                      ellipsoid: {
>                                          radii: new Cesium.Cartesian3(500.0, 500.0, 1000.0),
>                                          maximumCone: Cesium.Math.PI_OVER_TWO,
>                                          material: Cesium.Color.BLUE.withAlpha(0.3),
>                                          outline: true,
>                                      },
> 
>                                  });

i want to update the radii values x,y and z based on the mouse courser screen position, so based on the mouse movement i keep updating the radii.

i couldn’t access radii x,y and z values separately to update the dimension based on the mouse movement.

any source code example handling/managing a list of 3d shapes in cesium ?

Hi @Student0002

ellipsoid

This Sandcastle demonstrates how you’d setup updates to an Entity using mouse inputs. To use this Sandcastle, click on the ellipsoid in the scene to select it. Then use mouse scroll to change its radii value.

Hope this helps,
Sam.

Hi Sam,

many thanks thats exactly what i need, it worked perfectly
another question that i couldnt find out the units used in radii Cartesian3 x,y and z is it in meter ?

Hi,

Distance units in the CesiumJS API are always meters, unless otherwise specified.