diff --git a/CHANGES.md b/CHANGES.md index 097cc7bac4a4..0ed2646824d6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ Change Log ##### Fixes :wrench: * `Camera.flyTo` flies to the correct location in 2D when the destination crosses the international date line [#7909](https://github.com/AnalyticalGraphicsInc/cesium/pull/7909) +* Fixed 3D tiles style coloring when multiple tilesets are in the scene [#8051](https://github.com/AnalyticalGraphicsInc/cesium/pull/8051) * Improved display of tile coordinates for `TileCoordinatesImageryProvider` [#8131](https://github.com/AnalyticalGraphicsInc/cesium/pull/8131) ### 1.61 - 2019-09-03 diff --git a/Source/Scene/Batched3DModel3DTileContent.js b/Source/Scene/Batched3DModel3DTileContent.js index 7429d7cf2c5b..acaa717f3f17 100644 --- a/Source/Scene/Batched3DModel3DTileContent.js +++ b/Source/Scene/Batched3DModel3DTileContent.js @@ -449,13 +449,11 @@ define([ } }; - var scratchColor = new Color(); - Batched3DModel3DTileContent.prototype.applyStyle = function(style) { if (this.featuresLength === 0) { var hasColorStyle = defined(style) && defined(style.color); var hasShowStyle = defined(style) && defined(style.show); - this._model.color = hasColorStyle ? style.color.evaluateColor(undefined, scratchColor) : Color.WHITE; + this._model.color = hasColorStyle ? style.color.evaluateColor(undefined, this._model.color) : Color.clone(Color.WHITE, this._model.color); this._model.show = hasShowStyle ? style.show.evaluate(undefined) : true; } else { this._batchTable.applyStyle(style); diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js index f7a69ff5ff7e..0f04998aea38 100644 --- a/Source/Scene/Model.js +++ b/Source/Scene/Model.js @@ -515,8 +515,7 @@ define([ * * @default Color.WHITE */ - this.color = defaultValue(options.color, Color.WHITE); - this._color = new Color(); + this.color = Color.clone(defaultValue(options.color, Color.WHITE)); this._colorPreviousAlpha = 1.0; /**