Skip to content

Commit

Permalink
Fix polyline distance display condition bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
bagnell committed May 4, 2017
1 parent b1731c4 commit d07420f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Source/Scene/PolylineCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ define([
Cesium.Cartographic.fromDegrees(-77.02, 38.53)]),
* width : 1
* });
*
*
* @see PolylineCollection#remove
* @see PolylineCollection#removeAll
* @see PolylineCollection#update
Expand Down Expand Up @@ -276,7 +276,7 @@ define([
* @example
* var p = polylines.add(...);
* polylines.remove(p); // Returns true
*
*
* @see PolylineCollection#add
* @see PolylineCollection#removeAll
* @see PolylineCollection#update
Expand Down Expand Up @@ -313,7 +313,7 @@ define([
* polylines.add(...);
* polylines.add(...);
* polylines.removeAll();
*
*
* @see PolylineCollection#add
* @see PolylineCollection#remove
* @see PolylineCollection#update
Expand Down Expand Up @@ -502,7 +502,7 @@ define([
var distanceDisplayCondition = polyline.distanceDisplayCondition;
if (defined(distanceDisplayCondition)) {
nearFarCartesian.x = distanceDisplayCondition.near;
nearFarCartesian.x = distanceDisplayCondition.far;
nearFarCartesian.y = distanceDisplayCondition.far;
}

this._batchTable.setBatchedAttribute(polyline._index, 4, nearFarCartesian);
Expand Down Expand Up @@ -735,7 +735,7 @@ define([
*
* @example
* polylines = polylines && polylines.destroy();
*
*
* @see PolylineCollection#isDestroyed
*/
PolylineCollection.prototype.destroy = function() {
Expand Down
8 changes: 4 additions & 4 deletions Source/Shaders/PolylineVS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ varying vec2 v_st;
varying float v_width;
varying vec4 czm_pickColor;

void main()
void main()
{
float texCoord = texCoordExpandAndBatchIndex.x;
float expandDir = texCoordExpandAndBatchIndex.y;
Expand All @@ -33,7 +33,7 @@ void main()
}

vec4 pickColor = batchTable_getPickColor(batchTableIndex);

vec4 p, prev, next;
if (czm_morphTime == 1.0)
{
Expand Down Expand Up @@ -88,10 +88,10 @@ void main()
show = 0.0;
}
#endif

vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev);
gl_Position = czm_viewportOrthographic * positionWC * show;

v_st = vec2(texCoord, clamp(expandDir, 0.0, 1.0));
v_width = width;
czm_pickColor = pickColor;
Expand Down

0 comments on commit d07420f

Please sign in to comment.