Skip to content

Commit 524ecd0

Browse files
authored
Merge branch 'master' into removeSamples
2 parents 36c65a1 + afe5e3e commit 524ecd0

36 files changed

+456
-87
lines changed

.idea/inspectionProfiles/profiles_settings.xml

-7
This file was deleted.

.slackbot.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ releaseSchedule:
22
ggetz: 2/1/2019
33
hpinkos: 3/1/2019
44
lilleyse: 4/1/2019
5-
gary: 5/1/2019
5+
tfili: 5/1/2019
66
dbagnell: 6/3/2019
7-
mamato: 7/1/2019
7+
tfili: 7/1/2019
88
tfili: 8/1/2019
99

1010
greetings:

Apps/Sandcastle/gallery/CZML Polyline.html

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<script type="text/javascript" src="../Sandcastle-header.js"></script>
1111
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
1212
<script type="text/javascript">
13-
require.config({
14-
baseUrl : '../../../Source',
15-
waitSeconds : 60
16-
});
13+
if(typeof require === 'function') {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
1719
</script>
1820
</head>
1921
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
@@ -65,9 +67,10 @@
6567
"material" : {
6668
"polylineGlow" : {
6769
"color" : {
68-
"rgba" : [0, 0, 255, 255]
70+
"rgba" : [100, 149, 237, 255]
6971
},
70-
"glowPower" : 0.2
72+
"glowPower" : 0.2,
73+
"taperPower" : 0.5
7174
}
7275
},
7376
"width" : 10

Apps/Sandcastle/gallery/HeadingPitchRoll.html

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<script type="text/javascript" src="../Sandcastle-header.js"></script>
1111
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
1212
<script type="text/javascript">
13-
require.config({
14-
baseUrl : '../../../Source',
15-
waitSeconds : 60
16-
});
13+
if(typeof require === 'function') {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
1719
</script>
1820
</head>
1921
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
@@ -92,6 +94,7 @@ <h1>Loading...</h1>
9294
resolution : 1,
9395
material : new Cesium.PolylineGlowMaterialProperty({
9496
glowPower : 0.3,
97+
taperPower : 0.3,
9598
color : Cesium.Color.PALEGOLDENROD
9699
})
97100
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
7+
<meta name="description" content="Apply simple color-to-alpha on imagery layers.">
8+
<meta name="cesium-sandcastle-labels" content="Beginner, Tutorials">
9+
<title>Cesium Demo</title>
10+
<script type="text/javascript" src="../Sandcastle-header.js"></script>
11+
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
12+
<script type="text/javascript">
13+
if(typeof require === 'function') {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
19+
</script>
20+
</head>
21+
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
22+
<style>
23+
@import url(../templates/bucket.css);
24+
#toolbar {
25+
background: rgba(42, 42, 42, 0.8);
26+
padding: 4px;
27+
border-radius: 4px;
28+
}
29+
</style>
30+
<div id="cesiumContainer" class="fullSize"></div>
31+
<div id="loadingOverlay"><h1>Loading...</h1></div>
32+
<div id="toolbar">
33+
<table><tbody>
34+
<tr>
35+
<td>Threshold</td>
36+
<td>
37+
<input type="range" min="0.0" max="1.0" step="0.01" data-bind="value: threshold, valueUpdate: 'input'">
38+
</td>
39+
</tr>
40+
</tbody></table>
41+
</div>
42+
<script id="cesium_sandcastle_script">
43+
function startup(Cesium) {
44+
'use strict';
45+
//Sandcastle_Begin
46+
var viewer = new Cesium.Viewer('cesiumContainer');
47+
48+
var layers = viewer.scene.imageryLayers;
49+
50+
// Set oceans on Bing base layer to transparent
51+
var baseLayer = layers.get(0);
52+
baseLayer.colorToAlpha = new Cesium.Color(0.0, 0.016, 0.059);
53+
baseLayer.colorToAlphaThreshold = 0.2;
54+
55+
// Add a bump layer with adjustable threshold
56+
var singleTileLayer = layers.addImageryProvider(new Cesium.SingleTileImageryProvider({
57+
url : '../images/earthbump1k.jpg',
58+
rectangle : Cesium.Rectangle.fromDegrees(-180.0, -90.0, 180.0, 90.0)
59+
}));
60+
61+
singleTileLayer.colorToAlpha = new Cesium.Color(0.0, 0.0, 0.0, 1.0);
62+
singleTileLayer.colorToAlphaThreshold = 0.1;
63+
64+
var viewModel = {
65+
threshold : singleTileLayer.colorToAlphaThreshold
66+
};
67+
68+
Cesium.knockout.track(viewModel);
69+
70+
var toolbar = document.getElementById('toolbar');
71+
Cesium.knockout.applyBindings(viewModel, toolbar);
72+
73+
Cesium.knockout.getObservable(viewModel, 'threshold').subscribe(
74+
function(newValue) {
75+
singleTileLayer.colorToAlphaThreshold = parseFloat(viewModel.threshold);
76+
}
77+
);//Sandcastle_End
78+
Sandcastle.finishedLoading();
79+
}
80+
if (typeof Cesium !== 'undefined') {
81+
startup(Cesium);
82+
} else if (typeof require === 'function') {
83+
require(['Cesium'], startup);
84+
}
85+
</script>
86+
</body>
87+
</html>
Loading

Apps/Sandcastle/gallery/Materials.html

+9-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<script type="text/javascript" src="../Sandcastle-header.js"></script>
1111
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
1212
<script type="text/javascript">
13-
require.config({
14-
baseUrl : '../../../Source',
15-
waitSeconds : 60
16-
});
13+
if(typeof require === 'function') {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
1719
</script>
1820
</head>
1921
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
@@ -288,7 +290,9 @@
288290
function applyPolylineGlowMaterial(primitive, scene) {
289291
Sandcastle.declare(applyPolylineGlowMaterial); // For highlighting in Sandcastle.
290292
var material = Cesium.Material.fromType('PolylineGlow', {
291-
innerWidth : primitive.width / 2.0
293+
color : Cesium.Color.CRIMSON,
294+
glowPower : 0.2,
295+
taperPower : 0.4
292296
});
293297
primitive.material = material;
294298
}

Apps/Sandcastle/gallery/Polyline.html

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<script type="text/javascript" src="../Sandcastle-header.js"></script>
1111
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
1212
<script type="text/javascript">
13-
require.config({
14-
baseUrl : '../../../Source',
15-
waitSeconds : 60
16-
});
13+
if(typeof require === 'function') {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
1719
</script>
1820
</head>
1921
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
@@ -59,7 +61,8 @@
5961
width : 10,
6062
material : new Cesium.PolylineGlowMaterialProperty({
6163
glowPower : 0.2,
62-
color : Cesium.Color.BLUE
64+
taperPower : 0.5,
65+
color : Cesium.Color.CORNFLOWERBLUE
6366
})
6467
}
6568
});
@@ -103,7 +106,7 @@
103106

104107
viewer.zoomTo(viewer.entities);
105108
//Sandcastle_End
106-
Sandcastle.finishedLoading();
109+
Sandcastle.finishedLoading();
107110
}
108111
if (typeof Cesium !== 'undefined') {
109112
startup(Cesium);

Apps/Sandcastle/gallery/development/Corridor.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
// Create the corridor geometry. Use the height option
6666
// to set the corridor distance from the ground.
67-
// In this case, we are also useing the corner type
67+
// In this case, we are also using the corner type
6868
// option to draw mitered corners.
6969
corridorGeometry = new Cesium.CorridorGeometry({
7070
positions : Cesium.Cartesian3.fromDegreesArray([

Apps/Sandcastle/gallery/development/Polylines.html

+8-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<script type="text/javascript" src="../Sandcastle-header.js"></script>
1111
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
1212
<script type="text/javascript">
13-
require.config({
14-
baseUrl : '../../../Source',
15-
waitSeconds : 60
16-
});
13+
if(typeof require === 'function') {
14+
require.config({
15+
baseUrl : '../../../Source',
16+
waitSeconds : 120
17+
});
18+
}
1719
</script>
1820
</head>
1921
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
@@ -64,7 +66,8 @@
6466
-85.0, 40.0])
6567
}),
6668
material : Cesium.Material.fromType(Cesium.Material.PolylineGlowType, {
67-
glowPower : 0.25,
69+
glowPower : 0.2,
70+
taperPower : 0.2,
6871
color : new Cesium.Color(1.0, 0.5, 0.0, 1.0)
6972
}),
7073
width : 10.0

CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ Change Log
44
### 1.57 - 2019-05-01
55

66
##### Additions :tada:
7+
* Added new parameter to `PolylineGlowMaterial` called `taperPower`, that works similar to the existing `glowPower` parameter, to taper the back of the line away. [#7626](https://github.com/AnalyticalGraphicsInc/cesium/pull/7626)
78
* Added support for the `KHR_texture_transform` glTF extension. [#7549](https://github.com/AnalyticalGraphicsInc/cesium/pull/7549)
89
* Added functions to remove samples from `SampledProperty` and `SampledPositionProperty`. [#7723](https://github.com/AnalyticalGraphicsInc/cesium/pull/7723)
10+
* Added support for color-to-alpha with a threshold on imagery layers. [#7727](https://github.com/AnalyticalGraphicsInc/cesium/pull/7727)
911

1012
##### Fixes :wrench:
1113
* Fixed an error where `clampToHeightMostDetailed` or `sampleHeightMostDetailed` would crash if entities were created when the promise resolved. [#7690](https://github.com/AnalyticalGraphicsInc/cesium/pull/7690)
1214
* Fixed an error where many imagery layers within a single tile would cause parts of the tile to render as black on some platforms. [#7649](https://github.com/AnalyticalGraphicsInc/cesium/issues/7649)
15+
* Fixed a problem where instanced 3D models were incorrectly lit when using physically based materials. [#7775](https://github.com/AnalyticalGraphicsInc/cesium/issues/7775)
1316

1417
### 1.56.1 - 2019-04-02
1518

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
205205
* [Rikku-x](https://github.com/Rikku-x)
206206
* [Adrien David](https://github.com/adridavid)
207207
* [Alexander Popiak](https://github.com/apopiak)
208+
* [Merijn Wijngaard](https://github.com/mwijngaard)

LICENSE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ Copyright 2011-2018 CesiumJS Contributors
202202
See the License for the specific language governing permissions and
203203
limitations under the License.
204204

205-
Patents 9153063 and 9865085
205+
Patents 9153063 9865085
206206

207-
Patents pending 15/829,786 and 62/701,099
207+
Patents pending 15/829,786 62/701,099 62/837,358 62/837,381
208208

209209
Third-Party Code
210210
================

Source/Core/PixelFormat.js

+8
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ define([
282282
return componentsLength * PixelDatatype.sizeInBytes(pixelDatatype) * width * height;
283283
},
284284

285+
/**
286+
* @private
287+
*/
288+
alignmentInBytes : function(pixelFormat, pixelDatatype, width) {
289+
var mod = PixelFormat.textureSizeInBytes(pixelFormat, pixelDatatype, width, 1) % 4;
290+
return mod === 0 ? 4 : (mod === 2 ? 2 : 1);
291+
},
292+
285293
/**
286294
* @private
287295
*/

Source/Core/Resource.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ define([
916916
}
917917
generatedBlob = blob;
918918
if (useImageBitmap) {
919-
return Resource._Implementations.createImageBitmapFromBlob(blob, flipY);
919+
return Resource.createImageBitmapFromBlob(blob, flipY);
920920
}
921921
var blobUrl = window.URL.createObjectURL(blob);
922922
generatedBlobResource = new Resource({
@@ -1874,7 +1874,7 @@ define([
18741874
return;
18751875
}
18761876

1877-
return Resource._Implementations.createImageBitmapFromBlob(blob, flipY);
1877+
return Resource.createImageBitmapFromBlob(blob, flipY);
18781878
})
18791879
.then(function(imageBitmap) {
18801880
if (!defined(imageBitmap)) {
@@ -1886,7 +1886,12 @@ define([
18861886
.otherwise(deferred.reject);
18871887
};
18881888

1889-
Resource._Implementations.createImageBitmapFromBlob = function(blob, flipY) {
1889+
/**
1890+
* Wrapper for createImageBitmap
1891+
*
1892+
* @private
1893+
*/
1894+
Resource.createImageBitmapFromBlob = function(blob, flipY) {
18901895
return createImageBitmap(blob, {
18911896
imageOrientation: flipY ? 'flipY' : 'none'
18921897
});

Source/Core/Spherical.js

+15
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,23 @@ define([
1919
* @param {Number} [magnitude=1.0] The linear coordinate measured from the origin.
2020
*/
2121
function Spherical(clock, cone, magnitude) {
22+
/**
23+
* The clock component.
24+
* @type {Number}
25+
* @default 0.0
26+
*/
2227
this.clock = defaultValue(clock, 0.0);
28+
/**
29+
* The cone component.
30+
* @type {Number}
31+
* @default 0.0
32+
*/
2333
this.cone = defaultValue(cone, 0.0);
34+
/**
35+
* The magnitude component.
36+
* @type {Number}
37+
* @default 1.0
38+
*/
2439
this.magnitude = defaultValue(magnitude, 1.0);
2540
}
2641

0 commit comments

Comments
 (0)