I was going through Cesium new release 1.22 and tried to implement its shadows feature. I minimized the sample code to following to know how it works.
var viewer = new Cesium.Viewer('cesiumContainer', {
shadows : true,
});
var woodTower = viewer.entities.add({
name : 'Wood Tower',
height : 0.0,
model : {
uri : 'SampleData/models/WoodTower/Wood_Tower.gltf'
}
});
var locations = {
Exton : {
longitude : -1.31968,
latitude : 0.698874,
height : 74.14210186070714,
date : 2457522.154792
},
};
woodTower.position = Cesium.Cartesian3.fromRadians(locations.Exton.longitude, locations.Exton.latitude, woodTower.height);
function setEntity(entity) {
viewer.trackedEntity = entity;
viewer.clock.currentTime = new Cesium.JulianDate(2457530.154792);
viewer.clock.multiplier = 1.0;
}
setEntity(woodTower);It works fine if 'Wood_Tower.gltf' is loaded, but does not work if I change it to :
var woodTower = viewer.entities.add({
name : 'Green1 extruded polygon',
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray([-109.0, 42.0,
-111.0, 42.0,
-112.0, 40.0]),
extrudedHeight: 500000.0,
material : Cesium.Color.GREEN
}
});What am I missing in it?
Any help is much appreciated!
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.