Skip to content

Commit

Permalink
Merge branch 'master' into pixelRatioFrustum
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse authored Oct 24, 2019
2 parents bd307a7 + 67b1130 commit 9cbfa9b
Show file tree
Hide file tree
Showing 21 changed files with 308 additions and 103 deletions.
6 changes: 3 additions & 3 deletions Apps/Sandcastle/gallery/Export KML.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"cartographicDegrees" : [-77, 37, 0]
},
"model": {
"gltf" : "../../../../Apps/SampleData/models/CesiumMilkTruck/CesiumMilkTruck.glb"
"gltf" : "../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck.glb"
}
}];

Expand All @@ -64,11 +64,11 @@

// We fetch the resources that will be embedded in the KMZ file.
var daeModelPromise = Cesium.Resource.fetchBlob({
url: '../../../../Apps/SampleData/models/CesiumMilkTruck/CesiumMilkTruck.dae'
url: '../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck.dae'
});

var texturePromise = Cesium.Resource.fetchBlob({
url: '../../../../Apps/SampleData/models/CesiumMilkTruck/CesiumMilkTruck.png'
url: '../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck.png'
});

// This callback allows us to set the URL of the model to use
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/High Dynamic Range.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
viewer.scene.highDynamicRange = checked;
});

var url = '../../../../Apps/SampleData/models/DracoCompressed/CesiumMilkTruck.gltf';
var url = '../../SampleData/models/DracoCompressed/CesiumMilkTruck.gltf';
var position = Cesium.Cartesian3.fromRadians(-1.9516424279517286, 0.6322397098422969, 1239.0006814631095);
var heading = Cesium.Math.toRadians(-15.0);
var pitch = 0;
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
2 changes: 1 addition & 1 deletion Apps/Sandcastle/load-cesium-es6.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file loads the unbuilt ES6 version of Cesium
// into the global scope during local developmnet
import * as Cesium from "../../../Source/Cesium.js";
import * as Cesium from "../../Source/Cesium.js";
window.Cesium = Cesium;

// Since ES6 modules have no guaranteed load order,
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Change Log

##### 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)

### 1.62 - 2019-10-01

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2011-2018 CesiumJS Contributors
Copyright 2011-2019 CesiumJS Contributors

Apache License
Version 2.0, January 2004
Expand Down
1 change: 0 additions & 1 deletion Source/Assets/approximateTerrainHeightsPrecise.json

This file was deleted.

48 changes: 32 additions & 16 deletions Source/DataSources/EllipsoidGeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import Property from './Property.js';

var offsetScratch = new Cartesian3();
var radiiScratch = new Cartesian3();
var innerRadiiScratch = new Cartesian3();
var scratchColor = new Color();
var unitSphere = new Cartesian3(1, 1, 1);

Expand Down Expand Up @@ -83,8 +84,8 @@ import Property from './Property.js';
* @memberof EllipsoidGeometryUpdater.prototype
* @readonly
*/
terrainOffsetProperty: {
get: function() {
terrainOffsetProperty : {
get : function() {
return this._terrainOffsetProperty;
}
}
Expand Down Expand Up @@ -117,7 +118,7 @@ import Property from './Property.js';
show : show,
distanceDisplayCondition : distanceDisplayConditionAttribute,
color : undefined,
offset: undefined
offset : undefined
};

if (this._materialProperty instanceof ColorMaterialProperty) {
Expand Down Expand Up @@ -194,9 +195,14 @@ import Property from './Property.js';
return !entity.position.isConstant || //
!Property.isConstant(entity.orientation) || //
!ellipsoid.radii.isConstant || //
!Property.isConstant(ellipsoid.innerRadii) || //
!Property.isConstant(ellipsoid.stackPartitions) || //
!Property.isConstant(ellipsoid.slicePartitions) || //
!Property.isConstant(ellipsoid.outlineWidth) || //
!Property.isConstant(ellipsoid.minimumClock) || //
!Property.isConstant(ellipsoid.maximumClock) || //
!Property.isConstant(ellipsoid.minimumCone) || //
!Property.isConstant(ellipsoid.maximumCone) || //
!Property.isConstant(ellipsoid.subdivisions);
};

Expand Down Expand Up @@ -282,6 +288,11 @@ import Property from './Property.js';
var material = MaterialProperty.getValue(time, defaultValue(ellipsoid.material, defaultMaterial), this._material);

// Check properties that could trigger a primitive rebuild.
var innerRadii = Property.getValueOrUndefined(ellipsoid.innerRadii, time, innerRadiiScratch);
var minimumClock = Property.getValueOrUndefined(ellipsoid.minimumClock, time);
var maximumClock = Property.getValueOrUndefined(ellipsoid.maximumClock, time);
var minimumCone = Property.getValueOrUndefined(ellipsoid.minimumCone, time);
var maximumCone = Property.getValueOrUndefined(ellipsoid.maximumCone, time);
var stackPartitions = Property.getValueOrUndefined(ellipsoid.stackPartitions, time);
var slicePartitions = Property.getValueOrUndefined(ellipsoid.slicePartitions, time);
var subdivisions = Property.getValueOrUndefined(ellipsoid.subdivisions, time);
Expand All @@ -307,7 +318,10 @@ import Property from './Property.js';
//For the radii, we use unit sphere and then deform it with a scale matrix.
var rebuildPrimitives = !in3D || this._lastSceneMode !== sceneMode || !defined(this._primitive) || //
options.stackPartitions !== stackPartitions || options.slicePartitions !== slicePartitions || //
options.subdivisions !== subdivisions || this._lastOutlineWidth !== outlineWidth || options.offsetAttribute !== offsetAttribute;
defined(innerRadii) && !Cartesian3.equals(options.innerRadii !== innerRadii) || options.minimumClock !== minimumClock || //
options.maximumClock !== maximumClock || options.minimumCone !== minimumCone || //
options.maximumCone !== maximumCone || options.subdivisions !== subdivisions || //
this._lastOutlineWidth !== outlineWidth || options.offsetAttribute !== offsetAttribute;

if (rebuildPrimitives) {
var primitives = this._primitives;
Expand All @@ -322,19 +336,21 @@ import Property from './Property.js';
options.slicePartitions = slicePartitions;
options.subdivisions = subdivisions;
options.offsetAttribute = offsetAttribute;
options.radii = in3D ? unitSphere : radii;
var innerRadii = Property.getValueOrDefault(ellipsoid.innerRadii, time, radii, new Cartesian3());
if (in3D) {
var mag = Cartesian3.magnitude(radii);
var innerRadiiUnit = new Cartesian3(innerRadii.x/mag, innerRadii.y/mag, innerRadii.z/mag);
options.innerRadii = innerRadiiUnit;
options.radii = Cartesian3.clone(in3D ? unitSphere : radii, options.radii);
if (defined(innerRadii)) {
if (in3D) {
var mag = Cartesian3.magnitude(radii);
options.innerRadii = Cartesian3.fromElements(innerRadii.x / mag, innerRadii.y / mag, innerRadii.z / mag, options.innerRadii);
} else {
options.innerRadii = Cartesian3.clone(innerRadii, options.innerRadii);
}
} else {
options.innerRadii = innerRadii;
options.innerRadii = undefined;
}
options.minimumClock = Property.getValueOrUndefined(ellipsoid.minimumClock, time);
options.maximumClock = Property.getValueOrUndefined(ellipsoid.maximumClock, time);
options.minimumCone = Property.getValueOrUndefined(ellipsoid.minimumCone, time);
options.maximumCone = Property.getValueOrUndefined(ellipsoid.maximumCone, time);
options.minimumClock = minimumClock;
options.maximumClock = maximumClock;
options.minimumCone = minimumCone;
options.maximumCone = maximumCone;

var appearance = new MaterialAppearance({
material : material,
Expand Down Expand Up @@ -415,7 +431,7 @@ import Property from './Property.js';

if (!Cartesian3.equals(offset, this._lastOffset)) {
attributes.offset = OffsetGeometryInstanceAttribute.toValue(offset, attributes.offset);
outlineAttributes.offset = OffsetGeometryInstanceAttribute.toValue(offset, attributes.offset);
outlineAttributes.offset = OffsetGeometryInstanceAttribute.toValue(offset, attributes.offset);
Cartesian3.clone(offset, this._lastOffset);
}
}
Expand Down
Loading

0 comments on commit 9cbfa9b

Please sign in to comment.