Skip to content

Commit

Permalink
Merge branch '3d-tiles-transform' into 3d-tiles-proximity
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Aug 25, 2016
2 parents 8e0ad5d + b05417e commit 99f4985
Show file tree
Hide file tree
Showing 214 changed files with 7,722 additions and 4,877 deletions.
4 changes: 3 additions & 1 deletion Apps/Sandcastle/gallery/3D Tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
name : 'Batched', url : '../../../Specs/Data/Cesium3DTiles/Batched/BatchedWithBatchTable/'
}, {
name : 'Instanced', url : '../../../Specs/Data/Cesium3DTiles/Instanced/InstancedWithBatchTable/'
}, {
name : 'Instanced/Orientation', url : '../../../Specs/Data/Cesium3DTiles/Instanced/InstancedOrientationWithBatchTable/'
}, {
name : 'Composite', url : '../../../Specs/Data/Cesium3DTiles/Composite/Composite/'
}, {
Expand All @@ -65,7 +67,7 @@
maximumNumberOfLoadedTiles : 3
}));

return Cesium.when(tileset.readyPromise).then(function(tileset) {
return tileset.readyPromise.then(function(tileset) {
var boundingSphere = tileset.boundingSphere;
viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0, -2.0, 0));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
Expand Down
83 changes: 52 additions & 31 deletions Apps/Sandcastle/gallery/Shadows.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
infoBox : false,
selectionIndicator : false,
shadows : true,
terrainShadows : true
terrainShadows : Cesium.ShadowMode.ENABLED
});

viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
Expand Down Expand Up @@ -85,6 +85,46 @@
}
});

var boxEntity = viewer.entities.add({
name : 'Box',
height : 10.0,
box : {
dimensions : new Cesium.Cartesian3(10.0, 10.0, 10.0),
material : Cesium.Color.RED,
shadows : Cesium.ShadowMode.ENABLED
}
});

var checkerMaterial = new Cesium.CheckerboardMaterialProperty({
evenColor : Cesium.Color.RED.withAlpha(0.5),
oddColor : Cesium.Color.RED.withAlpha(0.0),
repeat : new Cesium.Cartesian2(5.0, 10.0)
});

var checkerEntity = viewer.entities.add({
name : 'Checkered Box',
height : 10.0,
box : {
dimensions : new Cesium.Cartesian3(10.0, 10.0, 10.0),
material : checkerMaterial,
outline : true,
outlineColor : Cesium.Color.RED,
shadows : Cesium.ShadowMode.ENABLED
}
});

var sphereEntity = viewer.entities.add({
name : 'Sphere',
height : 20.0,
ellipsoid : {
radii : new Cesium.Cartesian3(15.0, 15.0, 15.0),
material : Cesium.Color.BLUE.withAlpha(0.5),
slicePartitions : 24,
stackPartitions : 36,
shadows : Cesium.ShadowMode.ENABLED
}
});

var locations = {
Exton : {
longitude : -1.31968,
Expand Down Expand Up @@ -190,8 +230,18 @@
viewer.shadows = !viewer.shadows;
});

var entityShadows = Cesium.ShadowMode.ENABLED;
Sandcastle.addToolbarButton('Toggle Entity Shadows', function() {
entityShadows = (entityShadows === Cesium.ShadowMode.ENABLED) ? Cesium.ShadowMode.DISABLED : Cesium.ShadowMode.ENABLED;
for (i = 0; i < entitiesLength; ++i) {
var entity = entities[i];
var visual = entity.model || entity.box || entity.ellipsoid;
visual.shadows = entityShadows;
}
});

Sandcastle.addToolbarButton('Toggle Terrain Shadows', function() {
viewer.terrainShadows = !viewer.terrainShadows;
viewer.terrainShadows = (viewer.terrainShadows === Cesium.ShadowMode.ENABLED) ? Cesium.ShadowMode.DISABLED : Cesium.ShadowMode.ENABLED;
});

Sandcastle.addToolbarButton('Soft Shadows', function() {
Expand Down Expand Up @@ -220,35 +270,6 @@
}
}]);

function setShadows(castShadows, receiveShadows) {
for (i = 0; i < entitiesLength; ++i) {
entities[i].model.castShadows = castShadows;
entities[i].model.receiveShadows = receiveShadows;
}
}

Sandcastle.addToolbarMenu([{
text : 'Entity Shadows',
onselect : function() {
setShadows(true, true);
}
}, {
text : 'Cast Only',
onselect : function() {
setShadows(true, false);
}
}, {
text : 'Receive Only',
onselect : function() {
setShadows(false, true);
}
}, {
text : 'Off',
onselect : function() {
setShadows(false, false);
}
}]);

setLocation(locations.Exton);
setEntity(cesiumAir);

Expand Down
20 changes: 10 additions & 10 deletions Apps/Sandcastle/gallery/development/Shadows.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@
// Force all derived commands to update
shadowMap.dirty = true;

globe.castShadows = viewModel.terrainCast;
globe.receiveShadows = viewModel.terrainReceive;
globe.shadows = Cesium.ShadowMode.fromCastReceive(viewModel.terrainCast, viewModel.terrainReceive);
globe.show = viewModel.globe;
scene.skyAtmosphere.show = viewModel.globe;
}
Expand Down Expand Up @@ -654,8 +653,7 @@
}),
asynchronous : false,
rtcCenter : boxGeometry.boundingSphere.center,
castShadows : true,
receiveShadows : true
shadows : Cesium.ShadowMode.ENABLED
});

scene.primitives.add(box);
Expand All @@ -680,8 +678,7 @@
closed : true
}),
asynchronous : false,
castShadows : true,
receiveShadows : true
shadows : Cesium.ShadowMode.ENABLED
});

scene.primitives.add(box);
Expand All @@ -706,8 +703,7 @@
closed : true
}),
asynchronous : false,
castShadows : true,
receiveShadows : true
shadows : Cesium.ShadowMode.ENABLED
});

scene.primitives.add(sphere);
Expand All @@ -726,15 +722,19 @@
handler.setInputAction(function(movement) {
var picked = scene.pick(movement.position);
if (Cesium.defined(picked) && Cesium.defined(picked.primitive)) {
picked.primitive.castShadows = !picked.primitive.castShadows;
var castShadows = Cesium.ShadowMode.castShadows(picked.primitive.shadows);
var receiveShadows = Cesium.ShadowMode.receiveShadows(picked.primitive.shadows);
picked.primitive.shadows = Cesium.ShadowMode.fromCastReceive(!castShadows, receiveShadows);
}
}, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);

// Double middle click object to turn receiveShadows on/off
handler.setInputAction(function(movement) {
var picked = scene.pick(movement.position);
if (Cesium.defined(picked)) {
picked.primitive.receiveShadows = !picked.primitive.receiveShadows;
var castShadows = Cesium.ShadowMode.castShadows(picked.primitive.shadows);
var receiveShadows = Cesium.ShadowMode.receiveShadows(picked.primitive.shadows);
picked.primitive.shadows = Cesium.ShadowMode.fromCastReceive(castShadows, !receiveShadows);
}
}, Cesium.ScreenSpaceEventType.MIDDLE_DOUBLE_CLICK);

Expand Down
31 changes: 27 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,38 @@ Change Log
* `Cesium3DTileContent`
* `Cesium3DTileFeature`

### 1.25 - 2016-09-01
* Breaking changes
* Number and order of arguments passed to `KmlDataSource` `unsupportedNodeEvent` listeners have changed to allow better handling of unsupported KML Features.
* Deprecated
* Deprecated `castShadows` and `receiveShadows` properties from `Model`, `Primitive`, and `Globe`. They will be removed in 1.26. Use `shadows` instead with the `ShadowMode` enum, e.g. `model.shadows = ShadowMode.ENABLED`.
* `Viewer.terrainShadows` now uses the `ShadowMode` enum instead of a Boolean, e.g. `viewer.terrainShadows = ShadowMode.RECEIVE_ONLY`. Boolean support will be dropped in 1.26.
* Updated the online [model converter](http://cesiumjs.org/convertmodel.html) to convert OBJ models to glTF with [obj2gltf](https://github.com/AnalyticalGraphicsInc/OBJ2GLTF), as well as optimize existing glTF models with the [gltf-pipeline](https://github.com/AnalyticalGraphicsInc/gltf-pipeline). Also added an option to compress geometry using the glTF [WEB3D_quantized_attributes](https://github.com/KhronosGroup/glTF/blob/master/extensions/Vendor/WEB3D_quantized_attributes/README.md) extension.
* Added `shadows` property to the entity API for `Box`, `Corridor`, `Cylinder`, `Ellipse`, `Ellipsoid`, `Polygon`, `Polyline`, `PoylineVolume`, `Rectangle`, and `Wall`. [#4005](https://github.com/AnalyticalGraphicsInc/cesium/pull/4005)
* Fixed an issue causing error if KML has a clamped to ground LineString with color. [#4131](https://github.com/AnalyticalGraphicsInc/cesium/issues/4131)
* Added logic to `KmlDataSource` defaulting KML Feature node to hidden unless all ancestors are visible. This better matches the KML specification.
* Camera flights now disable collision with the terrain until all of the terrain in the area has finished loading. This prevents the camera from being moved to be above lower resolution terrain when flying to a position close to higher resolution terrain. [#4075](https://github.com/AnalyticalGraphicsInc/cesium/issues/4075)
* Added support for Int32 and Uint32 in ComponentDatatypeSpec.
* Added `GeocoderViewModel.keepExpanded` which when set to true will always keep the GeoCoder in its expanded state.


### 1.24 - 2016-08-01

* Fixed a crash that would occur when switching to 2D view when shadows are enabled. [#4051](https://github.com/AnalyticalGraphicsInc/cesium/issues/4051)
* Added support in CZML for expressing `BillboardGraphics.alignedAxis` as the velocity vector of an entity, using `velocityReference` syntax.
* Added `urlSchemeZeroPadding` property to `UrlTemplateImageryProvider` to allow the numeric parts of a URL, such as `{x}`, to be padded with zeros to make them a fixed width.
* Added leap second just prior to January 2017. [#4092](https://github.com/AnalyticalGraphicsInc/cesium/issues/4092)
* Fixed an exception that would occur when switching to 2D view when shadows are enabled. [#4051](https://github.com/AnalyticalGraphicsInc/cesium/issues/4051)
* Fixed an issue causing entities to disappear when updating multiple entities simultaneously. [#4096](https://github.com/AnalyticalGraphicsInc/cesium/issues/4096)
* Normalizing the velocity vector produced by `VelocityVectorProperty` is now optional.
* Pack functions now return the result array [#4156](https://github.com/AnalyticalGraphicsInc/cesium/pull/4156)
* Added optional `rangeMax` parameter to `Math.toSNorm` and `Math.fromSNorm`. [#4121](https://github.com/AnalyticalGraphicsInc/cesium/pull/4121)
* Removed `MapQuest OpenStreetMap` from the list of demo base layers since direct tile access has been discontinued. See the [MapQuest Developer Blog](http://devblog.mapquest.com/2016/06/15/modernization-of-mapquest-results-in-changes-to-open-tile-access/) for details.
* Fixed PolylinePipeline.generateArc to accept an array of heights when there's only one position [#4155](https://github.com/AnalyticalGraphicsInc/cesium/pull/4155)

### 1.23 - 2016-07-01

* Breaking changes
* `GroundPrimitive.initializeTerrainHeights()` must be called and have the returned promise resolve before a `GroundPrimitive` can be added syncronously.
* `GroundPrimitive.initializeTerrainHeights()` must be called and have the returned promise resolve before a `GroundPrimitive` can be added synchronously.
* Added terrain clamping to entities, KML, and GeoJSON
* Added `heightReference` property to point, billboard and model entities.
* Changed corridor, ellipse, polygon and rectangle entities to conform to terrain by using a `GroundPrimitive` if its material is a `ColorMaterialProperty` instance and it doesn't have a `height` or `extrudedHeight`. Entities with any other type of material are not clamped to terrain.
Expand All @@ -31,8 +55,7 @@ Change Log
* Improved performance and accuracy of polygon triangulation by using the [earcut](https://github.com/mapbox/earcut) library. Loading a GeoJSON with polygons for each country was 2x faster.
* Fix some large polygon triangulations. [#2788](https://github.com/AnalyticalGraphicsInc/cesium/issues/2788)
* Added support for the glTF extension [WEB3D_quantized_attributes](https://github.com/KhronosGroup/glTF/blob/master/extensions/Vendor/WEB3D_quantized_attributes/README.md). [#3241](https://github.com/AnalyticalGraphicsInc/cesium/issues/3241)
* Updated the online [model converter](http://cesiumjs.org/convertmodel.html) to convert OBJ model to glTF with [obj2gltf](https://github.com/AnalyticalGraphicsInc/OBJ2GLTF), as well as optimize existing glTF models with the [gltf-pipeline](https://github.com/AnalyticalGraphicsInc/gltf-pipeline).
* Added CZML support for `Box`, `Corridor` and `Cylinder`. Added new CZML properties:
* Added CZML support for `Box`, `Corridor` and `Cylinder`. Added new CZML properties:
* `Billboard`: `width`, `height`, `heightReference`, `scaleByDistance`, `translucencyByDistance`, `pixelOffsetScaleByDistance`, `imageSubRegion`
* `Label`: `heightReference`, `translucencyByDistance`, `pixelOffsetScaleByDistance`
* `Model`: `heightReference`, `maximumScale`
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Thanks for contributing to Cesium. You rock! Are you
* [getting started contributing](#getting-started-contributing), or
* [opening a pull request](#opening-a-pull-request)?

To ensure an inclusive community, contributors and users in the Cesium community should follow the [code of conduct](#code-of-conduct).

# Submitting an Issue

If you have a question, do not submit an issue; instead, search the [Cesium forum](http://cesiumjs.org/forum.html). The forum is very active and there are years of informative archives, often with answers from the core Cesium team. If you do not find an answer to your question, start a new thread and you'll likely get a quick response.
Expand Down Expand Up @@ -76,3 +78,9 @@ Our code is our lifeblood so maintaining Cesium's high code quality is important
* Include reference documentation with code examples. Follow the [Documentation Guide](Documentation/Contributors/DocumentationGuide/README.md).
* If the change is significant, add a new [Sandcastle](http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html) example or extend and existing one.
* If you added third-party libraries, including new version of existing libraries, update [LICENSE.md](LICENSE.md). Mention it in [CHANGES.md](CHANGES.md). If you plan to add a third-party library, start a new thread on the [Cesium forum](http://cesiumjs.org/forum.html) first.

# Code of Conduct

One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](http://contributor-covenant.org/)'s [Code of Conduct](http://contributor-covenant.org/version/1/4/code_of_conduct.md) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentiality sent to the core team at pcozzi@agi.com.

This applies to the main Cesium repo, forum, twitter, and all channels, including all repos in the [AnalyticalGraphicsInc](https://github.com/AnalyticalGraphicsInc) GitHub organization.
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
* [Erik Andersson](https://github.com/e-andersson)
* [Simulation Curriculum](http://www.simulationcurriculum.com/)
* [Dave Whipps](https://github.com/dwhipps)
* [Geoscan](https://www.geoscan.aero)
* [Andrey Orlov](https://github.com/AndreyOrlov)

## [Individual CLA](http://www.agi.com/licenses/individual-cla-agi-v1.0.txt)
* [Victor Berchet](https://github.com/vicb)
Expand Down Expand Up @@ -98,3 +100,4 @@
* [Mati Ostrovsky](https://github.com/mati-o)
* [Tom Novacek](https://github.com/novacto2)
* [Olivier Guyot-Roullot](https://github.com/theOgrable)
* [Andy Fry](https://github.com/andyfry01)
6 changes: 3 additions & 3 deletions Documentation/Contributors/TestingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ It is also possible for Karma to run all tests against each browser installed on
`npm run test-webgl`

#### Run Only Non-WebGL Tests with Karma

`npm run test-non-webgl`

#### Run All Tests Against the Minified Release Version of Cesium

`npm run test-release`
Expand Down Expand Up @@ -381,7 +381,7 @@ afterAll(function() {
context.destroyForSpecs();
});

it('has czm_tranpose (2x2)', function() {
it('has czm_transpose (2x2)', function() {
var fs =
'void main() { ' +
' mat2 m = mat2(1.0, 2.0, 3.0, 4.0); ' +
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ We appreciate attribution by including the Cesium logo and link in your app.
### Demos ###

<p align="center">
<a href="http://cesiumjs.org/demos/ShakeFinder.html"><img src="http://cesiumjs.org/demos/images/ShakeFinder.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/GeoPort3D.html"><img src="http://cesiumjs.org/demos/images/GeoPort3D.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/HurricaneHunters.html"><img src="http://cesiumjs.org/demos/images/HurricaneHunters.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/HWRF.html"><img src="http://cesiumjs.org/demos/images/HWRF.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/GPMNRTView.html"><img src="http://cesiumjs.org/demos/images/GPMNRTView.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/STORMVG.html"><img src="http://cesiumjs.org/demos/images/STORMVG.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/CubeCities.html"><img src="http://cesiumjs.org/demos/images/CubeCities.png" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/VirES.html"><img src="http://cesiumjs.org/demos/images/VirES.png" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/NASAweather.html"><img src="http://cesiumjs.org/demos/images/NASAweather.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/Citisens.html"><img src="http://cesiumjs.org/demos/images/citisens.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/ParalogPerformance.html"><img src="http://cesiumjs.org/demos/images/ParalogPerformance.jpg" height="150" /></a>&nbsp;
<a href="http://cesiumjs.org/demos/FlightClub.html"><img src="http://cesiumjs.org/demos/images/FlightClub.jpg" height="150" /></a>&nbsp;
Expand Down
Loading

0 comments on commit 99f4985

Please sign in to comment.