Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix entity show issues, issue #7048 #7053

Merged
merged 6 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)

### 1.49 - 2018-09-04
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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