Skip to content

Commit

Permalink
Merge pull request #7 from AnalyticalGraphicsInc/master
Browse files Browse the repository at this point in the history
merge from upstream
  • Loading branch information
njrivera authored Sep 18, 2019
2 parents 2dca283 + b5fec75 commit 9a43c74
Show file tree
Hide file tree
Showing 726 changed files with 4,730 additions and 15,617 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Apps/HelloWorld.html
Apps/Sandcastle/ThirdParty/**
Build/**
Documentation/**
Instrumented/**
Source/Shaders/**
Source/ThirdParty/**
Source/Workers/cesiumWorkerBootstrapper.js
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.metadata
/Build
/Instrumented
/Cesium-*.zip
/cesium-*.tgz
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/.travis.yml
/.vscode
/Apps
/Build/Coverage
/Build/minifyShaders.state
/Build/Stubs
/Build/Documentation
Expand All @@ -20,7 +21,6 @@
/gulpfile.js
/index.html
/index.release.html
/Instrumented
/launches
/server.js
/Source/copyrightHeader.js
Expand Down
14 changes: 7 additions & 7 deletions .slackbot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
releaseSchedule:
ggetz: 2/1/2019
hpinkos: 3/1/2019
lilleyse: 4/1/2019
tfili: 5/1/2019
dbagnell: 6/3/2019
tfili: 7/1/2019
tfili: 8/1/2019
OmarShehata: 9/2/2019
mramato: 10/1/2019
hpinkos: 11/1/2019
lilleyse: 12/1/2019
ggetz: 1/2/2020
likangning93: 2/3/2020
tfili: 3/2/2020

greetings:
- Happy Friday everyone!
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ script:
- npm --silent run eslint

- npm --silent run build
- npm --silent run test -- --browsers FirefoxHeadless --webgl-stub --failTaskOnError --suppressPassed
- npm --silent run coverage -- --browsers FirefoxHeadless --webgl-stub --failTaskOnError --suppressPassed

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

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

- npm --silent run test -- --browsers FirefoxHeadless --failTaskOnError --webgl-stub --release --suppressPassed
- npm --silent run test -- --browsers ChromeCI --failTaskOnError --webgl-stub --release --suppressPassed

# Various Node.js smoke-screen tests
- node -e "const Cesium = require('./');"
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"search.exclude": {
"Build": true,
"Instrumented": true,
"node_modules": true,
"Source/Shaders/**/*.js": true
},
Expand Down
93 changes: 46 additions & 47 deletions Apps/Sandcastle/CesiumSandcastle.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ require({
location: '../Apps/Sandcastle/ThirdParty'
}]
}, [
'CodeMirror/lib/codemirror',
'dijit/Dialog',
'dijit/form/Button',
'dijit/form/Form',
'dijit/form/Textarea',
'CodeMirror/lib/codemirror',
'dijit/layout/ContentPane',
'dijit/popup',
'dijit/registry',
Expand All @@ -51,8 +51,6 @@ require({
'dojo/when',
'Sandcastle/LinkButton',
'Source/Cesium',
'Source/Core/defined',
'Source/Core/Resource',
'ThirdParty/clipboard.min',
'ThirdParty/pako.min',
'CodeMirror/addon/hint/show-hint',
Expand All @@ -75,11 +73,11 @@ require({
'dijit/ToolbarSeparator',
'dojo/domReady!'
], function(
CodeMirror,
Dialog,
Button,
Form,
TextArea,
CodeMirror,
ContentPane,
popup,
registry,
Expand All @@ -98,16 +96,17 @@ require({
when,
LinkButton,
Cesium,
defined,
Resource,
ClipboardJS,
pako) {
'use strict';
// attach clipboard handling to our Copy button
var clipboardjs = new ClipboardJS('.copyButton');

//In order for CodeMirror auto-complete to work, Cesium needs to be defined as a global.
if (!defined(window.Cesium)) {
if (typeof Cesium !== 'object') {
//For built sandcastle
Cesium = window.Cesium;
} else if (typeof window.Cesium === 'undefined') {
//In order for CodeMirror auto-complete to work, Cesium needs to be defined as a global.
window.Cesium = Cesium;
}

Expand Down Expand Up @@ -229,7 +228,7 @@ require({
}

function openDocTab(title, link) {
if (!defined(docTabs[title])) {
if (!Cesium.defined(docTabs[title])) {
docTabs[title] = new ContentPane({
title : title,
focused : true,
Expand Down Expand Up @@ -286,7 +285,7 @@ require({

function onCursorActivity() {
docNode.style.left = '-999px';
if (defined(docTimer)) {
if (Cesium.defined(docTimer)) {
window.clearTimeout(docTimer);
}
docTimer = window.setTimeout(showDocPopup, 500);
Expand All @@ -296,21 +295,21 @@ require({
var element = document.createElement('abbr');
element.className = className;
switch (className) {
case 'hintMarker':
element.innerHTML = '▲';
break;
case 'errorMarker':
element.innerHTML = '×';
break;
default:
element.innerHTML = '▶';
case 'hintMarker':
element.innerHTML = '▲';
break;
case 'errorMarker':
element.innerHTML = '×';
break;
default:
element.innerHTML = '▶';
}
element.title = msg;
return element;
}

function closeGalleryTooltip() {
if (defined(activeGalleryTooltipDemo)) {
if (Cesium.defined(activeGalleryTooltipDemo)) {
popup.close(demoTooltips[activeGalleryTooltipDemo.name]);
activeGalleryTooltipDemo = undefined;
}
Expand All @@ -327,7 +326,7 @@ require({
suffix = 'searchDemo';
}

if (defined(activeGalleryTooltipDemo)) {
if (Cesium.defined(activeGalleryTooltipDemo)) {
popup.open({
popup : demoTooltips[activeGalleryTooltipDemo.name],
around : dom.byId(activeGalleryTooltipDemo.name + suffix),
Expand All @@ -339,7 +338,7 @@ require({
function scheduleGalleryTooltip(demo) {
if (demo !== activeGalleryTooltipDemo) {
activeGalleryTooltipDemo = demo;
if (defined(galleryTooltipTimer)) {
if (Cesium.defined(galleryTooltipTimer)) {
window.clearTimeout(galleryTooltipTimer);
}
galleryTooltipTimer = window.setTimeout(openGalleryTooltip, 220);
Expand Down Expand Up @@ -387,7 +386,7 @@ require({
var hints = JSHINT.errors;
for (i = 0, len = hints.length; i < len; ++i) {
var hint = hints[i];
if (hint !== null && defined(hint.reason) && hint.line > 0) {
if (hint !== null && Cesium.defined(hint.reason) && hint.line > 0) {
line = jsEditor.setGutterMarker(scriptLineToEditorLine(hint.line), 'hintGutter', makeLineLabel(hint.reason, 'hintMarker'));
jsEditor.addLineClass(line, 'text', 'hintLine');
errorLines.push(line);
Expand All @@ -398,22 +397,22 @@ require({
}

function scheduleHint() {
if (defined(hintTimer)) {
if (Cesium.defined(hintTimer)) {
window.clearTimeout(hintTimer);
}
hintTimer = setTimeout(clearErrorsAddHints, 550);
highlightRun();
}

function scheduleHintNoChange() {
if (defined(hintTimer)) {
if (Cesium.defined(hintTimer)) {
window.clearTimeout(hintTimer);
}
hintTimer = setTimeout(clearErrorsAddHints, 550);
}

function scrollToLine(lineNumber) {
if (defined(lineNumber)) {
if (Cesium.defined(lineNumber)) {
jsEditor.setCursor(lineNumber);
// set selection twice in order to force the editor to scroll
// to this location if the cursor is already there
Expand Down Expand Up @@ -472,13 +471,13 @@ require({
function registerScroll(demoContainer) {
if (document.onmousewheel !== undefined) {
demoContainer.addEventListener('mousewheel', function(e) {
if (defined(e.wheelDelta) && e.wheelDelta) {
if (Cesium.defined(e.wheelDelta) && e.wheelDelta) {
demoContainer.scrollLeft -= e.wheelDelta * 70 / 120;
}
}, false);
} else {
demoContainer.addEventListener('DOMMouseScroll', function(e) {
if (defined(e.detail) && e.detail) {
if (Cesium.defined(e.detail) && e.detail) {
demoContainer.scrollLeft += e.detail * 70 / 3;
}
}, false);
Expand Down Expand Up @@ -662,7 +661,7 @@ require({
function loadBucket(bucketName) {
if (local.bucketName !== bucketName) {
local.bucketName = bucketName;
if (defined(bucketTypes[bucketName])) {
if (Cesium.defined(bucketTypes[bucketName])) {
local.headers = bucketTypes[bucketName];
} else {
local.headers = '<html><head></head><body data-sandcastle-bucket-loaded="no">';
Expand All @@ -686,10 +685,10 @@ require({
if (window.location.search) {
queryObject = ioQuery.queryToObject(window.location.search.substring(1));
}
if (!defined(queryObject.src)) {
if (!Cesium.defined(queryObject.src)) {
queryObject.src = defaultDemo + '.html';
}
if (!defined(queryObject.label)) {
if (!Cesium.defined(queryObject.label)) {
queryObject.label = defaultLabel;
}

Expand Down Expand Up @@ -718,19 +717,19 @@ require({
}

var json, code, html;
if (defined(queryObject.gist)) {
Resource.fetchJsonp('https://api.github.com/gists/' + queryObject.gist + '?access_token=dd8f755c2e5d9bbb26806bb93eaa2291f2047c60')
if (Cesium.defined(queryObject.gist)) {
Cesium.Resource.fetchJsonp('https://api.github.com/gists/' + queryObject.gist + '?access_token=dd8f755c2e5d9bbb26806bb93eaa2291f2047c60')
.then(function(data) {
var files = data.data.files;
var code = files['Cesium-Sandcastle.js'].content;
var htmlFile = files['Cesium-Sandcastle.html'];
var html = defined(htmlFile) ? htmlFile.content : defaultHtml; // Use the default html for old gists
var html = Cesium.defined(htmlFile) ? htmlFile.content : defaultHtml; // Use the default html for old gists
applyLoadedDemo(code, html);
}).otherwise(function(error) {
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);
console.log(error);
});
} else if (defined(queryObject.code)) {
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);
console.log(error);
});
} else if (Cesium.defined(queryObject.code)) {
//The code query parameter is a Base64 encoded JSON string with `code` and `html` properties.
json = JSON.parse(window.atob(queryObject.code));
code = json.code;
Expand Down Expand Up @@ -812,14 +811,14 @@ require({
appendConsole('consoleLog', 'Unable to load demo named ' + queryObject.src.replace('.html', '') + '. Redirecting to HelloWorld.\n', true);
}
}
} else if (defined(e.data.log)) {
} else if (Cesium.defined(e.data.log)) {
// Console log messages from the iframe display in Sandcastle.
appendConsole('consoleLog', e.data.log, false);
} else if (defined(e.data.error)) {
} else if (Cesium.defined(e.data.error)) {
// Console error messages from the iframe display in Sandcastle
var errorMsg = e.data.error;
var lineNumber = e.data.lineNumber;
if (defined(lineNumber)) {
if (Cesium.defined(lineNumber)) {
errorMsg += ' (on line ';

if (e.data.url) {
Expand All @@ -834,10 +833,10 @@ require({
}
}
appendConsole('consoleError', errorMsg, true);
} else if (defined(e.data.warn)) {
} else if (Cesium.defined(e.data.warn)) {
// Console warning messages from the iframe display in Sandcastle.
appendConsole('consoleWarn', e.data.warn, true);
} else if (defined(e.data.highlight)) {
} else if (Cesium.defined(e.data.highlight)) {
// Hovering objects in the embedded Cesium window.
highlightLine(e.data.highlight);
}
Expand Down Expand Up @@ -1084,11 +1083,11 @@ require({
}

// Select the demo to load upon opening based on the query parameter.
if (defined(queryObject.src)) {
if (Cesium.defined(queryObject.src)) {
if (demo.name === queryObject.src.replace('.html', '')) {
loadFromGallery(demo).then(function() {
window.history.replaceState(demo, demo.name, getPushStateUrl(demo));
if (defined(queryObject.gist)) {
if (Cesium.defined(queryObject.gist)) {
document.title = 'Gist Import - Cesium Sandcastle';
} else {
document.title = demo.name + ' - Cesium Sandcastle';
Expand All @@ -1111,7 +1110,7 @@ require({

var loading = true;
function setSubtab(tabName) {
currentTab = defined(tabName) && !loading ? tabName : queryObject.label;
currentTab = Cesium.defined(tabName) && !loading ? tabName : queryObject.label;
queryObject.label = tabName;
loading = false;
}
Expand Down Expand Up @@ -1163,7 +1162,7 @@ require({

function createGalleryButton(demo, tabName) {
var imgSrc = 'templates/Gallery_tile.jpg';
if (defined(demo.img)) {
if (Cesium.defined(demo.img)) {
imgSrc = 'gallery/' + demo.img;
}

Expand Down Expand Up @@ -1215,7 +1214,7 @@ require({
}

var promise;
if (!defined(gallery_demos)) {
if (!Cesium.defined(gallery_demos)) {
galleryErrorMsg.textContent = 'No demos found, please run the build script.';
galleryErrorMsg.style.display = 'inline-block';
} else {
Expand Down
1 change: 1 addition & 0 deletions Apps/Sandcastle/gallery/3D Tiles Feature Picking.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
Expand Down
1 change: 1 addition & 0 deletions Apps/Sandcastle/gallery/3D Tiles Inspector.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

// A normal b3dm tileset of photogrammetry
var tileset = new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(6074)
url: Cesium.IonResource.fromAssetId(40866)
});
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);
Expand Down
Loading

0 comments on commit 9a43c74

Please sign in to comment.