Skip to content

Commit

Permalink
Merge pull request #4961 from mortac8/wallPolylineOutlineFix
Browse files Browse the repository at this point in the history
Add outline to polyline walls
  • Loading branch information
mramato authored Feb 12, 2017
2 parents 34951f8 + 94412f9 commit aefc009
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Change Log
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`. [#4977](https://github.com/AnalyticalGraphicsInc/cesium/pull/4977)
* Added support to `DebugCameraPrimitive` to draw multifrustum planes. The attribute `debugShowFrustumPlanes` of `Scene` and `frustumPlanes` of `CesiumInspector` toggles this. `FrameState` has been augmented to include `frustumSplits` which is a `Number[]` of the near/far planes of the camera frustums.
* Enable rendering `GroundPrimitives` on hardware without the `EXT_frag_depth` extension; however, this could cause artifacts for certain viewing angles.
* Always outline KML line extrusions so that they show up properly in 2D and other straight down views.
* Added compressed texture support. [#4758](https://github.com/AnalyticalGraphicsInc/cesium/pull/4758)
* glTF models and imagery layers can now reference [KTX](https://www.khronos.org/opengles/sdk/tools/KTX/) textures and textures compressed with [crunch](https://github.com/BinomialLLC/crunch).
* Added `loadKTX`, to load KTX textures, and `loadCRN` to load crunch compressed textures.
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Ákos Maróy](https://github.com/akosmaroy)
* [Raytheon Intelligence and Information Systems](http://www.raytheon.com/)
* [David Hudlow](https://github.com/DavidHudlow)
* [Ashley Mort](https://github.com/mortac8)
* [Evax Software](http://www.evax.fr)
* [Evax Software](https://github.com/evax)
* [Aviture](http://aviture.us.com)
Expand Down
5 changes: 4 additions & 1 deletion Source/DataSources/KmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -1156,13 +1156,16 @@ define([

if (defined(polygon)) {
wall.fill = polygon.fill;
wall.outline = polygon.outline;
wall.material = polygon.material;
}

//Always outline walls so they show up in 2D.
wall.outline = true;
if (defined(polyline)) {
wall.outlineColor = defined(polyline.material) ? polyline.material.color : Color.WHITE;
wall.outlineWidth = polyline.width;
} else if (defined(polygon)) {
wall.outlineColor = defined(polygon.material) ? polygon.material.color : Color.WHITE;
}
} else {
if (dataSource._clampToGround && !canExtrude && tessellate) {
Expand Down
2 changes: 1 addition & 1 deletion Specs/DataSources/KmlDataSourceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ defineSuite([
expect(entity.wall.material).toBeInstanceOf(ColorMaterialProperty);
expect(entity.wall.material.color.getValue()).toEqual(uberPolyColor);
expect(entity.wall.fill.getValue()).toEqual(uberPolyFill);
expect(entity.wall.outline.getValue()).toEqual(uberPolyOutline);
expect(entity.wall.outline.getValue()).toEqual(true);
expect(entity.wall.outlineColor.getValue()).toEqual(uberLineColor);
expect(entity.wall.outlineWidth.getValue()).toEqual(uberLineWidth);

Expand Down

0 comments on commit aefc009

Please sign in to comment.