Skip to content

Commit

Permalink
Fixes #6925
Browse files Browse the repository at this point in the history
  • Loading branch information
hpinkos committed Aug 16, 2018
1 parent 8ff642f commit 39225b2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
define([
'../Core/AssociativeArray',
'../Core/Color',
'../Core/ColorGeometryInstanceAttribute',
'../Core/defined',
'../Core/DistanceDisplayCondition',
'../Core/DistanceDisplayConditionGeometryInstanceAttribute',
Expand All @@ -13,6 +15,8 @@ define([
'./Property'
], function(
AssociativeArray,
Color,
ColorGeometryInstanceAttribute,
defined,
DistanceDisplayCondition,
DistanceDisplayConditionGeometryInstanceAttribute,
Expand All @@ -26,6 +30,7 @@ define([
Property) {
'use strict';

var scratchColor = new Color();
var distanceDisplayConditionScratch = new DistanceDisplayCondition();
var defaultDistanceDisplayCondition = new DistanceDisplayCondition();

Expand Down Expand Up @@ -195,6 +200,15 @@ define([
this.attributes.set(instance.id.id, attributes);
}

if (!updater.fillMaterialProperty.isConstant) {
var colorProperty = updater.fillMaterialProperty.color;
var resultColor = Property.getValueOrDefault(colorProperty, time, Color.WHITE, scratchColor);
if (!Color.equals(attributes._lastColor, resultColor)) {
attributes._lastColor = Color.clone(resultColor, attributes._lastColor);
attributes.color = ColorGeometryInstanceAttribute.toValue(resultColor, attributes.color);
}
}

var show = entity.isShowing && (updater.hasConstantFill || updater.isFilled(time));
var currentShow = attributes.show[0] === 1;
if (show !== currentShow) {
Expand Down

0 comments on commit 39225b2

Please sign in to comment.