Geometry dynamic modification

I recently updated our current version of cesium in VWF from r20 to r24. I added support for most all of the new Geometry objects, and I exposed many of the properties required to create the objects as properties. For instance in the BoxGeometry object, I’ve exposed the ‘dimensions’ property. My question is if that property is changed, do I need to recreate the BoxGeometry? Seems like the api doesn’t expose the internal properties in a way that should be set. When the geometry is created, I also have to create a GeometryInstance and a Primitive. Should I create all of the objects again, or is there a way to just swap out the geometry?

Scott

Scott,

With a custom Appearance you can do limited geometry modification, but the geometry system is optimized for a large amount of static data as described in the tutorial, which it sounds like you’ve already read. To change the actual geometry, we recreate the primitive; for example, see the Polygon source code. If you only have a few dozen or 100s of objects, using a primitive per object is fine. The geometry system is optimized for combing 10,000s or more objects into a single primitive, which is why it has limited update features.

Patrick