Hi all,
I need to hide a single geometry instance after batching. Please see the code example below. Is it possible to do this? Thanks in advance.
var instances = ;
for(i=0; i<10000; i++){
var instance = new GeometryInstance({
geometry: new RectangleGeometry({
rectangle: new Rectangle(
CesiumMath.toRadians(west),
CesiumMath.toRadians(south),
CesiumMath.toRadians(east),
CesiumMath.toRadians(north)
)
}),
attributes:{
color: ColorGeometryInstanceAttribute.fromColor(extentColor)
},
id: i
});
instances.push(instance);
}
var primitive = new Primitive({
geometryInstances: instances,
appearance: new PerInstanceColorAppearance(),
releaseGeometryInstances: false,
asynchronous: false
});
viewer.scene.primitives.add(primitive);
primitive.geometryInstances[0].show = false; //After batching, since I set releaseGeometryInstances to be false, I can do primitive.geometryInstances[0]. However, GeometryInstance doesn’t have a show property. How do I show or hide a single geometry instance?