From fdf63e7193b491f80a60e9e5acce8fed364b2d2b Mon Sep 17 00:00:00 2001 From: Pithon Kabiro <pithon.kabiro@hft-stuttgart.de> Date: Thu, 28 Oct 2021 11:05:45 +0200 Subject: [PATCH] New function: reset tileset styling --- public/js/appCesium.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public/js/appCesium.js b/public/js/appCesium.js index b522842..5cef36b 100644 --- a/public/js/appCesium.js +++ b/public/js/appCesium.js @@ -302,3 +302,17 @@ const activate3DTileFeaturePicking = function () { }; activate3DTileFeaturePicking(); + +/** + * Reset the styling for all buildings contained in a 3D tileset. The default colour is `white` + * + * @param {Object} targetTileset The 3D tileset to be styled + * @returns {undefined} undefined + */ +const resetStylingForAllBuildings = function (targetTileset) { + targetTileset.style = new Cesium.Cesium3DTileStyle({ + color: { + conditions: [["true", 'color("white")']], + }, + }); +}; -- GitLab