Skip to content

Commit

Permalink
Merge branch 'master' into doubleclick-untrack
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannah authored Dec 27, 2018
2 parents b57cf2a + 88cc1c8 commit 551be0d
Show file tree
Hide file tree
Showing 97 changed files with 2,389 additions and 331 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ script:
- npm --silent run deploy-s3 -- -b cesium-dev -d cesium/$TRAVIS_BRANCH --confirm -c 'no-cache'
- npm --silent run deploy-status -- --status success --message Deployed

- npm --silent run test -- --browsers ChromeCI --failTaskOnError --webgl-stub --release --suppressPassed
- npm --silent run test -- --browsers FirefoxHeadless --failTaskOnError --webgl-stub --release --suppressPassed

- node index.js

Expand Down
Binary file not shown.
Binary file added Apps/SampleData/models/Pawns/Pawns.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/HeadingPitchRoll.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h1>Loading...</h1>
planePrimitive.readyPromise.then(function(model) {
// Play and loop all animations at half-speed
model.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});

Expand Down
132 changes: 132 additions & 0 deletions Apps/Sandcastle/gallery/Image-Based Lighting.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Use image-based lighting to light a model.">
<meta name="cesium-sandcastle-labels" content="Showcases">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar">
<table><tbody>
<tr>
<td>Luminance at Zenith</td>
<td>
<input type="range" min="0.0" max="2.0" step="0.01" data-bind="value: luminanceAtZenith, valueUpdate: 'input'">
<input type="text" size="4" data-bind="value: luminanceAtZenith">
</td>
</tr>
</tbody></table>
</div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
var viewer = new Cesium.Viewer('cesiumContainer');

var environmentMapURL = '../../SampleData/EnvironmentMap/kiara_6_afternoon_2k_ibl.ktx';
var modelURL = '../../SampleData/models/Pawns/Pawns.glb';

// This environment map was processed using Google's Filament project. To process your own:
// 1 - Download the Filament release (https://github.com/google/filament/releases).
// 2 - Run `cmgen --type=ktx --deploy=/path/to/output /path/to/image.hdr`. Other formats are also supported. Run `cmgen --help` for all options.
// 3 - Take the generated coefficients and the KTX file and load them in CesiumJS as shown below.

var L00 = new Cesium.Cartesian3( 0.170455150831422, 0.163151083190219, 0.196966760289763);
var L1_1 = new Cesium.Cartesian3(-0.066550267689383, -0.022088055746048, 0.078835009246127);
var L10 = new Cesium.Cartesian3( 0.038364097478591, 0.045714300098753, 0.063498904606215);
var L11 = new Cesium.Cartesian3(-0.014365363312810, -0.026490613715151, -0.050189404066020);
var L2_2 = new Cesium.Cartesian3(-0.051532786917890, -0.050777795729986, -0.056449044453032);
var L2_1 = new Cesium.Cartesian3( 0.043454596136534, 0.046672590104157, 0.057530107646610);
var L20 = new Cesium.Cartesian3(-0.001640466274110, 0.001286638231156, 0.007228908989616);
var L21 = new Cesium.Cartesian3(-0.042260855700641, -0.046394335094707, -0.057562936365585);
var L22 = new Cesium.Cartesian3(-0.004953478914091, -0.000479681664876, 0.008508150106928);
var coefficients = [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22];

var height = 0.0;
var hpr = new Cesium.HeadingPitchRoll(0.0, 0.0, 0.0);
var origin = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);
var modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(origin, hpr);

var model = viewer.scene.primitives.add(Cesium.Model.fromGltf({
url : modelURL,
modelMatrix : modelMatrix,
minimumPixelSize : 128
}));

model.readyPromise.then(function(model) {
var camera = viewer.camera;

// Zoom to model
var controller = viewer.scene.screenSpaceCameraController;
var r = 2.0 * Math.max(model.boundingSphere.radius, camera.frustum.near);
controller.minimumZoomDistance = r * 0.5;

var center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3());
var heading = Cesium.Math.toRadians(230.0);
var pitch = Cesium.Math.toRadians(-20.0);
camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, r * 2.0));
camera.lookAtTransform(Cesium.Matrix4.IDENTITY);

model.sphericalHarmonicCoefficients = coefficients;
model.specularEnvironmentMaps = environmentMapURL;

// The viewModel tracks the state of our mini application.
var viewModel = {
luminanceAtZenith : model.luminanceAtZenith
};
// Convert the viewModel members into knockout observables.
Cesium.knockout.track(viewModel);

// Bind the viewModel to the DOM elements of the UI that call for it.
var toolbar = document.getElementById('toolbar');
Cesium.knockout.applyBindings(viewModel, toolbar);

function subscribeParameter(name) {
Cesium.knockout.getObservable(viewModel, name).subscribe(
function(newValue) {
model[name] = newValue;
}
);
}

subscribeParameter('luminanceAtZenith');

Sandcastle.addToggleButton('Use procedural image', false, function(checked) {
if (!checked) {
model.sphericalHarmonicCoefficients = coefficients;
model.specularEnvironmentMaps = environmentMapURL;
} else {
model.sphericalHarmonicCoefficients = undefined;
model.specularEnvironmentMaps = undefined;
}
});
}).otherwise(function(error){
window.alert(error);
});
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== 'undefined') {
startup(Cesium);
} else if (typeof require === 'function') {
require(['Cesium'], startup);
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/Image-Based Lighting.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/LocalToFixedFrame.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1>Loading...</h1>
primitives[0].primitive.readyPromise.then(function(model) {
// Play and loop all animations at half-speed
model.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});

Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/development/3D Models Instancing.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
collection.readyPromise.then(function(collection) {
// Play and loop all animations at half-speed
collection.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});
orientCamera(collection._boundingSphere.center, collection._boundingSphere.radius);
Expand Down Expand Up @@ -93,7 +93,7 @@
model.readyPromise.then(function(model) {
// Play and loop all animations at half-speed
model.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});
}).otherwise(function(error){
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/development/3D Models.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
model.colorBlendAmount = viewModel.colorBlendAmount;
// Play and loop all animations at half-speed
model.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});

Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/development/Multiple Shadows.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
model.readyPromise.then(function(model) {
// Play and loop all animations at half-speed
model.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});
}).otherwise(function(error) {
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/development/Shadows.html
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@
model.readyPromise.then(function(model) {
// Play and loop all animations at half-speed
model.activeAnimations.addAll({
speedup : 0.5,
multiplier : 0.5,
loop : Cesium.ModelAnimationLoop.REPEAT
});
}).otherwise(function(error){
Expand Down
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
Change Log
==========

### 1.53 - 2019-01-02

##### Additions :tada:
* Added image-based lighting for PBR models and 3D Tiles. [#7172](https://github.com/AnalyticalGraphicsInc/cesium/pull/7172)
* `Scene.specularEnvironmentMaps` is a url to a KTX file that contains the specular environment map and convoluted mipmaps for image-based lighting of all PBR models in the scene.
* `Scene.sphericalHarmonicCoefficients` is an array of 9 `Cartesian3` spherical harmonics coefficients for the diffuse irradiance of all PBR models in the scene.
* The `specularEnvironmentMaps` and `sphericalHarmonicCoefficients` properties of `Model` and `Cesium3DTileset` can be used to override the values from the scene for specific models and tilesets.
* The `luminanceAtZenith` property of `Model` and `Cesium3DTileset` adjusts the luminance of the procedural image-based lighting.

##### Fixes :wrench:
* Fixed 3D Tiles visibility checking when running multiple passes within the same frame. [#7289](https://github.com/AnalyticalGraphicsInc/cesium/pull/7289)
* Fixed contrast on imagery layers. [#7382](https://github.com/AnalyticalGraphicsInc/cesium/issues/7382)
* Fixed rendering transparent background color when `highDynamicRange` is enabled. [#7427](https://github.com/AnalyticalGraphicsInc/cesium/issues/7427)

### 1.52 - 2018-12-03

##### Breaking Changes :mega:
* `TerrainProviders` that implement `availability` must now also implement the `loadTileDataAvailability` method.

##### Deprecated :hourglass_flowing_sand:
* The property `ModelAnimation.speedup` has been deprecated and renamed to `ModelAnimation.multiplier`. `speedup` will be removed in version 1.54. [#7393](https://github.com/AnalyticalGraphicsInc/cesium/pull/7393)

##### Additions :tada:
* Added functions to get the most detailed height of 3D Tiles on-screen or off-screen. [#7115](https://github.com/AnalyticalGraphicsInc/cesium/pull/7115)
* Added `Scene.sampleHeightMostDetailed`, an asynchronous version of `Scene.sampleHeight` that uses the maximum level of detail for 3D Tiles.
Expand All @@ -18,6 +35,7 @@ Change Log

##### Fixes :wrench:
* Fixed issue causing polyline to look wavy depending on the position of the camera [#7209](https://github.com/AnalyticalGraphicsInc/cesium/pull/7209)
* Fixed translucency issues for dynamic geometry entities. [#7364](https://github.com/AnalyticalGraphicsInc/cesium/issues/7364)

### 1.51 - 2018-11-01

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Our code is our lifeblood so maintaining CesiumJS's high code quality is importa
* Update [CHANGES.md](CHANGES.md).
* 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.
* 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 [GitHub issue](https://github.com/AnalyticalGraphicsInc/cesium/issues/new) discussing it first.

## Code of Conduct

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Chris Cooper](https://github.com/chris-cooper)
* [Andrew McDowell](https://github.com/madole)
* [Tony Luk](https://github.com/impactblue573)
* [Daniel Cooper](https://github.com/moodragon46)
* [GeoFS](https://www.geo-fs.com)
* [Xavier Tassin](https://github.com/xtassin/)

Expand Down Expand Up @@ -197,4 +198,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Felix Palmer](https://github.com/felixpalmer)
* [Cedric Le Roux](https://github.com/cleroux)
* [Dag Wästberg](https://github.com/dwastberg)
* [Mussab Abdalla](https://github.com/baloola)
* [Mirco Kroon](https://github.com/mircokroon)
* [Rikku-x](https://github.com/Rikku-x)
* [Adrien David](https://github.com/adridavid)
2 changes: 1 addition & 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;
[![Docs](https://img.shields.io/badge/docs-online-orange.svg)](http://cesiumjs.org/tutorials.html)
[![Docs](https://img.shields.io/badge/docs-online-orange.svg)](http://cesiumjs.org/tutorials.html) [![Greenkeeper badge](https://badges.greenkeeper.io/AnalyticalGraphicsInc/cesium.svg)](https://greenkeeper.io/)

CesiumJS 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
4 changes: 2 additions & 2 deletions Source/Core/ApproximateTerrainHeights.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ define([
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
* @return {{minimumTerrainHeight: Number, maximumTerrainHeight: Number}}
*/
ApproximateTerrainHeights.getApproximateTerrainHeights = function(rectangle, ellipsoid) {
ApproximateTerrainHeights.getMinimumMaximumHeights = function(rectangle, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
Check.defined('rectangle', rectangle);
if (!defined(ApproximateTerrainHeights._terrainHeights)) {
Expand Down Expand Up @@ -124,7 +124,7 @@ define([
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
* @return {BoundingSphere} The result bounding sphere
*/
ApproximateTerrainHeights.getInstanceBoundingSphere = function(rectangle, ellipsoid) {
ApproximateTerrainHeights.getBoundingSphere = function(rectangle, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
Check.defined('rectangle', rectangle);
if (!defined(ApproximateTerrainHeights._terrainHeights)) {
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/BingMapsGeocoderService.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ define([
/**
* The URL endpoint for the Bing geocoder service
* @type {String}
* @memberof {BingMapsGeocoderService.prototype}
* @memberof BingMapsGeocoderService.prototype
* @readonly
*/
url : {
Expand All @@ -56,7 +56,7 @@ define([
/**
* The key for the Bing geocoder service
* @type {String}
* @memberof {BingMapsGeocoderService.prototype}
* @memberof BingMapsGeocoderService.prototype
* @readonly
*/
key : {
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/DoublyLinkedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ define([
}
});

/**
* @private
*/
function DoublyLinkedListNode(item, previous, next) {
this.item = item;
this.previous = previous;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/EarthOrientationParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ define([
* Gets a promise that, when resolved, indicates that the EOP data has been loaded and is
* ready to use.
*
* @returns {Promise.<undefined>} The promise.
* @returns {Promise} The promise.
*
* @see when
*/
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ define([
*
* @alias Event
* @constructor
*
* @example
* MyObject.prototype.myListener = function(arg1, arg2) {
* this.myArg1Copy = arg1;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ define([
* Browser-independent functions for working with the standard fullscreen API.
*
* @exports Fullscreen
* @namespace
*
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/GroundPolylineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ define([
var adjustHeightEndTop = adjustHeightEndTopScratch;

var getHeightsRectangle = Rectangle.fromCartographicArray(getHeightCartographics, getHeightRectangleScratch);
var minMaxHeights = ApproximateTerrainHeights.getApproximateTerrainHeights(getHeightsRectangle, ellipsoid);
var minMaxHeights = ApproximateTerrainHeights.getMinimumMaximumHeights(getHeightsRectangle, ellipsoid);
var minHeight = minMaxHeights.minimumTerrainHeight;
var maxHeight = minMaxHeights.maximumTerrainHeight;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Iau2006XysData.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ define([
* the Terrestrial Time (TT) time standard.
* @param {Number} stopSecondTT The seconds past noon of the end of the interval to preload, expressed in
* the Terrestrial Time (TT) time standard.
* @returns {Promise.<undefined>} A promise that, when resolved, indicates that the requested interval has been
* @returns {Promise} A promise that, when resolved, indicates that the requested interval has been
* preloaded.
*/
Iau2006XysData.prototype.preload = function(startDayTT, startSecondTT, stopDayTT, stopSecondTT) {
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/IauOrientationAxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ define([
*
* @param {JulianDate} date The date to evaluate the matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix} The modified result parameter or a new instance of the rotation from ICRF to Fixed.
* @returns {Matrix3} The modified result parameter or a new instance of the rotation from ICRF to Fixed.
*/
IauOrientationAxes.prototype.evaluate = function(date, result) {
if (!defined(date)) {
Expand Down
1 change: 1 addition & 0 deletions Source/Core/IntersectionTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define([
* Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids.
*
* @exports IntersectionTests
* @namespace
*/
var IntersectionTests = {};

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Ion.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
'use strict';

var defaultTokenCredit;
var defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3OTM1ODdhMS1hOTliLTRkZDYtYmI4Ny0wYmM0MzI2ZDU4NTAiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTQxMDk4NzIxfQ.AqAyuEacuEItRBMDBPpwmhJXEjyZB0b69L3ixapXcF0';
var defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3ODRkMGNmYS1iYmMwLTQ5MjgtYTYzOC1lYzMzNDk2YjIyMGUiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTQzODQ5NzQ1fQ.80vzOtxheq1XsMJOKrSRdh3ybJu1XttfE7P47UxGxpY';

/**
* Default settings for accessing the Cesium ion API.
Expand Down
Loading

0 comments on commit 551be0d

Please sign in to comment.