Skip to content

Commit

Permalink
Merge pull request #7053 from cleroux/master
Browse files Browse the repository at this point in the history
Fix entity show issues, issue #7048
  • Loading branch information
Hannah authored Sep 21, 2018
2 parents db69cb9 + 36bb4ec commit 5352b53
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 108 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* Fixed a bug where polylines on terrain covering very large portions of the globe would cull incorrectly in 3d-only scenes. [#7043](https://github.com/AnalyticalGraphicsInc/cesium/issues/7043)
* Fixed bug causing crash on entity geometry material change [#7047](https://github.com/AnalyticalGraphicsInc/cesium/pull/7047)

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,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)
21 changes: 1 addition & 20 deletions Source/DataSources/StaticGeometryColorBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ define([
var removedCount = 0;
var primitive = this.primitive;
var primitives = this.primitives;
var attributes;
var i;

if (this.createPrimitive) {
Expand All @@ -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)) {
Expand Down Expand Up @@ -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);
Expand Down
21 changes: 1 addition & 20 deletions Source/DataSources/StaticGeometryPerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 1 addition & 17 deletions Source/DataSources/StaticGroundGeometryColorBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ define([
var removedCount = 0;
var primitive = this.primitive;
var primitives = this.primitives;
var attributes;
var i;

if (this.createPrimitive) {
Expand All @@ -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,
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 1 addition & 17 deletions Source/DataSources/StaticGroundGeometryPerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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({
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 1 addition & 17 deletions Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 1 addition & 17 deletions Source/DataSources/StaticOutlineGeometryBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ define([
var removedCount = 0;
var primitive = this.primitive;
var primitives = this.primitives;
var attributes;
var i;

if (this.createPrimitive) {
Expand All @@ -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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5352b53

Please sign in to comment.