diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..2536d66bf13a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/Apps/Sandcastle/CesiumSandcastle.js b/Apps/Sandcastle/CesiumSandcastle.js index 585947073935..92fdba14ffdd 100644 --- a/Apps/Sandcastle/CesiumSandcastle.js +++ b/Apps/Sandcastle/CesiumSandcastle.js @@ -1,5 +1,6 @@ /*global require,Blob,JSHINT*/ /*global gallery_demos*/// defined by gallery/gallery-index.js, created by build +/*global hello_world_index*/// defined in gallery/gallery-index.js, created by build /*global sandcastleJsHintOptions*/// defined by jsHintOptions.js, created by build require({ baseUrl : '../../Source', @@ -138,6 +139,7 @@ require({ var subtabs = {}; var docError = false; var galleryError = false; + var notFound = false; var galleryTooltipTimer; var activeGalleryTooltipDemo; var demoTileHeightRule = findCssStyle('.demoTileThumbnail'); @@ -305,7 +307,7 @@ require({ var selectedTabName = registry.byId('innerPanel').selectedChildWidget.title; var suffix = selectedTabName + 'Demos'; if (selectedTabName === 'All') { - suffix = ''; + suffix = 'all'; } else if (selectedTabName === 'Search Results') { suffix = 'searchDemo'; } @@ -693,6 +695,7 @@ require({ } function loadFromGallery(demo) { + notFound = false; document.getElementById('saveAsFile').download = demo.name + '.html'; registry.byId('description').set('value', decodeHTML(demo.description).replace(/\\n/g, '\n')); registry.byId('label').set('value', decodeHTML(demo.label).replace(/\\n/g, '\n')); @@ -803,6 +806,9 @@ require({ if (galleryError) { appendConsole('consoleError', 'Error loading gallery, please run the build script.', true); } + if (notFound) { + appendConsole('consoleLog', 'Unable to load demo named ' + queryObject.src.replace('.html', '') + '\n', true); + } } } else if (Cesium.defined(e.data.log)) { // Console log messages from the iframe display in Sandcastle. @@ -1054,8 +1060,15 @@ require({ url : 'gallery/' + name + '.html', handleAs : 'text', error : function(error) { - appendConsole('consoleError', error, true); - galleryError = true; + if (error.status === 404) { + loadFromGallery(gallery_demos[hello_world_index]) + .then(function() { + notFound = true; + }); + } else { + galleryError = true; + appendConsole('consoleError', error, true); + } } }); } diff --git a/Apps/Sandcastle/gallery/3D Models Coloring.html b/Apps/Sandcastle/gallery/3D Models Coloring.html new file mode 100644 index 000000000000..979c9a6f955a --- /dev/null +++ b/Apps/Sandcastle/gallery/3D Models Coloring.html @@ -0,0 +1,242 @@ + + +
+ + + + + +Model Color | |
Mode | ++ |
Color | ++ |
Alpha | ++ + + | +
Mix | ++ + + | +
Model Silhouette | |
Color | ++ |
Alpha | ++ + + | +
Size | ++ + + | +