Skip to content

Commit

Permalink
Merge master into cesiumjs.org-links
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Shehata committed Oct 25, 2019
2 parents 3558940 + af4c339 commit 55296d4
Show file tree
Hide file tree
Showing 54 changed files with 285 additions and 6,812 deletions.
Binary file modified Apps/SampleData/fire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Apps/SampleData/models/CesiumAir/0_Cesium_Air.png
Binary file not shown.
Binary file not shown.
333 changes: 0 additions & 333 deletions Apps/SampleData/models/CesiumAir/Cesium_Air.dae

This file was deleted.

802 changes: 0 additions & 802 deletions Apps/SampleData/models/CesiumAir/Cesium_Air.gltf

This file was deleted.

510 changes: 0 additions & 510 deletions Apps/SampleData/models/CesiumBalloon/CesiumBalloon.dae

This file was deleted.

Binary file not shown.
Binary file removed Apps/SampleData/models/CesiumBalloon/FlameGrate.png
Binary file not shown.
Binary file not shown.
843 changes: 0 additions & 843 deletions Apps/SampleData/models/CesiumMan/Cesium_Man.dae

This file was deleted.

2,207 changes: 0 additions & 2,207 deletions Apps/SampleData/models/CesiumMan/Cesium_Man.gltf

This file was deleted.

Binary file removed Apps/SampleData/models/CesiumMan/Cesium_Man.jpg
Binary file not shown.
750 changes: 0 additions & 750 deletions Apps/SampleData/models/CesiumMilkTruck/CesiumMilkTruck-kmc.gltf

This file was deleted.

412 changes: 0 additions & 412 deletions Apps/SampleData/models/CesiumMilkTruck/CesiumMilkTruck.dae

This file was deleted.

866 changes: 0 additions & 866 deletions Apps/SampleData/models/CesiumMilkTruck/CesiumMilkTruck.gltf

This file was deleted.

Binary file not shown.
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Image-Based Lighting.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
window.alert('This browser does not support specular environment maps.');
}

var environmentMapURL = '../../SampleData/EnvironmentMap/kiara_6_afternoon_2k_ibl.ktx';
var environmentMapURL = 'https://cesium.com/assets/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:
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Interpolation.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

//Load the Cesium plane model to represent the entity
model : {
uri : '../../SampleData/models/CesiumAir/Cesium_Air.gltf',
uri : '../../SampleData/models/CesiumAir/Cesium_Air.glb',
minimumPixelSize : 64
},

Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Particle System Tails.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
var orientation = Cesium.Transforms.headingPitchRollQuaternion(planePosition, hpr);
var entity = viewer.entities.add({
model : {
uri : '../../SampleData/models/CesiumAir/Cesium_Air.gltf',
uri : '../../SampleData/models/CesiumAir/Cesium_Air.glb',
scale : 3.5
},
position : planePosition,
Expand Down
3 changes: 2 additions & 1 deletion Apps/Sandcastle/gallery/Star Burst.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@

var drawingBufferWidth = scene.drawingBufferWidth;
var drawingBufferHeight = scene.drawingBufferHeight;
var pixelRatio = scene.pixelRatio;

var diff = Cesium.Cartesian3.subtract(entityPosition, camera.positionWC, new Cesium.Cartesian3());
var distance = Cesium.Cartesian3.dot(camera.directionWC, diff);

var dimensions = camera.frustum.getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, new Cesium.Cartesian2());
var dimensions = camera.frustum.getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, new Cesium.Cartesian2());
Cesium.Cartesian2.multiplyByScalar(offset, Cesium.Cartesian2.maximumComponent(dimensions), offset);

var labelOffset;
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Time Dynamic Wheels.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
});

//Make sure viewer is at the desired time.
var start = Cesium.JulianDate.fromDate(new Date(2018, 11, 12));
var start = Cesium.JulianDate.fromDate(new Date(2018, 11, 12, 15));
var totalSeconds = 10;
var stop = Cesium.JulianDate.addSeconds(start, totalSeconds, new Cesium.JulianDate());
viewer.clock.startTime = start.clone();
Expand Down
8 changes: 4 additions & 4 deletions Apps/Sandcastle/gallery/development/3D Models Instancing.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
var instancedArraysExtension = context._instancedArrays;
var count = 1024;
var spacing = 0.0002;
var url = '../../SampleData/models/CesiumAir/Cesium_Air.gltf';
var url = '../../SampleData/models/CesiumAir/Cesium_Air.glb';
var useCollection = true;

var centerLongitude = -75.61209431;
Expand Down Expand Up @@ -181,7 +181,7 @@
Sandcastle.addToolbarMenu([ {
text : 'Aircraft',
onselect : function() {
url = '../../SampleData/models/CesiumAir/Cesium_Air.gltf';
url = '../../SampleData/models/CesiumAir/Cesium_Air.glb';
spacing = 0.0002;
reset();
}
Expand All @@ -195,14 +195,14 @@
}, {
text : 'Milk Truck',
onselect : function() {
url = '../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck.gltf';
url = '../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck.glb';
spacing = 0.00008;
reset();
}
}, {
text : 'Skinned Character',
onselect : function() {
url = '../../SampleData/models/CesiumMan/Cesium_Man.gltf';
url = '../../SampleData/models/CesiumMan/Cesium_Man.glb';
spacing = 0.00001;
reset();
}
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/development/Picking.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
}

primitive = scene.primitives.add(new Cesium.ModelInstanceCollection({
url : '../../SampleData/models/CesiumAir/Cesium_Air.gltf',
url : '../../SampleData/models/CesiumAir/Cesium_Air.glb',
instances : instances
}));

Expand Down
13 changes: 10 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@ Change Log

### 1.63 - 2019-11-01

##### Additions :tada:
* We’ve consolidated all of our website content from cesiumjs.org and cesium.com into one home on cesium.com. Here’s where you can now find:
We’ve consolidated all of our website content from cesiumjs.org and cesium.com into one home on cesium.com. Here’s where you can now find:
* [Sandcastle](https://sandcastle.cesium.com) - `https://sandcastle.cesium.com`
* [API Docs](https://cesium.com/docs/cesiumjs-ref-doc/) - `https://cesium.com/docs/cesiumjs-ref-doc/`
* [Downloads](https://cesium.com/downloads/) - `https://cesium.com/downloads/`
* Hosted releases can be found at `https://cesium.com/downloads/cesiumjs/releases/<CesiumJS Version Number>/Build/Cesium/Cesium.js`
* See our [Blog post](https://cesium.com/blog/2019/10/15/cesiumjs-migration/) for more information.

##### Fixes :wrench:
##### Additions :tada:
* Added `pixelRatio` parameter to `OrthographicFrustum.getPixelDimensions`, `OrthographicOffCenterFrustum.getPixelDimensions`, `PerspectiveFrustum.getPixelDimensions`, and `PerspectiveOffCenterFrustum.getPixelDimensions`. Pass in `scene.pixelRatio` for dimensions in CSS pixel units or `1.0` for dimensions in native device pixel units. [#8237](https://github.com/AnalyticalGraphicsInc/cesium/pull/8237)

##### Fixes :wrench:
* Fixed css pixel usage for polylines, point clouds, models, primitives, and post-processing. [#8113](https://github.com/AnalyticalGraphicsInc/cesium/issues/8113)
* Fixed a bug where `scene.sampleHeightMostDetailed` and `scene.clampToHeightMostDetailed` would not resolve in request render mode. [#8281](https://github.com/AnalyticalGraphicsInc/cesium/issues/8281)
* Fixed seam artifacts when log depth is disabled, `scene.globe.depthTestAgainstTerrain` is false, and primitives are under the globe. [#8205](https://github.com/AnalyticalGraphicsInc/cesium/pull/8205)
* Fix dynamic ellipsoids using `innerRadii`, `minimumClock`, `maximumClock`, `minimumCone` or `maximumCone`. [#8277](https://github.com/AnalyticalGraphicsInc/cesium/pull/8277)

##### Deprecated :hourglass_flowing_sand:
* `OrthographicFrustum.getPixelDimensions`, `OrthographicOffCenterFrustum.getPixelDimensions`, `PerspectiveFrustum.getPixelDimensions`, and `PerspectiveOffCenterFrustum.getPixelDimensions` now take a `pixelRatio` argument before the `result` argument. The previous function definition will no longer work in 1.65. [#8237](https://github.com/AnalyticalGraphicsInc/cesium/pull/8237)


### 1.62 - 2019-10-01

##### Deprecated :hourglass_flowing_sand:
Expand Down
16 changes: 13 additions & 3 deletions Source/Core/OrthographicFrustum.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Cartesian2 from './Cartesian2.js';
import Check from './Check.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import defineProperties from './defineProperties.js';
import deprecationWarning from './deprecationWarning.js';
import DeveloperError from './DeveloperError.js';
import CesiumMath from './Math.js';
import OrthographicOffCenterFrustum from './OrthographicOffCenterFrustum.js';
Expand Down Expand Up @@ -200,20 +202,28 @@ import OrthographicOffCenterFrustum from './OrthographicOffCenterFrustum.js';
* @param {Number} drawingBufferWidth The width of the drawing buffer.
* @param {Number} drawingBufferHeight The height of the drawing buffer.
* @param {Number} distance The distance to the near plane in meters.
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
*
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
* @exception {DeveloperError} pixelRatio must be greater than zero.
*
* @example
* // Example 1
* // Get the width and height of a pixel.
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, new Cesium.Cartesian2());
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, scene.pixelRatio, new Cesium.Cartesian2());
*/
OrthographicFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, result) {
OrthographicFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
update(this);
return this._offCenterFrustum.getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, result);

if (pixelRatio instanceof Cartesian2) {
result = pixelRatio;
pixelRatio = 1.0;
deprecationWarning('getPixelDimensions-parameter-change', 'getPixelDimensions now takes a pixelRatio argument before the result argument in Cesium 1.63. The previous function definition will no longer work in 1.65.');
}
return this._offCenterFrustum.getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result);
};

/**
Expand Down
24 changes: 20 additions & 4 deletions Source/Core/OrthographicOffCenterFrustum.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Cartesian2 from './Cartesian2.js';
import Cartesian3 from './Cartesian3.js';
import Cartesian4 from './Cartesian4.js';
import CullingVolume from './CullingVolume.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import defineProperties from './defineProperties.js';
import deprecationWarning from './deprecationWarning.js';
import DeveloperError from './DeveloperError.js';
import CesiumMath from './Math.js';
import Matrix4 from './Matrix4.js';
Expand Down Expand Up @@ -272,20 +274,28 @@ import Matrix4 from './Matrix4.js';
* @param {Number} drawingBufferWidth The width of the drawing buffer.
* @param {Number} drawingBufferHeight The height of the drawing buffer.
* @param {Number} distance The distance to the near plane in meters.
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
*
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
* @exception {DeveloperError} pixelRatio must be greater than zero.
*
* @example
* // Example 1
* // Get the width and height of a pixel.
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, new Cesium.Cartesian2());
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, scene.pixelRatio, new Cesium.Cartesian2());
*/
OrthographicOffCenterFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, result) {
OrthographicOffCenterFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
update(this);

if (pixelRatio instanceof Cartesian2) {
result = pixelRatio;
pixelRatio = 1.0;
deprecationWarning('getPixelDimensions-parameter-change', 'getPixelDimensions now takes a pixelRatio argument before the result argument in Cesium 1.63. The previous function definition will no longer work in 1.65.');
}

//>>includeStart('debug', pragmas.debug);
if (!defined(drawingBufferWidth) || !defined(drawingBufferHeight)) {
throw new DeveloperError('Both drawingBufferWidth and drawingBufferHeight are required.');
Expand All @@ -299,15 +309,21 @@ import Matrix4 from './Matrix4.js';
if (!defined(distance)) {
throw new DeveloperError('distance is required.');
}
if (!defined(pixelRatio)) {
throw new DeveloperError('pixelRatio is required.');
}
if (pixelRatio <= 0) {
throw new DeveloperError('pixelRatio must be greater than zero.');
}
if (!defined(result)) {
throw new DeveloperError('A result object is required.');
}
//>>includeEnd('debug');

var frustumWidth = this.right - this.left;
var frustumHeight = this.top - this.bottom;
var pixelWidth = frustumWidth / drawingBufferWidth;
var pixelHeight = frustumHeight / drawingBufferHeight;
var pixelWidth = pixelRatio * frustumWidth / drawingBufferWidth;
var pixelHeight = pixelRatio * frustumHeight / drawingBufferHeight;

result.x = pixelWidth;
result.y = pixelHeight;
Expand Down
19 changes: 15 additions & 4 deletions Source/Core/PerspectiveFrustum.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Cartesian2 from './Cartesian2.js';
import Check from './Check.js';
import defaultValue from './defaultValue.js';
import defined from './defined.js';
import defineProperties from './defineProperties.js';
import deprecationWarning from './deprecationWarning.js';
import DeveloperError from './DeveloperError.js';
import CesiumMath from './Math.js';
import PerspectiveOffCenterFrustum from './PerspectiveOffCenterFrustum.js';
Expand Down Expand Up @@ -284,16 +286,18 @@ import PerspectiveOffCenterFrustum from './PerspectiveOffCenterFrustum.js';
* @param {Number} drawingBufferWidth The width of the drawing buffer.
* @param {Number} drawingBufferHeight The height of the drawing buffer.
* @param {Number} distance The distance to the near plane in meters.
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
*
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
* @exception {DeveloperError} pixelRatio must be greater than zero.
*
* @example
* // Example 1
* // Get the width and height of a pixel.
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, new Cesium.Cartesian2());
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
*
* @example
* // Example 2
Expand All @@ -304,11 +308,18 @@ import PerspectiveOffCenterFrustum from './PerspectiveOffCenterFrustum.js';
* var toCenter = Cesium.Cartesian3.subtract(primitive.boundingVolume.center, position, new Cesium.Cartesian3()); // vector from camera to a primitive
* var toCenterProj = Cesium.Cartesian3.multiplyByScalar(direction, Cesium.Cartesian3.dot(direction, toCenter), new Cesium.Cartesian3()); // project vector onto camera direction vector
* var distance = Cesium.Cartesian3.magnitude(toCenterProj);
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, new Cesium.Cartesian2());
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, scene.pixelRatio, new Cesium.Cartesian2());
*/
PerspectiveFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, result) {
PerspectiveFrustum.prototype.getPixelDimensions = function(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) {
update(this);
return this._offCenterFrustum.getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, result);

if (pixelRatio instanceof Cartesian2) {
result = pixelRatio;
pixelRatio = 1.0;
deprecationWarning('getPixelDimensions-parameter-change', 'getPixelDimensions now takes a pixelRatio argument before the result argument in Cesium 1.63. The previous function definition will no longer work in 1.65.');
}

return this._offCenterFrustum.getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result);
};

/**
Expand Down
Loading

0 comments on commit 55296d4

Please sign in to comment.