Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #16 from oterral/c2c_patches_cesium_1.25
Browse files Browse the repository at this point in the history
Cesium 1.25
  • Loading branch information
gberaudo authored Sep 9, 2016
2 parents 3f04a17 + 3ba4a8c commit 1ff99de
Show file tree
Hide file tree
Showing 113 changed files with 2,359 additions and 641 deletions.
1 change: 0 additions & 1 deletion .idea/cesium.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/libraries/cesium_node_modules.xml

This file was deleted.

2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/ArcGIS MapServer.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// Add an ArcGIS MapServer imagery layer
var imageryLayers = viewer.imageryLayers;
imageryLayers.addImageryProvider(new Cesium.ArcGisMapServerImageryProvider({
url : 'https://nationalmap.gov.au/proxy/http://www.ga.gov.au/gis/rest/services/earth_science/GA_Surface_Geology_of_Australia_WM/MapServer'
url : 'https://nationalmap.gov.au/proxy/http://services.ga.gov.au/site_3/rest/services/Electricity_Infrastructure/MapServer'
}));

// Start off looking at Australia.
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 @@ -390,8 +390,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 @@ -639,8 +638,7 @@
}),
asynchronous : false,
rtcCenter : boxGeometry.boundingSphere.center,
castShadows : true,
receiveShadows : true
shadows : Cesium.ShadowMode.ENABLED
});

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

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

scene.primitives.add(sphere);
Expand All @@ -711,15 +707,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
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
Change Log
==========

### 1.25 - 2016-09-01
* Breaking changes
* The number and order of arguments passed to `KmlDataSource` `unsupportedNodeEvent` listeners have changed to allow better handling of unsupported KML Features.
* Changed billboards and labels that are clamped to terrain to have the `verticalOrigin` set to `CENTER` by default instead of `BOTTOM`.
* 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 removed 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). Added an option to bake ambient occlusion onto the glTF model. 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.
* Improve label quality for oblique and italic fonts. [#3782](https://github.com/AnalyticalGraphicsInc/cesium/issues/3782)
* 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)
* Added `Camera.cancelFlight` to cancel the existing camera flight if it exists.
* Fix overlapping camera flights by always cancelling the previous flight when a new one is created.
* 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)
* Fixed a crash that would occur if quickly toggling imagery visibility. [#4083](https://github.com/AnalyticalGraphicsInc/cesium/issues/4083)
* Fixed an issue causing an 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.
* Fixed position of KML point features with an altitude mode of `relativeToGround` and `clampToGround`.
* Added `GeocoderViewModel.keepExpanded` which when set to true will always keep the Geocoder in its expanded state.
* Added support for `INT` and `UNSIGNED_INT` in `ComponentDatatype`.
* Added `ComponentDatatype.fromName` for getting a `ComponentDatatype` from its name.
* Fixed a crash caused by draping dynamic geometry over terrain. [#4255](https://github.com/AnalyticalGraphicsInc/cesium/pull/4255)

### 1.24 - 2016-08-01

* Added support in CZML for expressing `BillboardGraphics.alignedAxis` as the velocity vector of an entity, using `velocityReference` syntax.
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 [email protected].

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
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

[![Build Status](https://travis-ci.org/AnalyticalGraphicsInc/cesium.svg?branch=master)](https://travis-ci.org/AnalyticalGraphicsInc/cesium)&nbsp;
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) [![Docs](https://img.shields.io/badge/docs-online-orange.svg)](http://cesiumjs.org/tutorials.html)

Cesium is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.

Expand Down 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
2 changes: 1 addition & 1 deletion Source/Core/BingMapsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define([
console.log(errorString);
printedBingWarning = true;
}
return 'AnjT_wAj_juA_MsD8NhcEAVSjCYpV-e50lUypkWm1JPxVu0XyVqabsvD3r2DQpX-';
return 'AhiQlDaPOwKbStA_3nJIdimUj4PRYkp0yHwcNpvxVlLNPRo5ZJWY5oX_h6B_dMbm';
}

return BingMapsApi.defaultKey;
Expand Down
Loading

0 comments on commit 1ff99de

Please sign in to comment.