|
Styling |
|
### Example: Styling of 3D building models by Specific Space Heating Demand.
|
|
\ No newline at end of file |
|
|
|
|
|

|
|
|
|
|
|
|
|
#### Example Script in Cesium.js JavaScript file
|
|
|
|
```javascript
|
|
|
|
// load 3D Tileset
|
|
|
|
tileset_3Dbuildings = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
|
|
url: '**link to 3D Tiles json**'
|
|
|
|
}));
|
|
|
|
// assign style
|
|
|
|
tileset.style = new Cesium.Cesium3DTileStyle({
|
|
|
|
show: true,
|
|
|
|
color: {
|
|
|
|
"conditions": [
|
|
|
|
['Number(${Specific_space_heating_demand})> 250', 'color("#d53e4f")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 200', 'color("#f46d43")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 150', 'color("#fdae61")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 125', 'color("#fee08b")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 100', 'color("#ffffbf")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 75', 'color("#e6f598")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 50', 'color("#abdda4")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 25', 'color("#66c2a5")'],
|
|
|
|
['Number(${Specific_space_heating_demand})>= 0', 'color("#3288bd")'],
|
|
|
|
['true', 'color("white",0)']
|
|
|
|
]
|
|
|
|
}
|
|
|
|
});
|
|
|
|
``` |
|
|
|
\ No newline at end of file |