Skip to content

Commit

Permalink
Merge branch 'master' into fix-tile-map-service-ready-promise-rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
kring authored Mar 6, 2020
2 parents fd07a06 + c4306da commit 07a7802
Show file tree
Hide file tree
Showing 144 changed files with 731 additions and 603 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"files": [
"index.js",
"server.js",
"server.cjs",
"gulpfile.js",
"Source/Workers/transferTypedArrayTest.js"
],
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/index.html
/index.release.html
/launches
/server.js
/server.cjs
/Source/copyrightHeader.js
/Specs
/ThirdParty
Expand Down
16 changes: 6 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
Expand All @@ -8,14 +8,10 @@
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}\\server.js",
"cwd": "${workspaceRoot}"
},
{
"type": "node",
"request": "attach",
"name": "Attach to Process",
"port": 5858
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "start"],
"noDebug": true
}
]
}
}
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Clustering.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
var pickedLabel = viewer.scene.pick(movement.position);
if (Cesium.defined(pickedLabel)) {
var ids = pickedLabel.id;
if (Cesium.isArray(ids)) {
if (Array.isArray(ids)) {
for (var i = 0; i < ids.length; ++i) {
ids[i].billboard.color = Cesium.Color.RED;
}
Expand Down
23 changes: 19 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
Change Log
==========

### 1.68.0 - 2020-04-01

##### Additions :tada:

* Added basic underground rendering support. When the camera is underground the globe will be rendered as a solid surface and underground entities will not be culled. [#8572](https://github.com/AnalyticalGraphicsInc/cesium/pull/8572)

##### Fixes :wrench:

* Interacting with the Cesium canvas will now blur the previously focused element. This prevents unintended modification of input elements when interacting with the globe.
* `TileMapServiceImageryProvider` will now force `minimumLevel` to 0 if the `tilemapresource.xml` metadata request fails and the `rectangle` is too large for the given detail level [#8448](https://github.com/AnalyticalGraphicsInc/cesium/pull/8448)

### 1.67.0 - 2020-03-02

##### Breaking Changes :mega:
* `Cesium3DTileset.skipLevelOfDetail` is now `false` by default. [#8631](https://github.com/CesiumGS/cesium/pull/8631)
* glTF models are now rendered using the `LEQUALS` depth test function instead of `LESS`. This means that when geometry overlaps, the _later_ geometry will be visible above the earlier, where previously the opposite was true. We believe this is a more sensible default, and makes it easier to render e.g. outlined buildings with glTF. [#8646](https://github.com/CesiumGS/cesium/pull/8646)

##### Additions :tada:

* Added `Entity.tileset` for loading a 3D Tiles tileset via the Entity API using the new `Cesium3DTilesetGraphics` class.
* Added `tileset.uri`, `tileset.show`, and `tileset.maximumScreenSpaceError` properties to CZML processing for loading 3D Tiles.
* Massively improved performance of clamped Entity ground geometry with dynamic colors. [#8630](https://github.com/CesiumGS/cesium/pull/8630)
* Added `Entity.tileset` for loading a 3D Tiles tileset via the Entity API using the new `Cesium3DTilesetGraphics` class. [#8580](https://github.com/CesiumGS/cesium/pull/8580)
* Added `tileset.uri`, `tileset.show`, and `tileset.maximumScreenSpaceError` properties to CZML processing for loading 3D Tiles. [#8580](https://github.com/CesiumGS/cesium/pull/8580)
* Added `Color.lerp` for linearly interpolating between two RGB colors. [#8607](https://github.com/CesiumGS/cesium/pull/8607)
* `CesiumTerrainProvider` now supports terrain tiles using a `WebMercatorTilingScheme` by specifying `"projection": "EPSG:3857"` in `layer.json`. It also now supports numbering tiles from the North instead of the South by specifying `"scheme": "slippyMap"` in `layer.json`. [#8563](https://github.com/CesiumGS/cesium/pull/8563)
* Added basic support for `isNaN`, `isFinite`, `null`, and `undefined` in the 3D Tiles styling GLSL backend for point clouds. [#8621](https://github.com/CesiumGS/cesium/pull/8621)
* Updated knockout from 3.5.0 to 3.5.1.
* Added `sizeInMeters` to `ParticleSystem`. [#7746](https://github.com/CesiumGS/cesium/pull/7746)

##### Fixes :wrench:
Expand All @@ -23,7 +34,11 @@ Change Log
* Fixed a bug where tiles would not load if the camera was tracking a moving tileset. [#8598](https://github.com/CesiumGS/cesium/pull/8598)
* Fixed a bug where applying a new 3D Tiles style during a flight would not update all existing tiles. [#8622](https://github.com/CesiumGS/cesium/pull/8622)
* Fixed a bug where Cartesian vectors could not be packed to typed arrays [#8568](https://github.com/AnalyticalGraphicsInc/cesium/pull/8568)
* `TileMapServiceImageryProvider` will now force `minimumLevel` to 0 if the `tilemapresource.xml` metadata request fails and the `rectangle` is too large for the given detail level [#8448](https://github.com/AnalyticalGraphicsInc/cesium/pull/8448)
* Updated knockout from 3.5.0 to 3.5.1. [#8424](https://github.com/CesiumGS/cesium/pull/8424)
* Cesium's local development server now works in Node 12 & 13 [#8648](https://github.com/CesiumGS/cesium/pull/8648)

##### Deprecated :hourglass_flowing_sand:
* The `isArray` function has been deprecated and will be removed in Cesium 1.69. Use the native `Array.isArray` function instead. [#8526](https://github.com/CesiumGS/cesium/pull/8526)

### 1.66.0 - 2020-02-03

Expand Down
15 changes: 5 additions & 10 deletions Documentation/Contributors/CodingGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ this._canvas = canvas;
```
* Constants are in uppercase with underscores, e.g.,
```javascript
Cartesian3.UNIT_X = freezeObject(new Cartesian3(1.0, 0.0, 0.0));
Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1.0, 0.0, 0.0));
```
* Avoid abbreviations in public identifiers unless the full name is prohibitively cumbersome and has a widely accepted abbreviation, e.g.,
```javascript
Expand Down Expand Up @@ -284,20 +284,15 @@ if (defined(u)) {
// True
}
```
* Use Cesium's `freezeObject` function to create enums, e.g.,
* Use `Object.freeze` function to create enums, e.g.,
```javascript
define([
'../Core/freezeObject'
], function(
freezeObject) {
'use strict';

var ModelAnimationState = {
STOPPED : 0,
ANIMATING : 1
};

return freezeObject(ModelAnimationState);
return Object.freeze(ModelAnimationState);
});
```
* Use descriptive comments for non-obvious code, e.g.,
Expand Down Expand Up @@ -629,9 +624,9 @@ The prototype versions have the benefit of being able to be used polymorphically

### Static Constants

To create a static constant related to a class, use `freezeObject`:
To create a static constant related to a class, use `Object.freeze`:
```javascript
Cartesian3.ZERO = freezeObject(new Cartesian3(0.0, 0.0, 0.0));
Cartesian3.ZERO = Object.freeze(new Cartesian3(0.0, 0.0, 0.0));
```

### Private Functions
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Contributors/DocumentationGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Object.defineProperties(Entity.prototype, {
* @type {Cartesian3}
* @constant
*/
Cartesian3.ZERO = freezeObject(new Cartesian3(0.0, 0.0, 0.0));
Cartesian3.ZERO = Object.freeze(new Cartesian3(0.0, 0.0, 0.0));
```
## Functions and Callbacks
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/ArcType.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import freezeObject from './freezeObject.js';

/**
* ArcType defines the path that should be taken connecting vertices.
Expand Down Expand Up @@ -30,4 +29,4 @@ import freezeObject from './freezeObject.js';
*/
RHUMB : 2
};
export default freezeObject(ArcType);
export default Object.freeze(ArcType);
7 changes: 3 additions & 4 deletions Source/Core/Cartesian2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Check from './Check.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import DeveloperError from './DeveloperError.js';
import freezeObject from './freezeObject.js';
import CesiumMath from './Math.js';

/**
Expand Down Expand Up @@ -679,23 +678,23 @@ import CesiumMath from './Math.js';
* @type {Cartesian2}
* @constant
*/
Cartesian2.ZERO = freezeObject(new Cartesian2(0.0, 0.0));
Cartesian2.ZERO = Object.freeze(new Cartesian2(0.0, 0.0));

/**
* An immutable Cartesian2 instance initialized to (1.0, 0.0).
*
* @type {Cartesian2}
* @constant
*/
Cartesian2.UNIT_X = freezeObject(new Cartesian2(1.0, 0.0));
Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1.0, 0.0));

/**
* An immutable Cartesian2 instance initialized to (0.0, 1.0).
*
* @type {Cartesian2}
* @constant
*/
Cartesian2.UNIT_Y = freezeObject(new Cartesian2(0.0, 1.0));
Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0.0, 1.0));

/**
* Duplicates this Cartesian2 instance.
Expand Down
9 changes: 4 additions & 5 deletions Source/Core/Cartesian3.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Check from './Check.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import DeveloperError from './DeveloperError.js';
import freezeObject from './freezeObject.js';
import CesiumMath from './Math.js';

/**
Expand Down Expand Up @@ -1012,31 +1011,31 @@ import CesiumMath from './Math.js';
* @type {Cartesian3}
* @constant
*/
Cartesian3.ZERO = freezeObject(new Cartesian3(0.0, 0.0, 0.0));
Cartesian3.ZERO = Object.freeze(new Cartesian3(0.0, 0.0, 0.0));

/**
* An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.UNIT_X = freezeObject(new Cartesian3(1.0, 0.0, 0.0));
Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1.0, 0.0, 0.0));

/**
* An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.UNIT_Y = freezeObject(new Cartesian3(0.0, 1.0, 0.0));
Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0.0, 1.0, 0.0));

/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.UNIT_Z = freezeObject(new Cartesian3(0.0, 0.0, 1.0));
Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0.0, 0.0, 1.0));

/**
* Duplicates this Cartesian3 instance.
Expand Down
11 changes: 5 additions & 6 deletions Source/Core/Cartesian4.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Check from './Check.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import DeveloperError from './DeveloperError.js';
import freezeObject from './freezeObject.js';
import CesiumMath from './Math.js';

/**
Expand Down Expand Up @@ -738,39 +737,39 @@ import CesiumMath from './Math.js';
* @type {Cartesian4}
* @constant
*/
Cartesian4.ZERO = freezeObject(new Cartesian4(0.0, 0.0, 0.0, 0.0));
Cartesian4.ZERO = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 0.0));

/**
* An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_X = freezeObject(new Cartesian4(1.0, 0.0, 0.0, 0.0));
Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1.0, 0.0, 0.0, 0.0));

/**
* An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_Y = freezeObject(new Cartesian4(0.0, 1.0, 0.0, 0.0));
Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0.0, 1.0, 0.0, 0.0));

/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_Z = freezeObject(new Cartesian4(0.0, 0.0, 1.0, 0.0));
Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0.0, 0.0, 1.0, 0.0));

/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_W = freezeObject(new Cartesian4(0.0, 0.0, 0.0, 1.0));
Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 1.0));

/**
* Duplicates this Cartesian4 instance.
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/Cartographic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Cartesian3 from './Cartesian3.js';
import Check from './Check.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import freezeObject from './freezeObject.js';
import CesiumMath from './Math.js';
import scaleToGeodeticSurface from './scaleToGeodeticSurface.js';

Expand Down Expand Up @@ -219,7 +218,7 @@ import scaleToGeodeticSurface from './scaleToGeodeticSurface.js';
* @type {Cartographic}
* @constant
*/
Cartographic.ZERO = freezeObject(new Cartographic(0.0, 0.0, 0.0));
Cartographic.ZERO = Object.freeze(new Cartographic(0.0, 0.0, 0.0));

/**
* Duplicates this instance.
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/ClockRange.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import freezeObject from './freezeObject.js';

/**
* Constants used by {@link Clock#tick} to determine behavior
Expand Down Expand Up @@ -38,4 +37,4 @@ import freezeObject from './freezeObject.js';
*/
LOOP_STOP : 2
};
export default freezeObject(ClockRange);
export default Object.freeze(ClockRange);
3 changes: 1 addition & 2 deletions Source/Core/ClockStep.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import freezeObject from './freezeObject.js';

/**
* Constants to determine how much time advances with each call
Expand Down Expand Up @@ -37,4 +36,4 @@ import freezeObject from './freezeObject.js';
*/
SYSTEM_CLOCK : 2
};
export default freezeObject(ClockStep);
export default Object.freeze(ClockStep);
Loading

0 comments on commit 07a7802

Please sign in to comment.