Skip to content

Updating Post-PR master for PR 8897 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 78 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
215ed03
Added nightAlpha and dayAlpha in the ImageryLayer
May 18, 2020
702044c
Updated CONTRIBUTORS.md
May 18, 2020
7e1407b
CHANGES.md updated
May 18, 2020
a0c2081
Added night textures showcase to the Sandcastle
May 18, 2020
3a4d413
Merge branch 'master' into day-night-textures
IanLilleyT May 26, 2020
e1ffa48
some tweaks to day/night blending
IanLilleyT May 26, 2020
1f3be6c
#8843 Clear Request cancelFunction and deferred references to free up…
bn-dignitas May 28, 2020
bd2544a
#8843 Add comments
bn-dignitas May 29, 2020
623e7b4
#8843 Update comment
bn-dignitas May 29, 2020
92b6bb0
Merge branch 'master' into day-night-textures
May 29, 2020
114bf48
Remove hardcoded node_modules in gulpfile.
mramato Jun 1, 2020
d342d4c
Merge pull request #8890 from CesiumGS/npx
kring Jun 1, 2020
7abebc1
Merge branch 'master' into day-night-textures
IanLilleyT Jun 1, 2020
0f98f2b
Update CHANGES to make underground visualization more prominent
lilleyse Jun 1, 2020
e3b0f02
Merge branch 'master' into day-night-textures
IanLilleyT Jun 1, 2020
adb3dc9
Fix doc using @member instead of @memberof
lilleyse Jun 1, 2020
38bb637
Merge pull request #8891 from CesiumGS/fix-doc
IanLilleyT Jun 1, 2020
746f8ac
Merge pull request #8868 from epranka/day-night-textures
IanLilleyT Jun 1, 2020
a31e7ad
Removed duplicate CHANGES.md line
IanLilleyT Jun 1, 2020
dc79b96
Add Cesium OSM Buildings note in CHANGES
Jun 1, 2020
0867642
Add Sandcastle link [ci skip]
Jun 1, 2020
91e54e3
Fix typo [ci skip]
Jun 1, 2020
56866ed
Merge pull request #8892 from CesiumGS/buildings
Jun 1, 2020
43362d9
fixed flipy issue
ebogo1 Jun 1, 2020
bc901ae
updated CHANGES.md
ebogo1 Jun 1, 2020
6e59c2a
added myself to CONTRIBUTORS.md
ebogo1 Jun 1, 2020
a3d8e3e
added tests for flipY function
ebogo1 Jun 1, 2020
3b29c1a
Fixed Bing Maps Road option in sandcastle example
ebogo1 Jun 1, 2020
9c96bb6
removed extra whitespace line
ebogo1 Jun 1, 2020
9f5b492
Merge pull request #8895 from CesiumGS/imagery-layers-bing-maps-road
ptrgags Jun 1, 2020
fb68c07
fix gulp build error
LuminousPath Jun 1, 2020
3655d86
Added Navagis to CONTRIBUTORS.md
LuminousPath Jun 1, 2020
2d3852c
updated tokens, version, and changes.md
IanLilleyT Jun 1, 2020
6742ba8
Merge pull request #8893 from CesiumGS/fix-flipy
ptrgags Jun 1, 2020
9a79ec0
Fix variable naming in fog sandcastle
lilleyse Jun 2, 2020
3105c90
Add toString method for Resource class
thw0rted Jun 2, 2020
655c615
Tests for Resource#toString
thw0rted Jun 2, 2020
200c0c4
Use explicit cast
mramato Jun 2, 2020
f1aac14
Merge pull request #8899 from thw0rted/resource-tostring
mramato Jun 2, 2020
bac46c9
Merge branch 'master' into 8843-fix-request-memory-retention
bn-dignitas Jun 2, 2020
4620035
Improve JSDoc/TypeScript support for Material properties
mramato Jun 3, 2020
be4960d
Update CHANGES
mramato Jun 3, 2020
71c5250
Merge pull request #8883 from bn-dignitas/8843-fix-request-memory-ret…
lilleyse Jun 3, 2020
2abec98
Update CHANGES for cancelled request memory leak fix
lilleyse Jun 3, 2020
7e5c468
Add additional smokescreen to build-ts
mramato Jun 3, 2020
0a285cc
Update CHANGES
mramato Jun 3, 2020
170a721
Merge branch 'master' into smokescreen-em-if-you-got-em
mramato Jun 3, 2020
23bdbbd
Merge branch 'master' into issue8898
mramato Jun 3, 2020
f6d4c98
Add missing property typs to TypeScript smokescreen
mramato Jun 3, 2020
0c1c9d1
Other minor TS improvements.
mramato Jun 3, 2020
57ff6d4
Make sure all nullable Entity API properties are marked as such.
mramato Jun 3, 2020
50e8a91
Merge pull request #8904 from CesiumGS/issue8898
kring Jun 4, 2020
2d12399
Merge remote-tracking branch 'origin/master' into smokescreen-em-if-y…
mramato Jun 4, 2020
164a474
Most ImageryProvider properties can be undefined.
mramato Jun 4, 2020
bbde6e9
Fix missing HeadingPitchRoll/HeadingPitchRange JSDoc
mramato Jun 4, 2020
c8b3690
Missing `|undefined` in GoogleEarthEnterpriseMapsProvider
kring Jun 4, 2020
913810c
Missing JSDoc
mramato Jun 4, 2020
1ae6836
Merge pull request #8908 from CesiumGS/smokescreen-em-if-you-got-em
kring Jun 5, 2020
aa8b30a
change cesiumScriptRegex value
xiaobaogeit Jun 5, 2020
e529cef
add more test
xiaobaogeit Jun 6, 2020
9f8ae23
Correcting Navagis Corporate Link
LuminousPath Jun 7, 2020
4c97bcb
Two small JSDoc/TS fixes
mramato Jun 7, 2020
251ec6d
Update CHANGES.
mramato Jun 7, 2020
0015afb
Add some missing readonly documentation tags
fredj Jun 8, 2020
6b12258
Add false as a possible value for skyBox and SkyAtmosphere
fredj Jun 8, 2020
d0a60a8
#8927: Exposing Transforms.rotationMatrixFromPositionVelocity; Adding…
Jun 8, 2020
0fff2fe
#8927: Adding message for exposing Transforms.rotationMatrixFromPosit…
Jun 8, 2020
8811445
#8927: Running prettier on new rotationMatrixFromPositionVelocity tests
Jun 8, 2020
8b28104
Merge pull request #8928 from CesiumGS/more-ts-fixes
Jun 8, 2020
afe7b58
Only include Source folder in TypeScript smokescreen tests.
mramato Jun 8, 2020
e951c03
Merge pull request #8897 from LuminousPath/gulp_node14_fix
mramato Jun 8, 2020
661342c
Improve base url regex, add additional test.
mramato Jun 8, 2020
9741f4b
#8927: Simplifed rotationMatrixFromPositionVelocity tests
Jun 8, 2020
ac7be10
Merge pull request #8934 from easternmotors/master
mramato Jun 8, 2020
2edd86f
Merge pull request #8932 from fredj/doc_readonly
mramato Jun 8, 2020
cd781ef
Merge branch 'master' into cesiumScriptRegex
mramato Jun 8, 2020
f89e740
Merge pull request #8918 from xiaobaogeit/cesiumScriptRegex
mramato Jun 8, 2020
2a9ca28
Merge pull request #8936 from CesiumGS/fix-ts-after-build
Jun 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
!**/*.css
!**/*.html
!**/*.md
!**/*.ts

# Re-ignore a few things caught above
**/*.min.js
Expand Down
34 changes: 34 additions & 0 deletions Apps/Sandcastle/gallery/Earth at Night.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,40 @@
var viewer = new Cesium.Viewer("cesiumContainer", {
imageryProvider: new Cesium.IonImageryProvider({ assetId: 3812 }),
});

// The rest of the code is for dynamic lighting
var dynamicLighting = false;

viewer.clock.multiplier = 4000;

var imageryLayers = viewer.imageryLayers;
var nightLayer = imageryLayers.get(0);
var dayLayer = imageryLayers.addImageryProvider(
new Cesium.IonImageryProvider({
assetId: 3845,
})
);
imageryLayers.lowerToBottom(dayLayer);

function updateLighting(dynamicLighting) {
dayLayer.show = dynamicLighting;
viewer.scene.globe.enableLighting = dynamicLighting;
viewer.clock.shouldAnimate = dynamicLighting;

// If dynamic lighting is enabled, make the night imagery invisible
// on the lit side of the globe.
nightLayer.dayAlpha = dynamicLighting ? 0.0 : 1.0;
}

updateLighting(dynamicLighting);

Sandcastle.addToggleButton(
"Dynamic lighting",
dynamicLighting,
function (checked) {
updateLighting(checked);
}
);
//Sandcastle_End
Sandcastle.finishedLoading();
}
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/Fog Post Process.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
" float distance = getDistance(depthTexture, v_textureCoordinates); \n" +
" vec4 sceneColor = texture2D(colorTexture, v_textureCoordinates); \n" +
" float blendAmount = interpolateByDistance(fogByDistance, distance); \n" +
" vec4 undergroundColor = vec4(fogColor.rgb, fogColor.a * blendAmount); \n" +
" gl_FragColor = alphaBlend(undergroundColor, sceneColor); \n" +
" vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount); \n" +
" gl_FragColor = alphaBlend(finalFogColor, sceneColor); \n" +
"} \n";

var ellipsoid = viewer.scene.globe.ellipsoid;
Expand Down
5 changes: 2 additions & 3 deletions Apps/Sandcastle/gallery/Imagery Layers Manipulation.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@
addBaseLayerOption("Bing Maps Aerial", undefined); // the current base layer
addBaseLayerOption(
"Bing Maps Road",
new Cesium.BingMapsImageryProvider({
url: "https://dev.virtualearth.net",
mapStyle: Cesium.BingMapsStyle.ROAD,
Cesium.createWorldImagery({
style: Cesium.IonWorldImageryStyle.ROAD,
})
);
addBaseLayerOption(
Expand Down
45 changes: 33 additions & 12 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
# Change Log

### 1.71.0 - 2020-07-01

##### Additions :tada:

- Add a `toString` method to the `Resource` class in case an instance gets logged as a string. [#8722](https://github.com/CesiumGS/cesium/issues/8722)
- Exposed `Transforms.rotationMatrixFromPositionVelocity` method from Cesium's private API. [#8927](https://github.com/CesiumGS/cesium/issues/8927)

##### Fixes :wrench:

- Improved `MaterialProperty` JSDoc and TypeScript type definitions, which were missing the ability to take primitive types in addition to Property instances in their constructor. [#8904](https://github.com/CesiumGS/cesium/pull/8904)
- Fixed `EllipsoidGeodesic` JSDoc and TypeScript type definitions which incorrectly listed `result` as required. [#8904](https://github.com/CesiumGS/cesium/pull/8904)
- Fixed a bug with handling of PixelFormat's flipY. [#8893](https://github.com/CesiumGS/cesium/pull/8893)
- Fixed JSDoc and TypeScript type definitions for all `ImageryProvider` types, which were missing `defaultNightAlpha` and `defaultDayAlpha` properties. [#8908](https://github.com/CesiumGS/cesium/pull/8908)
- Fixed JSDoc and TypeScript type definitions for `EllipsoidTangentPlane.fromPoints`, which takes an array of `Cartesian3`, not a single instance. [#8928](https://github.com/CesiumGS/cesium/pull/8928)
- Fixed JSDoc and TypeScript type definitions for `EntityCollection.getById` and `CompositeEntityCollection.getById`, which can both return undefined. [#8928](https://github.com/CesiumGS/cesium/pull/8928)
- Fixed JSDoc and TypeScript type definitions for `Viewer` options parameter, which was incorrectly listed as required.
- Fixed a memory leak where some 3D Tiles requests were being unintentionally retained after the requests were cancelled. [#8843](https://github.com/CesiumGS/cesium/pull/8843)

### 1.70.0 - 2020-06-01

##### Major Announcements :loudspeaker:

- Cesium now ships with official TypeScript type definitions! [#8878](https://github.com/CesiumGS/cesium/pull/8878)
- If you import Cesium as a module, the new definitions will automatically be used by TypeScript and related tooling.
- If you import individual Cesium source files directly, you'll need to add `"types": ["cesium"]` in your tsconfig.json in order for the definitions to be used.
- All Cesium ion users now have access to Cesium OSM Buildings - a 3D buildings layer covering the entire world built with OpenStreetMap building data, available as 3D Tiles. Read more about it [on our blog](https://cesium.com/blog/2020/06/01/cesium-osm-buildings/).
- [Explore it on Sandcastle](https://sandcastle.cesium.com/index.html?src=Cesium%20OSM%20Buildings.html).
- Add it to your CesiumJS app: `viewer.scene.primitives.add(Cesium.createOsmBuildings())`.
- Contains per-feature data like building name, address, and much more. [Read more about the available properties](https://cesium.com/content/cesium-osm-buildings/).
- CesiumJS now ships with official TypeScript type definitions! [#8878](https://github.com/CesiumGS/cesium/pull/8878)
- If you import CesiumJS as a module, the new definitions will automatically be used by TypeScript and related tooling.
- If you import individual CesiumJS source files directly, you'll need to add `"types": ["cesium"]` in your tsconfig.json in order for the definitions to be used.
- If you’re using your own custom definitions and you’re not yet ready to switch, you can delete `Source/Cesium.d.ts` after install.
- See our [blog post](https://cesium.com/blog/2020/06/01/cesiumjs-tsd/) for more information and a technical overview of how it all works.
- CesiumJS now supports underground rendering with globe translucency! [#8726](https://github.com/CesiumGS/cesium/pull/8726)
- Added options for controlling globe translucency through the new [`GlobeTranslucency`](https://cesium.com/docs/cesiumjs-ref-doc/GlobeTranslucency.html) object including front face alpha, back face alpha, and a translucency rectangle.
- Added `Globe.undergroundColor` and `Globe.undergroundColorAlphaByDistance` for controlling how the back side of the globe is rendered when the camera is underground or the globe is translucent. [#8867](https://github.com/CesiumGS/cesium/pull/8867)
- Improved camera controls when the camera is underground. [#8811](https://github.com/CesiumGS/cesium/pull/8811)
- Sandcastle examples: [Globe Translucency](https://sandcastle.cesium.com/?src=Globe%20Translucency.html), [Globe Interior](https://sandcastle.cesium.com/?src=Globe%20Interior.html), and [Underground Color](https://sandcastle.cesium.com/?src=Underground%20Color.html&label=All)

##### Additions :tada:

- Our API reference documentation has received dozens of fixes and improvements, largely due to the TypeScript effort.
- Added support for rendering the globe with translucency. [#8726](https://github.com/CesiumGS/cesium/pull/8726)
- Added `globe.translucency.enabled` to enable globe translucency.
- Added `globe.translucency.frontFaceAlpha` and `globe.translucency.frontFaceAlphaByDistance` for controlling the alpha of front faces.
- Added `globe.translucency.backFaceAlpha` and `globe.translucency.backFaceAlphaByDistance` for controlling the alpha of back faces.
- Added `globe.translucency.rectangle` for applying translucency only within a rectangular area.
- Added `Cesium3DTileset.extensions` to get the extensions property from the tileset JSON. [#8829](https://github.com/CesiumGS/cesium/pull/8829)
- Added `frustumSplits` option to `DebugCameraPrimitive`. [8849](https://github.com/CesiumGS/cesium/pull/8849)
- Added `Camera.completeFlight`, which causes the current camera flight to immediately jump to the final destination and call its complete callback. [#8788](https://github.com/CesiumGS/cesium/pull/8788)
- Added `nightAlpha` and `dayAlpha` properties to `ImageryLayer` to control alpha separately for the night and day sides of the globe. [#8868](https://github.com/CesiumGS/cesium/pull/8868)
- Added `SkyAtmosphere.perFragmentAtmosphere` to switch between per-vertex and per-fragment atmosphere shading. [#8866](https://github.com/CesiumGS/cesium/pull/8866)
- Added `Globe.undergroundColor` and `Globe.undergroundColorAlphaByDistance` for controlling how the back side of the globe is rendered when the camera is underground or the globe is translucent. [#8867](https://github.com/CesiumGS/cesium/pull/8867)
- Added a new sandcastle example to show how to add fog using a `PostProcessStage` [#8798](https://github.com/CesiumGS/cesium/pull/8798)
- Added `frustumSplits` option to `DebugCameraPrimitive`. [8849](https://github.com/CesiumGS/cesium/pull/8849)
- Supported `#rgba` and `#rrggbbaa` formats in `Color.fromCssColorString`. [8873](https://github.com/CesiumGS/cesium/pull/8873)
- Added `Camera.completeFlight`, which causes the current camera flight to immediately jump to the final destination and call its complete callback. [#8788](https://github.com/CesiumGS/cesium/pull/8788)

##### Fixes :wrench:

Expand All @@ -35,7 +57,6 @@
- Fixed sky atmosphere artifacts below the horizon. [#8866](https://github.com/CesiumGS/cesium/pull/8866)
- Fixed ground primitives in orthographic mode. [#5110](https://github.com/CesiumGS/cesium/issues/5110)
- Fixed the depth plane in orthographic mode. This improves the quality of polylines and other primitives that are rendered near the horizon. [8858](https://github.com/CesiumGS/cesium/pull/8858)
- Fixed camera controls when the camera is underground. [#8811](https://github.com/CesiumGS/cesium/pull/8811)

### 1.69.0 - 2020-05-01

Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Samuel Vargas](https://github.com/Samulus)
- [Sam Suhag](https://github.com/sanjeetsuhag)
- [Youssef Victor](https://github.com/YoussefV)
- [Eli Bogomolny](https://github.com/ebogo1)
- [Northrop Grumman](http://www.northropgrumman.com)
- [Joseph Stein](https://github.com/nahgrin)
- [EOX IT Services GmbH](https://eox.at)
- [Daniel Santillan](https://github.com/santilland)
- [Navagis, Inc.](https://navagis.com/)
- [Jonathan Nogueira](https://github.com/LuminousPath)

## [Individual CLA](Documentation/Contributors/CLAs/individual-contributor-license-agreement-v1.0.pdf)

Expand Down Expand Up @@ -256,4 +259,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [SungHo Lim](https://github.com/SambaLim)
- [Michael Fink](https://github.com/vividos)
- [Jakub Vrana](https://github.com/vrana)
- [Edvinas Pranka](https://github.com/epranka)
- [James Bromwell](https://github.com/thw0rted)
- [Brandon Nguyen](https://github.com/bn-dignitas)
- [Wang Bao](https://github.com/xiaobaogeit)
- [John Remsberg](https://github.com/easternmotors)
4 changes: 2 additions & 2 deletions Source/Core/EllipsoidGeodesic.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ EllipsoidGeodesic.prototype.setEndPoints = function (start, end) {
* Provides the location of a point at the indicated portion along the geodesic.
*
* @param {Number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} result The object in which to store the result.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
*/
EllipsoidGeodesic.prototype.interpolateUsingFraction = function (
Expand All @@ -418,7 +418,7 @@ EllipsoidGeodesic.prototype.interpolateUsingFraction = function (
* Provides the location of a point at the indicated distance along the geodesic.
*
* @param {Number} distance The distance from the inital point to the point of interest along the geodesic
* @param {Cartographic} result The object in which to store the result.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
*
* @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/EllipsoidTangentPlane.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Object.defineProperties(EllipsoidTangentPlane.prototype, {

/**
* Gets the local Z-axis (up) of the tangent plane.
* @member EllipsoidTangentPlane.prototype
* @memberof EllipsoidTangentPlane.prototype
* @readonly
* @type {Cartesian3}
*/
Expand All @@ -135,7 +135,7 @@ var tmp = new AxisAlignedBoundingBox();
* Creates a new instance from the provided ellipsoid and the center
* point of the provided Cartesians.
*
* @param {Cartesian3} cartesians The list of positions surrounding the center point.
* @param {Cartesian3[]} cartesians The list of positions surrounding the center point.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
*/
EllipsoidTangentPlane.fromPoints = function (cartesians, ellipsoid) {
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/HeadingPitchRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ function HeadingPitchRange(heading, pitch, range) {
/**
* Heading is the rotation from the local north direction where a positive angle is increasing eastward.
* @type {Number}
* @default 0.0
*/
this.heading = defaultValue(heading, 0.0);

/**
* Pitch is the rotation from the local xy-plane. Positive pitch angles
* are above the plane. Negative pitch angles are below the plane.
* @type {Number}
* @default 0.0
*/
this.pitch = defaultValue(pitch, 0.0);

/**
* Range is the distance from the center of the local frame.
* @type {Number}
* @default 0.0
*/
this.range = defaultValue(range, 0.0);
}
Expand Down
15 changes: 15 additions & 0 deletions Source/Core/HeadingPitchRoll.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,23 @@ import CesiumMath from "./Math.js";
* @param {Number} [roll=0.0] The roll component in radians.
*/
function HeadingPitchRoll(heading, pitch, roll) {
/**
* Gets or sets the heading.
* @type {Number}
* @default 0.0
*/
this.heading = defaultValue(heading, 0.0);
/**
* Gets or sets the pitch.
* @type {Number}
* @default 0.0
*/
this.pitch = defaultValue(pitch, 0.0);
/**
* Gets or sets the roll.
* @type {Number}
* @default 0.0
*/
this.roll = defaultValue(roll, 0.0);
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Ion.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Resource from "./Resource.js";

var defaultTokenCredit;
var defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiNWMwZmFjMy04ZmRmLTRhMjktYjUzYi00YWQ4N2ZiNmIwNjUiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTg4MzQxMTA4fQ.scXa4kn5vzNVSgsEYKNYP0szYXPq1Djx1SH0KcAOrrk";
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwNjk5ODcyYS00MWMyLTQ1NjctYTRhYS0zMmM3ZjYzMGM2ZGEiLCJpZCI6MjU5LCJzY29wZXMiOlsiYXNyIiwiZ2MiXSwiaWF0IjoxNTkxMDI3NDUwfQ.xUBBQH34cd86pfNMSQ6tBBelRx3g_RS51-nSUFlZq24";
/**
* Default settings for accessing the Cesium ion API.
*
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/PixelFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ PixelFormat.flipY = function (
var numberOfComponents = PixelFormat.componentsLength(pixelFormat);
var textureWidth = width * numberOfComponents;
for (var i = 0; i < height; ++i) {
var row = i * height * numberOfComponents;
var flippedRow = (height - i - 1) * height * numberOfComponents;
var row = i * width * numberOfComponents;
var flippedRow = (height - i - 1) * width * numberOfComponents;
for (var j = 0; j < textureWidth; ++j) {
flipped[flippedRow + j] = bufferView[row + j];
}
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Rectangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Object.defineProperties(Rectangle.prototype, {
* Gets the width of the rectangle in radians.
* @memberof Rectangle.prototype
* @type {Number}
* @readonly
*/
width: {
get: function () {
Expand All @@ -68,6 +69,7 @@ Object.defineProperties(Rectangle.prototype, {
* Gets the height of the rectangle in radians.
* @memberof Rectangle.prototype
* @type {Number}
* @readonly
*/
height: {
get: function () {
Expand Down
9 changes: 8 additions & 1 deletion Source/Core/RequestScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ function getRequestReceivedFunction(request) {
requestCompletedEvent.raiseEvent();
request.state = RequestState.RECEIVED;
request.deferred.resolve(results);
// explicitly set to undefined to ensure GC of request response data. See #8843
request.deferred = undefined;
};
}

Expand Down Expand Up @@ -218,7 +220,12 @@ function cancelRequest(request) {
var active = request.state === RequestState.ACTIVE;
request.state = RequestState.CANCELLED;
++statistics.numberOfCancelledRequests;
request.deferred.reject();
// check that deferred has not been cleared since cancelRequest can be called
// on a finished request, e.g. by clearForSpecs during tests
if (defined(request.deferred)) {
request.deferred.reject();
request.deferred = undefined;
}

if (active) {
--statistics.numberOfActiveRequests;
Expand Down
15 changes: 14 additions & 1 deletion Source/Core/Resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,21 @@ Object.defineProperties(Resource.prototype, {
},
});

/**
* Override Object#toString so that implicit string conversion gives the
* complete URL represented by this Resource.
*
* @returns {String} The URL represented by this Resource
*/
Resource.prototype.toString = function () {
return this.getUrlComponent(true, true);
};

/**
* Returns the url, optional with the query string and processed by a proxy.
*
* @param {Boolean} [query=false] If true, the query string is included.
* @param {Boolean} [proxy=false] If true, the url is processed the proxy object if defined.
* @param {Boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.
*
* @returns {String} The url with all the requested components.
*/
Expand Down Expand Up @@ -1357,9 +1367,12 @@ Resource.prototype._makeRequest = function (options) {

return promise
.then(function (data) {
// explicitly set to undefined to ensure GC of request response data. See #8843
request.cancelFunction = undefined;
return data;
})
.otherwise(function (e) {
request.cancelFunction = undefined;
if (request.state !== RequestState.FAILED) {
return when.reject(e);
}
Expand Down
8 changes: 7 additions & 1 deletion Source/Core/Transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,13 @@ var rightScratch = new Cartesian3();
var upScratch = new Cartesian3();

/**
* @private
* Transform a position and velocity to a rotation matrix.
*
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} velocity The velocity vector to transform.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
*/
Transforms.rotationMatrixFromPositionVelocity = function (
position,
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/buildModuleUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Resource from "./Resource.js";

/*global CESIUM_BASE_URL*/

var cesiumScriptRegex = /((?:.*\/)|^)Cesium\.js$/;
var cesiumScriptRegex = /((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;
function getBaseUrlFromCesiumScript() {
var scripts = document.getElementsByTagName("script");
for (var i = 0, len = scripts.length; i < len; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/BoxGraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets {@link Cartesian3} Property property specifying the length, width, and height of the box.
* @memberof BoxGraphics.prototype
* @type {Property}
* @type {Property|undefined}
*/
dimensions: createPropertyDescriptor("dimensions"),

Expand Down
Loading