Skip to content

Commit

Permalink
Merge branch 'master' into 3d-tiles-styling-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Jul 2, 2017
2 parents df8709c + 3a4a3d8 commit 3d162ae
Show file tree
Hide file tree
Showing 1,154 changed files with 1,046 additions and 2,109 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "./Tools/eslint-config-cesium/browser.js",
"plugins": [
"html"
],
"rules": {
"no-unused-vars": ["error", {"vars": "all", "args": "none"}]
}
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.eslintcache
/.externalToolBuilders
/.gitattributes
/.github
Expand Down
1 change: 0 additions & 1 deletion Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'Cesium/Core/Cartesian3',
'Cesium/Core/defined',
Expand Down
1 change: 0 additions & 1 deletion Apps/Sandcastle/LinkButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'dijit/_CssStateMixin',
'dijit/_TemplatedMixin',
Expand Down
29 changes: 16 additions & 13 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ Change Log

### 1.35 - 2017-07-05

* Breaking changes
* `JulianDate.fromIso8601` will default to midnight UTC if no time is provided to match the Javascript [`Date` specification](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date). You must specify a local time of midnight to achieve the old behavior.
* Deprecated
* `GoogleEarthImageryProvider` has been deprecated and will be removed in Cesium 1.37, use `GoogleEarthEnterpriseMapsProvider` instead.
* The `throttleRequest` parameter for `TerrainProvider.requestTileGeometry`, `CesiumTerrainProvider.requestTileGeometry`, `VRTheWorldTerrainProvider.requestTileGeometry`, and `EllipsoidTerrainProvider.requestTileGeometry` is deprecated and will be replaced with an optional `Request` object. The `throttleRequests` parameter will be removed in 1.37. Instead to throttle requests set the request's `throttle` property to `true`.
* The `throttleRequest` parameter for `TerrainProvider.requestTileGeometry`, `CesiumTerrainProvider.requestTileGeometry`, `VRTheWorldTerrainProvider.requestTileGeometry`, and `EllipsoidTerrainProvider.requestTileGeometry` is deprecated and will be replaced with an optional `Request` object. The `throttleRequests` parameter will be removed in 1.37. Instead set the request's `throttle` property to `true` to throttle requests.
* The ability to provide a Promise for the `options.url` parameter of `loadWithXhr` and for the `url` parameter of `loadArrayBuffer`, `loadBlob`, `loadImageViaBlob`, `loadText`, `loadJson`, `loadXML`, `loadImage`, `loadCRN`, `loadKTX`, and `loadCubeMap` is deprecated. This will be removed in 1.37, instead `url` must be a string.
* Added an `options.request` parameter to `loadWithXhr` and a `request` parameter to `loadArrayBuffer`, `loadBlob`, `loadImageViaBlob`, `loadText`, `loadJson`, `loadJsonp`, `loadXML`, `loadImageFromTypedArray`, `loadImage`, `loadCRN`, and `loadKTX`.
* Fixed bug where if polylines were set to follow the surface of an undefined globe, Cesium would crash [#5413](https://github.com/AnalyticalGraphicsInc/cesium/pull/5413)
* Fixed a bug where picking clusters would return undefined instead of a list of the clustered entities. [#5286](https://github.com/AnalyticalGraphicsInc/cesium/issues/5286)
* Fixed a bug where picking would break when the Sun came into view [#5478](https://github.com/AnalyticalGraphicsInc/cesium/issues/5478)
* Reduced the amount of Sun bloom post-process effect near the horizon. [#5381](https://github.com/AnalyticalGraphicsInc/cesium/issues/5381)
* Updated glTF/glb MIME types. [#5420](https://github.com/AnalyticalGraphicsInc/cesium/issues/5420)
* Fixed a bug where camera zooming worked incorrectly when the display height was greater than the display width [#5421](https://github.com/AnalyticalGraphicsInc/cesium/pull/5421)
* Added Sandcastle demo for ArcticDEM data. [#5224](https://github.com/AnalyticalGraphicsInc/cesium/issues/5224)
* `CzmlDataSource` and `KmlDataSource` load functions now take an optional `query` object, which will append query parameters to all network requests. [#5419](https://github.com/AnalyticalGraphicsInc/cesium/pull/5419), [#5434](https://github.com/AnalyticalGraphicsInc/cesium/pull/5434)
* Fixed geocoder bug so geocoder can accurately handle NSEW inputs [#5407](https://github.com/AnalyticalGraphicsInc/cesium/pull/5407)
* Added support for [3D Tiles](https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/README.md) for streaming massive heterogeneous 3D geospatial datasets. The new Cesium APIs are:
* `Cesium3DTileset`
* `Cesium3DTileStyle`, `StyleExpression`, `Expression`, and `ConditionsExpression`
Expand All @@ -25,9 +17,20 @@ Change Log
* `Cesium3DTileFeature`
* `Cesium3DTilesInspector`, `Cesium3DTilesInspectorViewModel`, and `viewerCesium3DTilesInspectorMixin`
* `Cesium3DTileColorBlendMode`
* Added a Sandcastle demo for setting time with the Clock API [#5457](https://github.com/AnalyticalGraphicsInc/cesium/pull/5457);
* Added support for `ParticleSystem`s. [#5212](https://github.com/AnalyticalGraphicsInc/cesium/pull/5212)
* Added a particle system for effects like smoke, fire, sparks, etc. See `ParticleSystem`, `Particle`, `ParticleBurst`, `BoxEmitter`, `CircleEmitter`, `ConeEmitter`, `ParticleEmitter`, and `SphereEmitter`, and the new Sandcastle examples: `Particle System` and `Particle System Fireworks`. [#5212](https://github.com/AnalyticalGraphicsInc/cesium/pull/5212)
* Added an `options.request` parameter to `loadWithXhr` and a `request` parameter to `loadArrayBuffer`, `loadBlob`, `loadImageViaBlob`, `loadText`, `loadJson`, `loadJsonp`, `loadXML`, `loadImageFromTypedArray`, `loadImage`, `loadCRN`, and `loadKTX`.
* `CzmlDataSource` and `KmlDataSource` load functions now take an optional `query` object, which will append query parameters to all network requests. [#5419](https://github.com/AnalyticalGraphicsInc/cesium/pull/5419), [#5434](https://github.com/AnalyticalGraphicsInc/cesium/pull/5434)
* Added Sandcastle demo for setting time with the Clock API [#5457](https://github.com/AnalyticalGraphicsInc/cesium/pull/5457);
* Added Sandcastle demo for ArcticDEM data. [#5224](https://github.com/AnalyticalGraphicsInc/cesium/issues/5224)
* Fixed geocoder bug so geocoder can accurately handle NSEW inputs [#5407](https://github.com/AnalyticalGraphicsInc/cesium/pull/5407)
* Fixed a bug where picking would break when the Sun came into view [#5478](https://github.com/AnalyticalGraphicsInc/cesium/issues/5478)
* Fixed a bug where picking clusters would return undefined instead of a list of the clustered entities. [#5286](https://github.com/AnalyticalGraphicsInc/cesium/issues/5286)
* Fixed bug where if polylines were set to follow the surface of an undefined globe, Cesium would throw an exception. [#5413](https://github.com/AnalyticalGraphicsInc/cesium/pull/5413)
* Reduced the amount of Sun bloom post-process effect near the horizon. [#5381](https://github.com/AnalyticalGraphicsInc/cesium/issues/5381)
* Fixed a bug where camera zooming worked incorrectly when the display height was greater than the display width [#5421](https://github.com/AnalyticalGraphicsInc/cesium/pull/5421)
* Updated glTF/glb MIME types. [#5420](https://github.com/AnalyticalGraphicsInc/cesium/issues/5420)
* Added `Cesium.Math.randomBetween`.
* Modified `defaultValue` to check for both `undefined` and `null`. [#5551](https://github.com/AnalyticalGraphicsInc/cesium/pull/5551)

### 1.34 - 2017-06-01

Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,6 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Ryan King](https://github.com/ryki2658)
* [Jason Wohlgemuth](https://github.com/jhwohlgemuth)
* [Hülya Yurtman](https://github.com/hulyayurtman)
* [Esra ERİK](https://github.com/esraerik)
* [Esra ERİK](https://github.com/esraerik)
* [Rishabh Shah](https://github.com/rms13)
* [Rudraksha Shah](https://github.com/Rudraksha20)
17 changes: 15 additions & 2 deletions Documentation/Contributors/CodingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ To some extent, this guide can be summarized as _make new code similar to existi

* [Naming](#naming)
* [Formatting](#formatting)
* [Linting](#linting)
* [Units](#units)
* [Basic Code Construction](#basic-code-construction)
* [Functions](#functions)
Expand Down Expand Up @@ -135,7 +136,18 @@ function Model(options) {

* Text files, including JavaScript files, end with a newline to minimize the noise in diffs.

* When [disabling rules with inline comments](http://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments), place the comments on new lines and as close to the associated code as possible:
## Linting

For syntax and style guidelines, we use the [ESLint](http://eslint.org/docs/rules/) recommended settings as a base and extend it with additional rules via a shared config Node module, [eslint-config-cesium](https://www.npmjs.com/package/eslint-config-cesium), which is maintained as part of the Cesium repository and also used throughout the Cesium ecosystem. For a list of which rules are enabled, look in [index.js](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Tools/eslint-config-cesium/index.js), [browser.js](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Tools/eslint-config-cesium/browser.js), and [node.js](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Tools/eslint-config-cesium/node.js).

* When disabling linting for one line, use `//eslint-disable-line`:
```js
function exit(warningMessage) {
window.alert('Cannot exit: ' + warningMessage); //eslint-disable-line no-alert
}
```

* When disabling linting for blocks of code, place `eslint-disable` comments on new lines and as close to the associated code as possible:
```js
/*eslint-disable no-empty*/
try {
Expand All @@ -145,6 +157,8 @@ try {
/*eslint-enable no-empty*/
```

* See [Disabling Rules with Inline Comments](http://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments) for more examples.

## Units

* Cesium uses SI units:
Expand Down Expand Up @@ -249,7 +263,6 @@ if (defined(u)) {
```
* Use Cesium's `freezeObject` function to create enums, e.g.,
```javascript
/*global define*/
define([
'../Core/freezeObject'
], function(
Expand Down
2 changes: 0 additions & 2 deletions Documentation/Contributors/TestingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ Tests are written in JavaScript using Jasmine. It is important to realize that
Here is a stripped down version of the tests:

```javascript
/*global defineSuite*/
defineSuite([
'Core/Cartesian3'
], function(
Expand Down Expand Up @@ -696,7 +695,6 @@ This test is more cohesive and easier to debug than if it were written using a _
As mentioned above, some tests are in the `'WebGL'` category. To assign a category to a suite, pass the category to `defineSuite`.

```javascript
/*global defineSuite*/
defineSuite([
'Scene/DebugModelMatrixPrimitive',
'Specs/createScene'
Expand Down
1 change: 0 additions & 1 deletion Source/Core/AssociativeArray.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./defined',
'./defineProperties',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/AttributeCompression.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian2',
'./Cartesian3',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/AxisAlignedBoundingBox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian3',
'./Check',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/BingMapsApi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Credit',
'./defined'
Expand Down
31 changes: 15 additions & 16 deletions Source/Core/BingMapsGeocoderService.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/*global define*/
define([
'./BingMapsApi',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties',
'./loadJsonp',
'./Rectangle'
], function(
BingMapsApi,
Check,
defaultValue,
defined,
defineProperties,
loadJsonp,
Rectangle) {
'./BingMapsApi',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties',
'./loadJsonp',
'./Rectangle'
], function(
BingMapsApi,
Check,
defaultValue,
defined,
defineProperties,
loadJsonp,
Rectangle) {
'use strict';

var url = 'https://dev.virtualearth.net/REST/v1/Locations';
Expand Down
1 change: 0 additions & 1 deletion Source/Core/BoundingRectangle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian2',
'./Cartographic',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/BoundingSphere.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian3',
'./Cartographic',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/BoxGeometry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./BoundingSphere',
'./Cartesian3',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/BoxOutlineGeometry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./BoundingSphere',
'./Cartesian3',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Cartesian2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Check',
'./defaultValue',
Expand Down
13 changes: 6 additions & 7 deletions Source/Core/Cartesian3.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/*global define*/
define([
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./freezeObject',
'./Math'
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./freezeObject',
'./Math'
], function(
Check,
defaultValue,
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Cartesian4.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Check',
'./defaultValue',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Cartographic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian3',
'./Check',
Expand Down
27 changes: 13 additions & 14 deletions Source/Core/CartographicGeocoderService.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
/*global define*/
define([
'./Cartesian3',
'./Check',
'./defaultValue',
'./defineProperties',
'./defined',
'../ThirdParty/when'
], function(
Cartesian3,
Check,
defaultValue,
defineProperties,
defined,
when) {
'../ThirdParty/when',
'./Cartesian3',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties'
], function(
when,
Cartesian3,
Check,
defaultValue,
defined,
defineProperties) {
'use strict';

/**
Expand Down
18 changes: 6 additions & 12 deletions Source/Core/CatmullRomSpline.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
/*global define*/
define([
'./Cartesian3',
'./Cartesian4',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties',
'./DeveloperError',
'./HermiteSpline',
'./Matrix4',
'./Spline'
], function(
Cartesian3,
Cartesian4,
Check,
defaultValue,
defined,
defineProperties,
DeveloperError,
HermiteSpline,
Matrix4,
Spline) {
Expand Down Expand Up @@ -152,15 +151,10 @@ define([
var lastTangent = options.lastTangent;

//>>includeStart('debug', pragmas.debug);
if (!defined(points) || !defined(times)) {
throw new DeveloperError('points and times are required.');
}
if (points.length < 2) {
throw new DeveloperError('points.length must be greater than or equal to 2.');
}
if (times.length !== points.length) {
throw new DeveloperError('times.length must be equal to points.length.');
}
Check.defined('points', points);
Check.defined('times', times);
Check.typeOf.number.greaterThanOrEquals('points.length', points.length, 2);
Check.typeOf.number.equals('times.length', 'points.length', times.length, points.length);
//>>includeEnd('debug');

if (points.length > 2) {
Expand Down
1 change: 0 additions & 1 deletion Source/Core/CesiumTerrainProvider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'../ThirdParty/Uri',
'../ThirdParty/when',
Expand Down
18 changes: 17 additions & 1 deletion Source/Core/Check.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./defined',
'./DeveloperError'
Expand Down Expand Up @@ -165,5 +164,22 @@ define([
}
};

/**
* Throws if test1 and test2 is not typeof 'number' and not equal in value
*
* @param {String} name1 The name of the first variable being tested
* @param {String} name2 The name of the second variable being tested against
* @param {*} test1 The value to test
* @param {*} test2 The value to test against
* @exception {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
*/
Check.typeOf.number.equals = function (name1, name2, test1, test2) {
Check.typeOf.number(name1, test1);
Check.typeOf.number(name2, test2);
if (test1 !== test2) {
throw new DeveloperError(name1 + ' must be equal to ' + name2 + ', the actual values are ' + test1 + ' and ' + test2);
}
};

return Check;
});
1 change: 0 additions & 1 deletion Source/Core/CircleGeometry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian3',
'./Check',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/CircleOutlineGeometry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Cartesian3',
'./Check',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Clock.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./ClockRange',
'./ClockStep',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/ClockRange.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./freezeObject'
], function(
Expand Down
1 change: 0 additions & 1 deletion Source/Core/ClockStep.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./freezeObject'
], function(
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Color.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Check',
'./defaultValue',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/ColorGeometryInstanceAttribute.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./Color',
'./ComponentDatatype',
Expand Down
1 change: 0 additions & 1 deletion Source/Core/ComponentDatatype.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'./defaultValue',
'./defined',
Expand Down
Loading

0 comments on commit 3d162ae

Please sign in to comment.