Hi,
I'm trying to use the WallGeometry object, which I contributed earlier
to the batching branch. I was told that batching has been merged to
master, so I'm now trying to use WallGeometry in the master branch. but,
it seems to make Cesium hang
what I'm trying is either simply:
var positions = [
Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0),
Cesium.Cartographic.fromDegrees(19.0, 48.0, 10000.0),
Cesium.Cartographic.fromDegrees(20.0, 48.0, 10000.0),
Cesium.Cartographic.fromDegrees(20.0, 47.0, 10000.0),
Cesium.Cartographic.fromDegrees(19.0, 47.0, 10000.0)
];
// create a wall that spans from ground level to 10000 meters
var wall = new Cesium.WallGeometry({
positions :
Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions)
});
viewer.scene.getPrimitives().add(wall);
or with a primitive:
var material = Cesium.Material.fromType(options.context, 'Color');
material.uniforms.color = new Cesium.Color(1, 1, 0, 0.4);
var appearance = new Cesium.MaterialAppearance({
renderState : {
cull : {
enabled : false
},
depthTest : {
enabled : true
},
depthMask : false,
blending : Cesium.BlendingState.ALPHA_BLEND
},
faceForward : true,
translucent : true,
material : material
});
var primitive = new Cesium.Primitive({
geometryInstances : wall,
appearance : appearance
});
viewer.scene.getPrimitives().add(primitive);
in both cases, Cesium will hang on the getPrimitives().add() call
what am I doing wrong?
Akos