Skip to content

Commit 9a43c74

Browse files
author
njrivera
authored
Merge pull request #7 from AnalyticalGraphicsInc/master
merge from upstream
2 parents 2dca283 + b5fec75 commit 9a43c74

File tree

726 files changed

+4730
-15617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

726 files changed

+4730
-15617
lines changed

.eslintignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ Apps/HelloWorld.html
22
Apps/Sandcastle/ThirdParty/**
33
Build/**
44
Documentation/**
5-
Instrumented/**
65
Source/Shaders/**
76
Source/ThirdParty/**
87
Source/Workers/cesiumWorkerBootstrapper.js

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/.metadata
22
/Build
3-
/Instrumented
43
/Cesium-*.zip
54
/cesium-*.tgz
65
.DS_Store

.npmignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/.travis.yml
1212
/.vscode
1313
/Apps
14+
/Build/Coverage
1415
/Build/minifyShaders.state
1516
/Build/Stubs
1617
/Build/Documentation
@@ -20,7 +21,6 @@
2021
/gulpfile.js
2122
/index.html
2223
/index.release.html
23-
/Instrumented
2424
/launches
2525
/server.js
2626
/Source/copyrightHeader.js

.slackbot.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
releaseSchedule:
2-
ggetz: 2/1/2019
3-
hpinkos: 3/1/2019
4-
lilleyse: 4/1/2019
5-
tfili: 5/1/2019
6-
dbagnell: 6/3/2019
7-
tfili: 7/1/2019
8-
tfili: 8/1/2019
2+
OmarShehata: 9/2/2019
3+
mramato: 10/1/2019
4+
hpinkos: 11/1/2019
5+
lilleyse: 12/1/2019
6+
ggetz: 1/2/2020
7+
likangning93: 2/3/2020
8+
tfili: 3/2/2020
99

1010
greetings:
1111
- Happy Friday everyone!

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ script:
1616
- npm --silent run eslint
1717

1818
- npm --silent run build
19-
- npm --silent run test -- --browsers FirefoxHeadless --webgl-stub --failTaskOnError --suppressPassed
19+
- npm --silent run coverage -- --browsers FirefoxHeadless --webgl-stub --failTaskOnError --suppressPassed
2020

21-
- npm --silent run clean
2221
- travis_wait 20 npm --silent run makeZipFile -- --concurrency 1
2322
- npm pack &> /dev/null
2423

@@ -27,7 +26,7 @@ script:
2726
- npm --silent run deploy-s3 -- -b cesium-dev -d cesium/$TRAVIS_BRANCH --confirm -c 'no-cache'
2827
- npm --silent run deploy-status -- --status success --message Deployed
2928

30-
- npm --silent run test -- --browsers FirefoxHeadless --failTaskOnError --webgl-stub --release --suppressPassed
29+
- npm --silent run test -- --browsers ChromeCI --failTaskOnError --webgl-stub --release --suppressPassed
3130

3231
# Various Node.js smoke-screen tests
3332
- node -e "const Cesium = require('./');"

.vscode/settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
},
1414
"search.exclude": {
1515
"Build": true,
16-
"Instrumented": true,
1716
"node_modules": true,
1817
"Source/Shaders/**/*.js": true
1918
},

Apps/Sandcastle/CesiumSandcastle.js

+46-47
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ require({
2828
location: '../Apps/Sandcastle/ThirdParty'
2929
}]
3030
}, [
31+
'CodeMirror/lib/codemirror',
3132
'dijit/Dialog',
3233
'dijit/form/Button',
3334
'dijit/form/Form',
3435
'dijit/form/Textarea',
35-
'CodeMirror/lib/codemirror',
3636
'dijit/layout/ContentPane',
3737
'dijit/popup',
3838
'dijit/registry',
@@ -51,8 +51,6 @@ require({
5151
'dojo/when',
5252
'Sandcastle/LinkButton',
5353
'Source/Cesium',
54-
'Source/Core/defined',
55-
'Source/Core/Resource',
5654
'ThirdParty/clipboard.min',
5755
'ThirdParty/pako.min',
5856
'CodeMirror/addon/hint/show-hint',
@@ -75,11 +73,11 @@ require({
7573
'dijit/ToolbarSeparator',
7674
'dojo/domReady!'
7775
], function(
76+
CodeMirror,
7877
Dialog,
7978
Button,
8079
Form,
8180
TextArea,
82-
CodeMirror,
8381
ContentPane,
8482
popup,
8583
registry,
@@ -98,16 +96,17 @@ require({
9896
when,
9997
LinkButton,
10098
Cesium,
101-
defined,
102-
Resource,
10399
ClipboardJS,
104100
pako) {
105101
'use strict';
106102
// attach clipboard handling to our Copy button
107103
var clipboardjs = new ClipboardJS('.copyButton');
108104

109-
//In order for CodeMirror auto-complete to work, Cesium needs to be defined as a global.
110-
if (!defined(window.Cesium)) {
105+
if (typeof Cesium !== 'object') {
106+
//For built sandcastle
107+
Cesium = window.Cesium;
108+
} else if (typeof window.Cesium === 'undefined') {
109+
//In order for CodeMirror auto-complete to work, Cesium needs to be defined as a global.
111110
window.Cesium = Cesium;
112111
}
113112

@@ -229,7 +228,7 @@ require({
229228
}
230229

231230
function openDocTab(title, link) {
232-
if (!defined(docTabs[title])) {
231+
if (!Cesium.defined(docTabs[title])) {
233232
docTabs[title] = new ContentPane({
234233
title : title,
235234
focused : true,
@@ -286,7 +285,7 @@ require({
286285

287286
function onCursorActivity() {
288287
docNode.style.left = '-999px';
289-
if (defined(docTimer)) {
288+
if (Cesium.defined(docTimer)) {
290289
window.clearTimeout(docTimer);
291290
}
292291
docTimer = window.setTimeout(showDocPopup, 500);
@@ -296,21 +295,21 @@ require({
296295
var element = document.createElement('abbr');
297296
element.className = className;
298297
switch (className) {
299-
case 'hintMarker':
300-
element.innerHTML = '▲';
301-
break;
302-
case 'errorMarker':
303-
element.innerHTML = '×';
304-
break;
305-
default:
306-
element.innerHTML = '▶';
298+
case 'hintMarker':
299+
element.innerHTML = '▲';
300+
break;
301+
case 'errorMarker':
302+
element.innerHTML = '×';
303+
break;
304+
default:
305+
element.innerHTML = '▶';
307306
}
308307
element.title = msg;
309308
return element;
310309
}
311310

312311
function closeGalleryTooltip() {
313-
if (defined(activeGalleryTooltipDemo)) {
312+
if (Cesium.defined(activeGalleryTooltipDemo)) {
314313
popup.close(demoTooltips[activeGalleryTooltipDemo.name]);
315314
activeGalleryTooltipDemo = undefined;
316315
}
@@ -327,7 +326,7 @@ require({
327326
suffix = 'searchDemo';
328327
}
329328

330-
if (defined(activeGalleryTooltipDemo)) {
329+
if (Cesium.defined(activeGalleryTooltipDemo)) {
331330
popup.open({
332331
popup : demoTooltips[activeGalleryTooltipDemo.name],
333332
around : dom.byId(activeGalleryTooltipDemo.name + suffix),
@@ -339,7 +338,7 @@ require({
339338
function scheduleGalleryTooltip(demo) {
340339
if (demo !== activeGalleryTooltipDemo) {
341340
activeGalleryTooltipDemo = demo;
342-
if (defined(galleryTooltipTimer)) {
341+
if (Cesium.defined(galleryTooltipTimer)) {
343342
window.clearTimeout(galleryTooltipTimer);
344343
}
345344
galleryTooltipTimer = window.setTimeout(openGalleryTooltip, 220);
@@ -387,7 +386,7 @@ require({
387386
var hints = JSHINT.errors;
388387
for (i = 0, len = hints.length; i < len; ++i) {
389388
var hint = hints[i];
390-
if (hint !== null && defined(hint.reason) && hint.line > 0) {
389+
if (hint !== null && Cesium.defined(hint.reason) && hint.line > 0) {
391390
line = jsEditor.setGutterMarker(scriptLineToEditorLine(hint.line), 'hintGutter', makeLineLabel(hint.reason, 'hintMarker'));
392391
jsEditor.addLineClass(line, 'text', 'hintLine');
393392
errorLines.push(line);
@@ -398,22 +397,22 @@ require({
398397
}
399398

400399
function scheduleHint() {
401-
if (defined(hintTimer)) {
400+
if (Cesium.defined(hintTimer)) {
402401
window.clearTimeout(hintTimer);
403402
}
404403
hintTimer = setTimeout(clearErrorsAddHints, 550);
405404
highlightRun();
406405
}
407406

408407
function scheduleHintNoChange() {
409-
if (defined(hintTimer)) {
408+
if (Cesium.defined(hintTimer)) {
410409
window.clearTimeout(hintTimer);
411410
}
412411
hintTimer = setTimeout(clearErrorsAddHints, 550);
413412
}
414413

415414
function scrollToLine(lineNumber) {
416-
if (defined(lineNumber)) {
415+
if (Cesium.defined(lineNumber)) {
417416
jsEditor.setCursor(lineNumber);
418417
// set selection twice in order to force the editor to scroll
419418
// to this location if the cursor is already there
@@ -472,13 +471,13 @@ require({
472471
function registerScroll(demoContainer) {
473472
if (document.onmousewheel !== undefined) {
474473
demoContainer.addEventListener('mousewheel', function(e) {
475-
if (defined(e.wheelDelta) && e.wheelDelta) {
474+
if (Cesium.defined(e.wheelDelta) && e.wheelDelta) {
476475
demoContainer.scrollLeft -= e.wheelDelta * 70 / 120;
477476
}
478477
}, false);
479478
} else {
480479
demoContainer.addEventListener('DOMMouseScroll', function(e) {
481-
if (defined(e.detail) && e.detail) {
480+
if (Cesium.defined(e.detail) && e.detail) {
482481
demoContainer.scrollLeft += e.detail * 70 / 3;
483482
}
484483
}, false);
@@ -662,7 +661,7 @@ require({
662661
function loadBucket(bucketName) {
663662
if (local.bucketName !== bucketName) {
664663
local.bucketName = bucketName;
665-
if (defined(bucketTypes[bucketName])) {
664+
if (Cesium.defined(bucketTypes[bucketName])) {
666665
local.headers = bucketTypes[bucketName];
667666
} else {
668667
local.headers = '<html><head></head><body data-sandcastle-bucket-loaded="no">';
@@ -686,10 +685,10 @@ require({
686685
if (window.location.search) {
687686
queryObject = ioQuery.queryToObject(window.location.search.substring(1));
688687
}
689-
if (!defined(queryObject.src)) {
688+
if (!Cesium.defined(queryObject.src)) {
690689
queryObject.src = defaultDemo + '.html';
691690
}
692-
if (!defined(queryObject.label)) {
691+
if (!Cesium.defined(queryObject.label)) {
693692
queryObject.label = defaultLabel;
694693
}
695694

@@ -718,19 +717,19 @@ require({
718717
}
719718

720719
var json, code, html;
721-
if (defined(queryObject.gist)) {
722-
Resource.fetchJsonp('https://api.github.com/gists/' + queryObject.gist + '?access_token=dd8f755c2e5d9bbb26806bb93eaa2291f2047c60')
720+
if (Cesium.defined(queryObject.gist)) {
721+
Cesium.Resource.fetchJsonp('https://api.github.com/gists/' + queryObject.gist + '?access_token=dd8f755c2e5d9bbb26806bb93eaa2291f2047c60')
723722
.then(function(data) {
724723
var files = data.data.files;
725724
var code = files['Cesium-Sandcastle.js'].content;
726725
var htmlFile = files['Cesium-Sandcastle.html'];
727-
var html = defined(htmlFile) ? htmlFile.content : defaultHtml; // Use the default html for old gists
726+
var html = Cesium.defined(htmlFile) ? htmlFile.content : defaultHtml; // Use the default html for old gists
728727
applyLoadedDemo(code, html);
729728
}).otherwise(function(error) {
730-
appendConsole('consoleError', 'Unable to GET from GitHub API. This could be due to too many request, try again in an hour or copy and paste the code from the gist: https://gist.github.com/' + queryObject.gist, true);
731-
console.log(error);
732-
});
733-
} else if (defined(queryObject.code)) {
729+
appendConsole('consoleError', 'Unable to GET from GitHub API. This could be due to too many request, try again in an hour or copy and paste the code from the gist: https://gist.github.com/' + queryObject.gist, true);
730+
console.log(error);
731+
});
732+
} else if (Cesium.defined(queryObject.code)) {
734733
//The code query parameter is a Base64 encoded JSON string with `code` and `html` properties.
735734
json = JSON.parse(window.atob(queryObject.code));
736735
code = json.code;
@@ -812,14 +811,14 @@ require({
812811
appendConsole('consoleLog', 'Unable to load demo named ' + queryObject.src.replace('.html', '') + '. Redirecting to HelloWorld.\n', true);
813812
}
814813
}
815-
} else if (defined(e.data.log)) {
814+
} else if (Cesium.defined(e.data.log)) {
816815
// Console log messages from the iframe display in Sandcastle.
817816
appendConsole('consoleLog', e.data.log, false);
818-
} else if (defined(e.data.error)) {
817+
} else if (Cesium.defined(e.data.error)) {
819818
// Console error messages from the iframe display in Sandcastle
820819
var errorMsg = e.data.error;
821820
var lineNumber = e.data.lineNumber;
822-
if (defined(lineNumber)) {
821+
if (Cesium.defined(lineNumber)) {
823822
errorMsg += ' (on line ';
824823

825824
if (e.data.url) {
@@ -834,10 +833,10 @@ require({
834833
}
835834
}
836835
appendConsole('consoleError', errorMsg, true);
837-
} else if (defined(e.data.warn)) {
836+
} else if (Cesium.defined(e.data.warn)) {
838837
// Console warning messages from the iframe display in Sandcastle.
839838
appendConsole('consoleWarn', e.data.warn, true);
840-
} else if (defined(e.data.highlight)) {
839+
} else if (Cesium.defined(e.data.highlight)) {
841840
// Hovering objects in the embedded Cesium window.
842841
highlightLine(e.data.highlight);
843842
}
@@ -1084,11 +1083,11 @@ require({
10841083
}
10851084

10861085
// Select the demo to load upon opening based on the query parameter.
1087-
if (defined(queryObject.src)) {
1086+
if (Cesium.defined(queryObject.src)) {
10881087
if (demo.name === queryObject.src.replace('.html', '')) {
10891088
loadFromGallery(demo).then(function() {
10901089
window.history.replaceState(demo, demo.name, getPushStateUrl(demo));
1091-
if (defined(queryObject.gist)) {
1090+
if (Cesium.defined(queryObject.gist)) {
10921091
document.title = 'Gist Import - Cesium Sandcastle';
10931092
} else {
10941093
document.title = demo.name + ' - Cesium Sandcastle';
@@ -1111,7 +1110,7 @@ require({
11111110

11121111
var loading = true;
11131112
function setSubtab(tabName) {
1114-
currentTab = defined(tabName) && !loading ? tabName : queryObject.label;
1113+
currentTab = Cesium.defined(tabName) && !loading ? tabName : queryObject.label;
11151114
queryObject.label = tabName;
11161115
loading = false;
11171116
}
@@ -1163,7 +1162,7 @@ require({
11631162

11641163
function createGalleryButton(demo, tabName) {
11651164
var imgSrc = 'templates/Gallery_tile.jpg';
1166-
if (defined(demo.img)) {
1165+
if (Cesium.defined(demo.img)) {
11671166
imgSrc = 'gallery/' + demo.img;
11681167
}
11691168

@@ -1215,7 +1214,7 @@ require({
12151214
}
12161215

12171216
var promise;
1218-
if (!defined(gallery_demos)) {
1217+
if (!Cesium.defined(gallery_demos)) {
12191218
galleryErrorMsg.textContent = 'No demos found, please run the build script.';
12201219
galleryErrorMsg.style.display = 'inline-block';
12211220
} else {

Apps/Sandcastle/gallery/3D Tiles Feature Picking.html

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</style>
2323
<div id="cesiumContainer" class="fullSize"></div>
2424
<div id="loadingOverlay"><h1>Loading...</h1></div>
25+
<div id="toolbar"></div>
2526
<script id="cesium_sandcastle_script">
2627
function startup(Cesium) {
2728
'use strict';

Apps/Sandcastle/gallery/3D Tiles Inspector.html

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
</style>
2323
<div id="cesiumContainer" class="fullSize"></div>
2424
<div id="loadingOverlay"><h1>Loading...</h1></div>
25+
<div id="toolbar"></div>
2526
<script id="cesium_sandcastle_script">
2627
function startup(Cesium) {
2728
'use strict';

Apps/Sandcastle/gallery/3D Tiles Photogrammetry Classification.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
// A normal b3dm tileset of photogrammetry
3636
var tileset = new Cesium.Cesium3DTileset({
37-
url: Cesium.IonResource.fromAssetId(6074)
37+
url: Cesium.IonResource.fromAssetId(40866)
3838
});
3939
viewer.scene.primitives.add(tileset);
4040
viewer.zoomTo(tileset);

0 commit comments

Comments
 (0)