1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| let city = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({url: Cesium.IonResource.fromAssetId(3839)}));
let heightStyle = new Cesium.Cesium3DTileStyle({ color: { conditions:[ ["${height} >= 300","rgba(45,0,75,0.5)"], ["${height} >= 200","rgb(102,71,151)"], ["${height} >= 100","rgb(170,162,204)"], ["${height} >= 50","rgb(60,102,204)"], ["${height} >= 20","rgb(190,102,84)"], ["${height} >= 10","rgb(155,80,164)"], ["true","rgb(170,162,204)"], ] } }); city.style = heightStyle;
|