Hi,
I wonder what the state of the Dojo/CesiumViewerWidget class in the
batching branch is? In particular, should it be able to handle new types
of (geometry-based) primitives?
I seem to have an issue, with primitives that work with the 'simple'
CesiumWidget, but the very same doesn't work with CesiumViewerWidget.
for example:
var widget = new CesiumViewerWidget({});
widget.placeAt('cesiumContainer');
widget.startup();
var material = Cesium.Material.fromType(undefined,
Cesium.Material.ColorType);
material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 0.75);
var appearance = new Cesium.Appearance({
renderState : {
cull : {
enabled : false
},
depthTest : {
enabled : true
},
depthMask : false,
blending : Cesium.BlendingState.ALPHA_BLEND
},
material : material
});
var scene = widget.scene;
var ellipsoid = widget.centralBody.getEllipsoid();
var primitives = scene.getPrimitives();
// Create a simple polygon
var polygon = new Cesium.PolygonGeometry({
positions : ellipsoid.cartographicArrayToCartesianArray([
Cesium.Cartographic.fromDegrees(-72.0, 40.0),
Cesium.Cartographic.fromDegrees(-70.0, 35.0),
Cesium.Cartographic.fromDegrees(-75.0, 30.0),
Cesium.Cartographic.fromDegrees(-70.0, 30.0),
Cesium.Cartographic.fromDegrees(-68.0, 40.0)
]),
pickData : 'polygon1'
});
var primitive = new Cesium.Primitive({
geometries : [ polygon ],
appearance : appearance
});
primitives.add(primitive);
while the above code shows a polygon in a CesiumWidget, nothing is shown
in CesiumViewerWidget
what am I doing wrong?
Akos