From 07b9130f88dfdc3fc955115e7760994567e1296d Mon Sep 17 00:00:00 2001 From: cleroux Date: Wed, 19 Sep 2018 21:09:19 -0700 Subject: [PATCH 1/5] Fix entity show issues --- .../DataSources/StaticGeometryColorBatch.js | 21 +------------------ .../StaticGeometryPerMaterialBatch.js | 21 +------------------ .../StaticGroundGeometryColorBatch.js | 18 +--------------- .../StaticGroundGeometryPerMaterialBatch.js | 18 +--------------- .../StaticGroundPolylinePerMaterialBatch.js | 18 +--------------- .../DataSources/StaticOutlineGeometryBatch.js | 18 +--------------- 6 files changed, 6 insertions(+), 108 deletions(-) diff --git a/Source/DataSources/StaticGeometryColorBatch.js b/Source/DataSources/StaticGeometryColorBatch.js index 9296b520d4a1..84ef60792282 100644 --- a/Source/DataSources/StaticGeometryColorBatch.js +++ b/Source/DataSources/StaticGeometryColorBatch.js @@ -117,7 +117,6 @@ define([ var removedCount = 0; var primitive = this.primitive; var primitives = this.primitives; - var attributes; var i; if (this.createPrimitive) { @@ -132,24 +131,6 @@ define([ } } - for (i = 0; i < geometriesLength; i++) { - var geometryItem = geometries[i]; - var originalAttributes = geometryItem.attributes; - attributes = this.attributes.get(geometryItem.id.id); - - if (defined(attributes)) { - if (defined(originalAttributes.show)) { - attributes.show = originalAttributes.show.value; - } - if (defined(originalAttributes.color)) { - attributes.color = originalAttributes.color.value; - } - if (defined(originalAttributes.depthFailColor)) { - attributes.depthFailColor = originalAttributes.depthFailColor.value; - } - } - } - var depthFailAppearance; if (defined(this.depthFailAppearanceType)) { if (defined(this.depthFailMaterialProperty)) { @@ -210,7 +191,7 @@ define([ var updater = updatersWithAttributes[i]; var instance = this.geometry.get(updater.id); - attributes = this.attributes.get(instance.id.id); + var attributes = this.attributes.get(instance.id.id); if (!defined(attributes)) { attributes = primitive.getGeometryInstanceAttributes(instance.id); this.attributes.set(instance.id.id, attributes); diff --git a/Source/DataSources/StaticGeometryPerMaterialBatch.js b/Source/DataSources/StaticGeometryPerMaterialBatch.js index c11ba307793f..4c30935ca07a 100644 --- a/Source/DataSources/StaticGeometryPerMaterialBatch.js +++ b/Source/DataSources/StaticGeometryPerMaterialBatch.js @@ -115,7 +115,6 @@ define([ var primitive = this.primitive; var primitives = this.primitives; var geometries = this.geometry.values; - var attributes; var i; if (this.createPrimitive) { @@ -129,24 +128,6 @@ define([ } } - for (i = 0; i < geometriesLength; i++) { - var geometry = geometries[i]; - var originalAttributes = geometry.attributes; - attributes = this.attributes.get(geometry.id.id); - - if (defined(attributes)) { - if (defined(originalAttributes.show)) { - attributes.show = originalAttributes.show.value; - } - if (defined(originalAttributes.color)) { - attributes.color = originalAttributes.color.value; - } - if (defined(originalAttributes.depthFailColor)) { - attributes.depthFailColor = originalAttributes.depthFailColor.value; - } - } - } - this.material = MaterialProperty.getValue(time, this.materialProperty, this.material); var depthFailAppearance; @@ -211,7 +192,7 @@ define([ var entity = updater.entity; var instance = this.geometry.get(updater.id); - attributes = this.attributes.get(instance.id.id); + var attributes = this.attributes.get(instance.id.id); if (!defined(attributes)) { attributes = primitive.getGeometryInstanceAttributes(instance.id); this.attributes.set(instance.id.id, attributes); diff --git a/Source/DataSources/StaticGroundGeometryColorBatch.js b/Source/DataSources/StaticGroundGeometryColorBatch.js index 8c4ca9e648b0..a64f22868263 100644 --- a/Source/DataSources/StaticGroundGeometryColorBatch.js +++ b/Source/DataSources/StaticGroundGeometryColorBatch.js @@ -84,7 +84,6 @@ define([ var removedCount = 0; var primitive = this.primitive; var primitives = this.primitives; - var attributes; var i; if (this.createPrimitive) { @@ -99,21 +98,6 @@ define([ } } - for (i = 0; i < geometriesLength; i++) { - var geometryItem = geometries[i]; - var originalAttributes = geometryItem.attributes; - attributes = this.attributes.get(geometryItem.id.id); - - if (defined(attributes)) { - if (defined(originalAttributes.show)) { - attributes.show = originalAttributes.show.value; - } - if (defined(originalAttributes.color)) { - attributes.color = originalAttributes.color.value; - } - } - } - primitive = new GroundPrimitive({ show : false, asynchronous : true, @@ -151,7 +135,7 @@ define([ var updater = updatersWithAttributes[i]; var instance = this.geometry.get(updater.id); - attributes = this.attributes.get(instance.id.id); + var attributes = this.attributes.get(instance.id.id); if (!defined(attributes)) { attributes = primitive.getGeometryInstanceAttributes(instance.id); this.attributes.set(instance.id.id, attributes); diff --git a/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js b/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js index 889aeb9ea292..996fc404a689 100644 --- a/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +++ b/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js @@ -117,7 +117,6 @@ define([ var primitive = this.primitive; var primitives = this.primitives; var geometries = this.geometry.values; - var attributes; var i; if (this.createPrimitive) { @@ -133,21 +132,6 @@ define([ } } - for (i = 0; i < geometriesLength; i++) { - var geometry = geometries[i]; - var originalAttributes = geometry.attributes; - attributes = this.attributes.get(geometry.id.id); - - if (defined(attributes)) { - if (defined(originalAttributes.show)) { - attributes.show = originalAttributes.show.value; - } - if (defined(originalAttributes.color)) { - attributes.color = originalAttributes.color.value; - } - } - } - this.material = MaterialProperty.getValue(time, this.materialProperty, this.material); primitive = new GroundPrimitive({ @@ -195,7 +179,7 @@ define([ var entity = updater.entity; var instance = this.geometry.get(updater.id); - attributes = this.attributes.get(instance.id.id); + var attributes = this.attributes.get(instance.id.id); if (!defined(attributes)) { attributes = primitive.getGeometryInstanceAttributes(instance.id); this.attributes.set(instance.id.id, attributes); diff --git a/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js b/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js index f5df9d4d540e..668fbf1b7aec 100644 --- a/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +++ b/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js @@ -116,7 +116,6 @@ define([ var primitive = this.primitive; var orderedGroundPrimitives = this.orderedGroundPrimitives; var geometries = this.geometry.values; - var attributes; var i; if (this.createPrimitive) { @@ -132,21 +131,6 @@ define([ } } - for (i = 0; i < geometriesLength; i++) { - var geometry = geometries[i]; - var originalAttributes = geometry.attributes; - attributes = this.attributes.get(geometry.id.id); - - if (defined(attributes)) { - if (defined(originalAttributes.show)) { - attributes.show = originalAttributes.show.value; - } - if (defined(originalAttributes.color)) { - attributes.color = originalAttributes.color.value; - } - } - } - primitive = new GroundPolylinePrimitive({ show : false, asynchronous : true, @@ -194,7 +178,7 @@ define([ var entity = updater.entity; var instance = this.geometry.get(updater.id); - attributes = this.attributes.get(instance.id.id); + var attributes = this.attributes.get(instance.id.id); if (!defined(attributes)) { attributes = primitive.getGeometryInstanceAttributes(instance.id); this.attributes.set(instance.id.id, attributes); diff --git a/Source/DataSources/StaticOutlineGeometryBatch.js b/Source/DataSources/StaticOutlineGeometryBatch.js index 635e048437c7..4836522d3ec6 100644 --- a/Source/DataSources/StaticOutlineGeometryBatch.js +++ b/Source/DataSources/StaticOutlineGeometryBatch.js @@ -87,7 +87,6 @@ define([ var removedCount = 0; var primitive = this.primitive; var primitives = this.primitives; - var attributes; var i; if (this.createPrimitive) { @@ -102,21 +101,6 @@ define([ } } - for (i = 0; i < geometriesLength; i++) { - var geometryItem = geometries[i]; - var originalAttributes = geometryItem.attributes; - attributes = this.attributes.get(geometryItem.id.id); - - if (defined(attributes)) { - if (defined(originalAttributes.show)) { - attributes.show = originalAttributes.show.value; - } - if (defined(originalAttributes.color)) { - attributes.color = originalAttributes.color.value; - } - } - } - primitive = new Primitive({ show : false, asynchronous : true, @@ -163,7 +147,7 @@ define([ var updater = updatersWithAttributes[i]; var instance = this.geometry.get(updater.id); - attributes = this.attributes.get(instance.id.id); + var attributes = this.attributes.get(instance.id.id); if (!defined(attributes)) { attributes = primitive.getGeometryInstanceAttributes(instance.id); this.attributes.set(instance.id.id, attributes); From 6552ddeac62ce5e3bc94f95a3e39e5e609be0db8 Mon Sep 17 00:00:00 2001 From: cleroux Date: Wed, 19 Sep 2018 21:21:35 -0700 Subject: [PATCH 2/5] Fix entity show issues #7048 --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 33dac703cafb..fb1d4edf56a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ Change Log * Fixed an issue in the 3D Tiles traversal where empty tiles would be selected instead of their nearest loaded ancestors. [#7011](https://github.com/AnalyticalGraphicsInc/cesium/pull/7011) * Fixed an issue where scaling near zero with an model animation could cause rendering to stop. [#6954](https://github.com/AnalyticalGraphicsInc/cesium/pull/6954) * Fixed bug where credits weren't displaying correctly if more than one viewer was initialized [#6965](expect(https://github.com/AnalyticalGraphicsInc/cesium/issues/6965) +* Fixed entity show issues[#7048](https://github.com/AnalyticalGraphicsInc/cesium/issues/7048) ### 1.49 - 2018-09-04 From 11298d63669e8a2fa82cf6e234b7e55aed405f1f Mon Sep 17 00:00:00 2001 From: cleroux Date: Wed, 19 Sep 2018 21:27:00 -0700 Subject: [PATCH 3/5] Revert "Fix entity show issues #7048" This reverts commit 6552ddeac62ce5e3bc94f95a3e39e5e609be0db8. --- CHANGES.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index fb1d4edf56a7..33dac703cafb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,7 +17,6 @@ Change Log * Fixed an issue in the 3D Tiles traversal where empty tiles would be selected instead of their nearest loaded ancestors. [#7011](https://github.com/AnalyticalGraphicsInc/cesium/pull/7011) * Fixed an issue where scaling near zero with an model animation could cause rendering to stop. [#6954](https://github.com/AnalyticalGraphicsInc/cesium/pull/6954) * Fixed bug where credits weren't displaying correctly if more than one viewer was initialized [#6965](expect(https://github.com/AnalyticalGraphicsInc/cesium/issues/6965) -* Fixed entity show issues[#7048](https://github.com/AnalyticalGraphicsInc/cesium/issues/7048) ### 1.49 - 2018-09-04 From 7c01bc5aa182d97a4e890e54f23ceb761280b9cf Mon Sep 17 00:00:00 2001 From: cleroux Date: Wed, 19 Sep 2018 21:41:34 -0700 Subject: [PATCH 4/5] Add fix for entity show issues #7048 --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 33dac703cafb..9e2c962fb5bb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ Change Log * Fixed an issue in the 3D Tiles traversal where empty tiles would be selected instead of their nearest loaded ancestors. [#7011](https://github.com/AnalyticalGraphicsInc/cesium/pull/7011) * Fixed an issue where scaling near zero with an model animation could cause rendering to stop. [#6954](https://github.com/AnalyticalGraphicsInc/cesium/pull/6954) * Fixed bug where credits weren't displaying correctly if more than one viewer was initialized [#6965](expect(https://github.com/AnalyticalGraphicsInc/cesium/issues/6965) +* Fixed entity show issues. [#7048](https://github.com/AnalyticalGraphicsInc/cesium/issues/7048) ### 1.49 - 2018-09-04 From 8ffa22fcaf6b1e0d2c274b3d06156e589052e46a Mon Sep 17 00:00:00 2001 From: cleroux Date: Wed, 19 Sep 2018 22:04:05 -0700 Subject: [PATCH 5/5] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 05ea54f574a3..c5abde832db5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -190,3 +190,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Mark Erikson](https://github.com/markerikson) * [Hannah Bollar](https://github.com/hanbollar) * [Felix Palmer](https://github.com/felixpalmer) +* [Cedric Le Roux](https://github.com/cleroux)