Hi all,
We’ve been using the Geometry object directly (see snippet below) to make custom 3D primitives. Recently we’ve upgraded from cesium version 1.0 to 1.6 and this causes Primitive.update to throw an error that “_workerName is not defined” on rendering.
Looking into this, I think there meant to be a worker defined to convert the specific type of geometry (eg. createBoxGeometry for BoxGeometry ) to the Geometry object type. As we are not using one of the specific Geometry types, there is no worker to convert it.
I can fix this by not using the workers and rendering the primitives synchronously, which would not be a good option. Alternatively, I’ve modified Geometry to have a _workerName and created a corresponding worker in Cesium, but this seems a temporary solution. Does anyone have any suggestions for a more permanent solution?
Thanks,
Brendan Studds
Current code;
var attributes = new GeometryAttributes({
position: new GeometryAttribute({
componentDatatype: ComponentDatatype.DOUBLE,
componentsPerAttribute: 3,
values: this._positions
})
});
var geometry = new Geometry({
attributes: attributes,
indices: this._indices,
primitiveType: PrimitiveType.TRIANGLES,
boundingSphere: BoundingSphere.fromVertices(this._positions)
});
var instance = new GeometryInstance({
id: id,
geometry: geometry,
attributes: {
color: color
}
});
var primitive = new Primitive({
geometryInstances: instance,
appearance: new PerInstanceColorAppearance({
flat: false,
translucent: false
})
});
``