From 5c8e5d10cb5c24874ff44cecfcce48c5efb3e9e0 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 4 Mar 2015 11:57:46 -0500 Subject: [PATCH 01/49] Font kerning support for LabelCollection `writeTextToCanvas` now always draws individual letters more reliably and keeps them completely in the canvas. `LabelCollection` now uses the `dimensions` object returned by `writeTextToCanvas` to perform accurate kerning, producing much more legible and visually appealing text. --- CHANGES.md | 1 + Source/Core/writeTextToCanvas.js | 26 +++++++++++++++++++------- Source/Scene/LabelCollection.js | 15 +++++++++++++-- Specs/Core/writeTextToCanvasSpec.js | 10 ++++++---- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4acf539447a6..10549901661a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Change Log * * Deprecated * +* Added font kerning support to labels, improving visual quality and legibility. * Improved KML compatibility to work with non-specification compliant KML files that still happen to load in Google Earth. * Fixed a crash when loading KML features that have no description and an empty `ExtendedData` node. * Added support for KML `TimeStamp` nodes. diff --git a/Source/Core/writeTextToCanvas.js b/Source/Core/writeTextToCanvas.js index 6178d708075b..5ff707ea566b 100644 --- a/Source/Core/writeTextToCanvas.js +++ b/Source/Core/writeTextToCanvas.js @@ -82,16 +82,28 @@ define([ document.body.appendChild(canvas); var dimensions = measureText(context2D, text, stroke, fill); - dimensions.computedWidth = Math.max(dimensions.width, dimensions.bounds.maxx - dimensions.bounds.minx); canvas.dimensions = dimensions; document.body.removeChild(canvas); canvas.style.visibility = ''; - var baseline = dimensions.height - dimensions.ascent; - canvas.width = dimensions.computedWidth; - canvas.height = dimensions.height; - var y = canvas.height - baseline; + //Some characters, such as the letter j, have a non-zero starting position. + //This value is used for kering later, but we need to take it into account + //now in order to draw the text completely on the canvas + var x = -dimensions.bounds.minx; + + //Expand the width to include the starting position. + var width = Math.ceil(dimensions.width) + x; + + //While the height of the letter is correct, we need to adjust + //where we start drawing it so that letters like j and y properly dip + //below the line. + var height = dimensions.height; + var baseline = height - dimensions.ascent; + var y = height - baseline; + + canvas.width = width; + canvas.height = height; // Properties must be explicitly set again after changing width and height context2D.font = font; @@ -102,13 +114,13 @@ define([ if (stroke) { var strokeColor = defaultValue(options.strokeColor, Color.BLACK); context2D.strokeStyle = strokeColor.toCssColorString(); - context2D.strokeText(text, 0, y); + context2D.strokeText(text, x, y); } if (fill) { var fillColor = defaultValue(options.fillColor, Color.WHITE); context2D.fillStyle = fillColor.toCssColorString(); - context2D.fillText(text, 0, y); + context2D.fillText(text, x, y); } return canvas; diff --git a/Source/Scene/LabelCollection.js b/Source/Scene/LabelCollection.js index 287bb0398801..f071da62a2c0 100644 --- a/Source/Scene/LabelCollection.js +++ b/Source/Scene/LabelCollection.js @@ -223,8 +223,13 @@ define([ for (glyphIndex = 0; glyphIndex < glyphLength; ++glyphIndex) { glyph = glyphs[glyphIndex]; dimensions = glyph.dimensions; - totalWidth += dimensions.computedWidth; maxHeight = Math.max(maxHeight, dimensions.height); + + //Computing the total width must also account for the kering that occurs between letters. + totalWidth += dimensions.width - dimensions.bounds.minx; + if (glyphIndex < glyphLength - 1) { + totalWidth += glyphs[glyphIndex + 1].dimensions.bounds.minx; + } } var scale = label._scale; @@ -258,7 +263,13 @@ define([ glyph.billboard._setTranslate(glyphPixelOffset); } - glyphPixelOffset.x += dimensions.computedWidth * scale * resolutionScale; + //Compute the next x offset taking into acocunt the kerning performed + //on both the current letter as well as the next letter to be drawn + //as well as any applied scale. + if (glyphIndex < glyphLength - 1) { + var nextGlyph = glyphs[glyphIndex + 1]; + glyphPixelOffset.x += ((dimensions.width - dimensions.bounds.minx) + nextGlyph.dimensions.bounds.minx) * scale * resolutionScale; + } } } diff --git a/Specs/Core/writeTextToCanvasSpec.js b/Specs/Core/writeTextToCanvasSpec.js index b8ddf14e0a59..c6c11313b559 100644 --- a/Specs/Core/writeTextToCanvasSpec.js +++ b/Specs/Core/writeTextToCanvasSpec.js @@ -81,8 +81,10 @@ defineSuite([ stroke : false }); - // canvas1 is filled, so there should only be two "edges" - expect(getColorChangeCount(canvas1)).toEqual(2); + // canvas1 is filled, completely by the I on the left + // and then has empty space on the right, so there + // should only be one "edge": fill -> outside + expect(getColorChangeCount(canvas1)).toEqual(1); var canvas2 = writeTextToCanvas('I', { font : '90px "Open Sans"', @@ -91,7 +93,7 @@ defineSuite([ strokeColor : Color.BLUE }); - // canvas2 is stroked, so there should be four "edges" - expect(getColorChangeCount(canvas2)).toEqual(4); + // canvas2 is stroked, so there should be three "edges": outline -> inside -> outline -> outside + expect(getColorChangeCount(canvas2)).toEqual(3); }); }); \ No newline at end of file From 4c021aa39dc43218a4e430fd0e346bb8e2b3ec06 Mon Sep 17 00:00:00 2001 From: Abhishek Potnis Date: Thu, 3 Nov 2016 22:48:09 +0530 Subject: [PATCH 02/49] Changed Toggle to Enable Lighting --- Apps/Sandcastle/gallery/Terrain.html | 25 +++++++++++++++++-------- CONTRIBUTORS.md | 1 + 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Apps/Sandcastle/gallery/Terrain.html b/Apps/Sandcastle/gallery/Terrain.html index fe69c7355ad8..b1b5ce1d3be8 100644 --- a/Apps/Sandcastle/gallery/Terrain.html +++ b/Apps/Sandcastle/gallery/Terrain.html @@ -25,9 +25,12 @@
-
+ + + + @@ -40,6 +43,9 @@ //Sandcastle_Begin var viewer = new Cesium.Viewer('cesiumContainer'); +// set lighting to true +viewer.scene.globe.enableLighting = true; + var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({ url : 'https://assets.agi.com/stk-terrain/world', requestWaterMask : true, @@ -159,11 +165,6 @@ viewer.entities.resumeEvents(); } -Sandcastle.addToolbarButton('Toggle Lighting', function() { - viewer.scene.globe.enableLighting = !viewer.scene.globe.enableLighting; -}, 'toggleLighting'); - - Sandcastle.addToolbarButton('Sample Everest Terrain', function() { var gridWidth = 41; var gridHeight = 41; @@ -182,17 +183,25 @@ } Cesium.when(Cesium.sampleTerrain(viewer.terrainProvider, 9, terrainSamplePositions), sampleTerrainSuccess); + + var target = new Cesium.Cartesian3(300770.50872389384, 5634912.131394585, 2978152.2865545116); + var offset = new Cesium.Cartesian3(6344.974098678562, -793.3419798081741, 2499.9508860763162); + viewer.camera.lookAt(target, offset); + viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); }, 'sampleButtons'); -var viewModel = { fogEnabled : true }; + +var viewModel = { fogEnabled : true, lightingEnabled: true }; Cesium.knockout.track(viewModel); var toolbar = document.getElementById('toolbar'); Cesium.knockout.applyBindings(viewModel, toolbar); +Cesium.knockout.getObservable(viewModel, 'lightingEnabled').subscribe(function(newValue) { + viewer.scene.globe.enableLighting = newValue; +}); Cesium.knockout.getObservable(viewModel, 'fogEnabled').subscribe(function(newValue) { viewer.scene.fog.enabled = newValue; }); -viewModel.enabled = viewer.scene.fog.enabled; //Sandcastle_End Sandcastle.finishedLoading(); } diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 774adf62b504..68ac0c73cef6 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -110,3 +110,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Tom Payne](https://github.com/twpayne) * [Leesa Fini](https://github.com/leesafini) * [Victor Malaret](https://github.com/malaretv) +* [Abhishek Potnis](https://github.com/abhishekvp) From 3a62aaae98970ea980bbafe05a32da6d634add07 Mon Sep 17 00:00:00 2001 From: Abhishek Potnis Date: Fri, 4 Nov 2016 19:57:34 +0530 Subject: [PATCH 03/49] Added lookAtMtEverest() function --- Apps/Sandcastle/gallery/Terrain.html | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Apps/Sandcastle/gallery/Terrain.html b/Apps/Sandcastle/gallery/Terrain.html index b1b5ce1d3be8..6ab5bf026e48 100644 --- a/Apps/Sandcastle/gallery/Terrain.html +++ b/Apps/Sandcastle/gallery/Terrain.html @@ -106,10 +106,7 @@ Sandcastle.addDefaultToolbarMenu([{ text : 'Mount Everest', onselect : function() { - var target = new Cesium.Cartesian3(300770.50872389384, 5634912.131394585, 2978152.2865545116); - var offset = new Cesium.Cartesian3(6344.974098678562, -793.3419798081741, 2499.9508860763162); - viewer.camera.lookAt(target, offset); - viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); + lookAtMtEverest(); } }, { text : 'Half Dome', @@ -131,6 +128,13 @@ var terrainSamplePositions; +function lookAtMtEverest() { + var target = new Cesium.Cartesian3(300770.50872389384, 5634912.131394585, 2978152.2865545116); + var offset = new Cesium.Cartesian3(6344.974098678562, -793.3419798081741, 2499.9508860763162); + viewer.camera.lookAt(target, offset); + viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); +} + function sampleTerrainSuccess() { var ellipsoid = Cesium.Ellipsoid.WGS84; @@ -184,10 +188,7 @@ Cesium.when(Cesium.sampleTerrain(viewer.terrainProvider, 9, terrainSamplePositions), sampleTerrainSuccess); - var target = new Cesium.Cartesian3(300770.50872389384, 5634912.131394585, 2978152.2865545116); - var offset = new Cesium.Cartesian3(6344.974098678562, -793.3419798081741, 2499.9508860763162); - viewer.camera.lookAt(target, offset); - viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); + lookAtMtEverest(); }, 'sampleButtons'); From 12a394fdd054b88f68e5390734294fc7468f0543 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sat, 5 Nov 2016 23:03:04 +1100 Subject: [PATCH 04/49] Group loads into three priority tiers. From highest to lowest priority: 1. Tiles blocking refinement. 2. Tiles that are being rendered. 3. All other tiles. --- Source/Scene/Camera.js | 2 +- Source/Scene/GlobeSurfaceTile.js | 21 +++ Source/Scene/ImageryLayer.js | 2 + Source/Scene/QuadtreePrimitive.js | 154 +++++++++++++----- Source/Scene/TileTerrain.js | 1 + .../CesiumInspectorViewModel.js | 7 +- 6 files changed, 147 insertions(+), 40 deletions(-) diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js index ee5dba704e7f..a464d83fcaef 100644 --- a/Source/Scene/Camera.js +++ b/Source/Scene/Camera.js @@ -927,7 +927,7 @@ define([ } var globe = this._scene.globe; - var globeFinishedUpdating = !defined(globe) || (globe._surface.tileProvider.ready && !defined(globe._surface._tileLoadQueue.head) && globe._surface._debug.tilesWaitingForChildren === 0); + var globeFinishedUpdating = !defined(globe) || (globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length == 0 && globe._surface._tileLoadQueueMedium.length == 0 && globe._surface._tileLoadQueueLow.length == 0 && globe._surface._debug.tilesWaitingForChildren === 0); if (this._suspendTerrainAdjustment) { this._suspendTerrainAdjustment = !globeFinishedUpdating; } diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index 688680b4a8ac..2ae2ce3b7cec 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -8,6 +8,7 @@ define([ '../Core/defined', '../Core/defineProperties', '../Core/IntersectionTests', + '../Core/OrientedBoundingBox', '../Core/PixelFormat', '../Core/Rectangle', '../Renderer/PixelDatatype', @@ -31,6 +32,7 @@ define([ defined, defineProperties, IntersectionTests, + OrientedBoundingBox, PixelFormat, Rectangle, PixelDatatype, @@ -75,6 +77,9 @@ define([ this.boundingSphere3D = new BoundingSphere(); this.boundingSphere2D = new BoundingSphere(); this.orientedBoundingBox = undefined; + this.boundingBoxMinimumHeight = 0.0; + this.boundingBoxMaximumHeight = 0.0; + this.minimumAndMaximumHeightAreFromParent = true; this.tileBoundingBox = undefined; this.occludeePointInScaledSpace = new Cartesian3(); @@ -200,6 +205,8 @@ define([ this.pickTerrain = undefined; } + this.minimumAndMaximumHeightAreFromParent = true; + var i, len; var imageryList = this.imagery; @@ -252,6 +259,20 @@ define([ tile.state = QuadtreeTileLoadState.LOADING; } + // Update our min/max height if they came from our parent + if (this.minimumAndMaximumHeightAreFromParent && defined(tile.parent) && defined(tile.parent.data)) { + var parentData = tile.parent.data; + this.minimumHeight = parentData.minimumHeight; + this.maximumHeight = parentData.maximumHeight; + } + + // Recompute our oriented bounding box if our min/max heights changed. + if (!defined(this.orientedBoundingBox) || this.boundingBoxMinimumHeight !== this.minimumHeight || this.boundingBoxMaximumHeight !== this.maximumHeight) { + this.orientedBoundingBox = OrientedBoundingBox.fromRectangle(tile.rectangle, this.minimumHeight, this.maximumHeight, this.orientedBoundingBox); + this.boundingBoxMinimumHeight = this.minimumHeight; + this.boundingBoxMaximumHeight = this.maximumHeight; + } + if (tile.state === QuadtreeTileLoadState.LOADING) { processTerrainStateMachine(tile, frameState, terrainProvider, vertexArraysToDestroy); } diff --git a/Source/Scene/ImageryLayer.js b/Source/Scene/ImageryLayer.js index 3d0e2640286c..beb174d95074 100644 --- a/Source/Scene/ImageryLayer.js +++ b/Source/Scene/ImageryLayer.js @@ -667,6 +667,8 @@ define([ imagery.image = image; imagery.state = ImageryState.RECEIVED; + console.log('Received L' + imagery.level + 'X' + imagery.x + 'Y' + imagery.y); + TileProviderError.handleSuccess(that._requestImageError); } diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 3c013df87671..977537926829 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -96,7 +96,9 @@ define([ this._tilesToRender = []; this._tileTraversalQueue = new Queue(); - this._tileLoadQueue = []; + this._tileLoadQueueHigh = []; // high priority tiles are preventing refinement + this._tileLoadQueueMedium = []; // medium priority tiles are being rendered + this._tileLoadQueueLow = []; // low priority tiles were were refined past or are non-visible parts of quads. this._tileReplacementQueue = new TileReplacementQueue(); this._levelZeroTiles = undefined; this._levelZeroTilesReady = false; @@ -108,6 +110,7 @@ define([ this._tileToUpdateHeights = []; this._lastTileIndex = 0; this._updateHeightsTimeSlice = 2.0; + this._estimatedVisibility = Visibility.NONE; /** * Gets or sets the maximum screen-space error, in pixels, that is allowed. @@ -284,7 +287,9 @@ define([ debug.tilesRendered = 0; debug.tilesWaitingForChildren = 0; - this._tileLoadQueue.length = 0; + this._tileLoadQueueHigh.length = 0; + this._tileLoadQueueMedium.length = 0; + this._tileLoadQueueLow.length = 0; this._tileReplacementQueue.markStartOfRenderFrame(); }; @@ -439,16 +444,16 @@ define([ for (i = 0, len = levelZeroTiles.length; i < len; ++i) { tile = levelZeroTiles[i]; primitive._tileReplacementQueue.markTileRendered(tile); - if (tile.needsLoading) { - queueTileLoad(primitive, tile); - } - if (tile.renderable && tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { + if (!tile.renderable) { + primitive._tileLoadQueueHigh.push(tile); + ++debug.tilesWaitingForChildren; + } else if (tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { traversalQueue.enqueue(tile); } else { - ++debug.tilesCulled; - if (!tile.renderable) { - ++debug.tilesWaitingForChildren; + if (tile.needsLoading) { + primitive._tileLoadQueueLow.push(tile); } + ++debug.tilesCulled; } } @@ -472,21 +477,32 @@ define([ if (screenSpaceError(primitive, frameState, tile) < primitive.maximumScreenSpaceError) { // This tile meets SSE requirements, so render it. + if (tile.needsLoading) { + // Rendered tile meeting SSE loads with medium priority. + primitive._tileLoadQueueMedium.push(tile); + } addTileToRenderList(primitive, tile); - } else if (queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(primitive, tile)) { - // SSE is not good enough and children are loaded, so refine. - var children = tile.children; - // PERFORMANCE_IDEA: traverse children front-to-back so we can avoid sorting by distance later. - for (i = 0, len = children.length; i < len; ++i) { - if (tileProvider.computeTileVisibility(children[i], frameState, occluders) !== Visibility.NONE) { - traversalQueue.enqueue(children[i]); - } else { - ++debug.tilesCulled; + } else { + if (tile.needsLoading) { + // We want to refine this tile if possible, so load with low priority. + primitive._tileLoadQueueLow.push(tile); + } + + if (queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(frameState, primitive, tile)) { + // SSE is not good enough and children are loaded, so refine. + var children = tile.children; + // PERFORMANCE_IDEA: traverse children front-to-back so we can avoid sorting by distance later. + for (i = 0, len = children.length; i < len; ++i) { + if (tileProvider.computeTileVisibility(children[i], frameState, occluders) !== Visibility.NONE) { + traversalQueue.enqueue(children[i]); + } else { + ++debug.tilesCulled; + } } + } else { + // SSE is not good enough but not all children are loaded, so render this tile anyway. + addTileToRenderList(primitive, tile); } - } else { - // SSE is not good enough but not all children are loaded, so render this tile anyway. - addTileToRenderList(primitive, tile); } } @@ -498,7 +514,7 @@ define([ * a new one. */ function raiseTileLoadProgressEvent(primitive) { - var currentLoadQueueLength = primitive._tileLoadQueue.length; + var currentLoadQueueLength = primitive._tileLoadQueueHigh.length + primitive._tileLoadQueueMedium.length + primitive._tileLoadQueueLow.length; if (currentLoadQueueLength !== primitive._lastTileLoadQueueLength) { primitive._tileLoadProgressEvent.raiseEvent(currentLoadQueueLength); @@ -544,44 +560,86 @@ define([ ++primitive._debug.tilesRendered; } - function queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(primitive, tile) { + function queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(frameState, primitive, tile) { var allRenderable = true; var allUpsampledOnly = true; + var allDoneLoading = true; var children = tile.children; - for (var i = 0, len = children.length; i < len; ++i) { - var child = children[i]; + var i + var len; + var child; + for (i = 0, len = children.length; i < len; ++i) { + child = children[i]; primitive._tileReplacementQueue.markTileRendered(child); allUpsampledOnly = allUpsampledOnly && child.upsampledFromParent; allRenderable = allRenderable && child.renderable; - - if (child.needsLoading) { - queueTileLoad(primitive, child); - } + allDoneLoading = allDoneLoading && !child.needsLoading; } if (!allRenderable) { ++primitive._debug.tilesWaitingForChildren; } - // If all children are upsampled from this tile, we just render this tile instead of its children. - return allRenderable && !allUpsampledOnly; - } + // If all children are upsampled from this tile, we just render this tile instead of its children (don't refine). + var willRefine = allRenderable && !allUpsampledOnly; - function queueTileLoad(primitive, tile) { - primitive._tileLoadQueue.push(tile); + if (!willRefine && !allDoneLoading) { + for (i = 0, len = children.length; i < len; ++i) { + child = children[i]; + if (child.needsLoading) { + if (child.renderable) { + primitive._tileLoadQueueLow.push(child); + } else { + // A tile blocking refine loads with high priority + primitive._tileLoadQueueHigh.push(child); + } + } + } + } + + return willRefine; } + // function queueTileLoad(frameState, primitive, tile) { + // // if (defined(tile.data) && defined(tile.data.orientedBoundingBox)) { + // // tile._estimatedVisibility = frameState.cullingVolume.computeVisibility(tile.data.orientedBoundingBox) >= 0; + // // } + // primitive._tileLoadQueue.push(tile); + // } + function processTileLoadQueue(primitive, frameState) { - var tileLoadQueue = primitive._tileLoadQueue; + var tileLoadQueueHigh = primitive._tileLoadQueueHigh; + var tileLoadQueueMedium = primitive._tileLoadQueueMedium; + var tileLoadQueueLow = primitive._tileLoadQueueLow; var tileProvider = primitive._tileProvider; - if (tileLoadQueue.length === 0) { + if (tileLoadQueueHigh.length === 0 && tileLoadQueueMedium.length === 0 && tileLoadQueueLow.length === 0) { return; } + // Our goal with load ordering is to first load all of the tiles we need to + // render the current scene at full detail. Loading any other tiles is just + // a form of prefetching, and we need not do it at all. This simple and obvious + // statement gets more complicated when we realize that, because we don't have + // bounding volumes for the entire terrain tile pyramid, we don't precisely know + // which tiles we need to render the scene at full detail, until we do some + // loading. + // + // So our load priority is (from high to low): + // 1. Tiles that we _would_ render, except that they're not sufficiently loaded yet. + // Ideally this would only include tiles that we've already determined to be visible, + // but since we don't have reliable visibility information until a tile is loaded, + // and because we (currently) must have all children in a quad renderable before we + // can refine, this pretty much means tiles we'd like to refine to, regardless of + // visibility. (high) + // 2. Tiles that we're rendering. (medium) + // 3. All other tiles. (low) + // + // Within each group, tiles should be loaded in approximate near-to-far order. + // Remove any tiles that were not used this frame beyond the number // we're allowed to keep. primitive._tileReplacementQueue.trimTiles(primitive.tileCacheSize); @@ -589,9 +647,29 @@ define([ var startTime = getTimestamp(); var timeSlice = primitive._loadQueueTimeSlice; var endTime = startTime + timeSlice; + var i = 0; + var tile; + + for (i = tileLoadQueueHigh.length - 1; i >= 0; --i) { + tile = tileLoadQueueHigh[i]; + primitive._tileReplacementQueue.markTileRendered(tile); + tileProvider.loadTile(frameState, tile); + if (getTimestamp() >= endTime) { + break; + } + } + + for (i = tileLoadQueueMedium.length - 1; i >= 0; --i) { + tile = tileLoadQueueMedium[i]; + primitive._tileReplacementQueue.markTileRendered(tile); + tileProvider.loadTile(frameState, tile); + if (getTimestamp() >= endTime) { + break; + } + } - for (var i = tileLoadQueue.length - 1; i >= 0; --i) { - var tile = tileLoadQueue[i]; + for (i = tileLoadQueueLow.length - 1; i >= 0; --i) { + tile = tileLoadQueueLow[i]; primitive._tileReplacementQueue.markTileRendered(tile); tileProvider.loadTile(frameState, tile); if (getTimestamp() >= endTime) { diff --git a/Source/Scene/TileTerrain.js b/Source/Scene/TileTerrain.js index fa039c3a29d3..8975d6207d43 100644 --- a/Source/Scene/TileTerrain.js +++ b/Source/Scene/TileTerrain.js @@ -91,6 +91,7 @@ define([ maximumHeight : mesh.maximumHeight, ellipsoid : tile.tilingScheme.ellipsoid }); + surfaceTile.minimumAndMaximumHeightAreFromParent = false; tile.data.occludeePointInScaledSpace = Cartesian3.clone(mesh.occludeePointInScaledSpace, surfaceTile.occludeePointInScaledSpace); }; diff --git a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js index 57b76e94c8a3..cfe9a63ed572 100644 --- a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js +++ b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js @@ -8,6 +8,7 @@ define([ '../../Core/Rectangle', '../../Core/ScreenSpaceEventHandler', '../../Core/ScreenSpaceEventType', + '../../Core/WebMercatorTilingScheme', '../../Scene/DebugModelMatrixPrimitive', '../../Scene/PerformanceDisplay', '../../Scene/TileCoordinatesImageryProvider', @@ -22,6 +23,7 @@ define([ Rectangle, ScreenSpaceEventHandler, ScreenSpaceEventType, + WebMercatorTilingScheme, DebugModelMatrixPrimitive, PerformanceDisplay, TileCoordinatesImageryProvider, @@ -418,7 +420,10 @@ define([ this._showTileCoordinates = createCommand(function() { if (that.tileCoordinates && !defined(tileBoundariesLayer)) { tileBoundariesLayer = scene.imageryLayers.addImageryProvider(new TileCoordinatesImageryProvider({ - tilingScheme : scene.terrainProvider.tilingScheme + tilingScheme : new WebMercatorTilingScheme({ + numberOfLevelZeroTilesX : 2, + numberOfLevelZeroTilesY : 2 + }) })); } else if (!that.tileCoordinates && defined(tileBoundariesLayer)) { scene.imageryLayers.remove(tileBoundariesLayer); From e9cd45344ca9cd2f00ea092a62a5631e5887fa4c Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 16:31:38 +1100 Subject: [PATCH 05/49] Remove console.log. --- Source/Scene/ImageryLayer.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/Scene/ImageryLayer.js b/Source/Scene/ImageryLayer.js index beb174d95074..3d0e2640286c 100644 --- a/Source/Scene/ImageryLayer.js +++ b/Source/Scene/ImageryLayer.js @@ -667,8 +667,6 @@ define([ imagery.image = image; imagery.state = ImageryState.RECEIVED; - console.log('Received L' + imagery.level + 'X' + imagery.x + 'Y' + imagery.y); - TileProviderError.handleSuccess(that._requestImageError); } From 3291d8ee0a501104519b6a1004ae4507fc55a068 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 16:47:44 +1100 Subject: [PATCH 06/49] Cleanup. --- Source/Scene/QuadtreePrimitive.js | 53 ++++++++++++++----------------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 977537926829..f60195716017 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -440,6 +440,28 @@ define([ customDataRemoved.length = 0; } + // Our goal with load ordering is to first load all of the tiles we need to + // render the current scene at full detail. Loading any other tiles is just + // a form of prefetching, and we need not do it at all (other concerns aside). This + // simple and obvious statement gets more complicated when we realize that, because + // we don't have bounding volumes for the entire terrain tile pyramid, we don't + // precisely know which tiles we need to render the scene at full detail, until we do + // some loading. + // + // So our load priority is (from high to low): + // 1. Tiles that we _would_ render, except that they're not sufficiently loaded yet. + // Ideally this would only include tiles that we've already determined to be visible, + // but since we don't have reliable visibility information until a tile is loaded, + // and because we (currently) must have all children in a quad renderable before we + // can refine, this pretty much means tiles we'd like to refine to, regardless of + // visibility. (high) + // 2. Tiles that we're rendering. (medium) + // 3. All other tiles. (low) + // + // Within each priority group, tiles should be loaded in approximate near-to-far order, + // but currently they're just loaded in our traversal order which makes no guarantees + // about depth ordering. + // Enqueue the root tiles that are renderable and visible. for (i = 0, len = levelZeroTiles.length; i < len; ++i) { tile = levelZeroTiles[i]; @@ -488,7 +510,7 @@ define([ primitive._tileLoadQueueLow.push(tile); } - if (queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(frameState, primitive, tile)) { + if (queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(primitive, tile)) { // SSE is not good enough and children are loaded, so refine. var children = tile.children; // PERFORMANCE_IDEA: traverse children front-to-back so we can avoid sorting by distance later. @@ -560,7 +582,7 @@ define([ ++primitive._debug.tilesRendered; } - function queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(frameState, primitive, tile) { + function queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(primitive, tile) { var allRenderable = true; var allUpsampledOnly = true; var allDoneLoading = true; @@ -603,13 +625,6 @@ define([ return willRefine; } - // function queueTileLoad(frameState, primitive, tile) { - // // if (defined(tile.data) && defined(tile.data.orientedBoundingBox)) { - // // tile._estimatedVisibility = frameState.cullingVolume.computeVisibility(tile.data.orientedBoundingBox) >= 0; - // // } - // primitive._tileLoadQueue.push(tile); - // } - function processTileLoadQueue(primitive, frameState) { var tileLoadQueueHigh = primitive._tileLoadQueueHigh; var tileLoadQueueMedium = primitive._tileLoadQueueMedium; @@ -620,26 +635,6 @@ define([ return; } - // Our goal with load ordering is to first load all of the tiles we need to - // render the current scene at full detail. Loading any other tiles is just - // a form of prefetching, and we need not do it at all. This simple and obvious - // statement gets more complicated when we realize that, because we don't have - // bounding volumes for the entire terrain tile pyramid, we don't precisely know - // which tiles we need to render the scene at full detail, until we do some - // loading. - // - // So our load priority is (from high to low): - // 1. Tiles that we _would_ render, except that they're not sufficiently loaded yet. - // Ideally this would only include tiles that we've already determined to be visible, - // but since we don't have reliable visibility information until a tile is loaded, - // and because we (currently) must have all children in a quad renderable before we - // can refine, this pretty much means tiles we'd like to refine to, regardless of - // visibility. (high) - // 2. Tiles that we're rendering. (medium) - // 3. All other tiles. (low) - // - // Within each group, tiles should be loaded in approximate near-to-far order. - // Remove any tiles that were not used this frame beyond the number // we're allowed to keep. primitive._tileReplacementQueue.trimTiles(primitive.tileCacheSize); From be3e9909e1711fbcca1c9974ebaabe97fa0b3578 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 16:51:45 +1100 Subject: [PATCH 07/49] More cleanup. --- Source/Scene/GlobeSurfaceTile.js | 21 ------------------- Source/Scene/QuadtreePrimitive.js | 1 - Source/Scene/TileTerrain.js | 1 - .../CesiumInspectorViewModel.js | 7 +------ 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index 2ae2ce3b7cec..688680b4a8ac 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -8,7 +8,6 @@ define([ '../Core/defined', '../Core/defineProperties', '../Core/IntersectionTests', - '../Core/OrientedBoundingBox', '../Core/PixelFormat', '../Core/Rectangle', '../Renderer/PixelDatatype', @@ -32,7 +31,6 @@ define([ defined, defineProperties, IntersectionTests, - OrientedBoundingBox, PixelFormat, Rectangle, PixelDatatype, @@ -77,9 +75,6 @@ define([ this.boundingSphere3D = new BoundingSphere(); this.boundingSphere2D = new BoundingSphere(); this.orientedBoundingBox = undefined; - this.boundingBoxMinimumHeight = 0.0; - this.boundingBoxMaximumHeight = 0.0; - this.minimumAndMaximumHeightAreFromParent = true; this.tileBoundingBox = undefined; this.occludeePointInScaledSpace = new Cartesian3(); @@ -205,8 +200,6 @@ define([ this.pickTerrain = undefined; } - this.minimumAndMaximumHeightAreFromParent = true; - var i, len; var imageryList = this.imagery; @@ -259,20 +252,6 @@ define([ tile.state = QuadtreeTileLoadState.LOADING; } - // Update our min/max height if they came from our parent - if (this.minimumAndMaximumHeightAreFromParent && defined(tile.parent) && defined(tile.parent.data)) { - var parentData = tile.parent.data; - this.minimumHeight = parentData.minimumHeight; - this.maximumHeight = parentData.maximumHeight; - } - - // Recompute our oriented bounding box if our min/max heights changed. - if (!defined(this.orientedBoundingBox) || this.boundingBoxMinimumHeight !== this.minimumHeight || this.boundingBoxMaximumHeight !== this.maximumHeight) { - this.orientedBoundingBox = OrientedBoundingBox.fromRectangle(tile.rectangle, this.minimumHeight, this.maximumHeight, this.orientedBoundingBox); - this.boundingBoxMinimumHeight = this.minimumHeight; - this.boundingBoxMaximumHeight = this.maximumHeight; - } - if (tile.state === QuadtreeTileLoadState.LOADING) { processTerrainStateMachine(tile, frameState, terrainProvider, vertexArraysToDestroy); } diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index f60195716017..2d4f3d2c22c3 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -110,7 +110,6 @@ define([ this._tileToUpdateHeights = []; this._lastTileIndex = 0; this._updateHeightsTimeSlice = 2.0; - this._estimatedVisibility = Visibility.NONE; /** * Gets or sets the maximum screen-space error, in pixels, that is allowed. diff --git a/Source/Scene/TileTerrain.js b/Source/Scene/TileTerrain.js index 8975d6207d43..fa039c3a29d3 100644 --- a/Source/Scene/TileTerrain.js +++ b/Source/Scene/TileTerrain.js @@ -91,7 +91,6 @@ define([ maximumHeight : mesh.maximumHeight, ellipsoid : tile.tilingScheme.ellipsoid }); - surfaceTile.minimumAndMaximumHeightAreFromParent = false; tile.data.occludeePointInScaledSpace = Cartesian3.clone(mesh.occludeePointInScaledSpace, surfaceTile.occludeePointInScaledSpace); }; diff --git a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js index cfe9a63ed572..57b76e94c8a3 100644 --- a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js +++ b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js @@ -8,7 +8,6 @@ define([ '../../Core/Rectangle', '../../Core/ScreenSpaceEventHandler', '../../Core/ScreenSpaceEventType', - '../../Core/WebMercatorTilingScheme', '../../Scene/DebugModelMatrixPrimitive', '../../Scene/PerformanceDisplay', '../../Scene/TileCoordinatesImageryProvider', @@ -23,7 +22,6 @@ define([ Rectangle, ScreenSpaceEventHandler, ScreenSpaceEventType, - WebMercatorTilingScheme, DebugModelMatrixPrimitive, PerformanceDisplay, TileCoordinatesImageryProvider, @@ -420,10 +418,7 @@ define([ this._showTileCoordinates = createCommand(function() { if (that.tileCoordinates && !defined(tileBoundariesLayer)) { tileBoundariesLayer = scene.imageryLayers.addImageryProvider(new TileCoordinatesImageryProvider({ - tilingScheme : new WebMercatorTilingScheme({ - numberOfLevelZeroTilesX : 2, - numberOfLevelZeroTilesY : 2 - }) + tilingScheme : scene.terrainProvider.tilingScheme })); } else if (!that.tileCoordinates && defined(tileBoundariesLayer)) { scene.imageryLayers.remove(tileBoundariesLayer); From 300e4aa88e7e39f8fca77687b4d604f19537b448 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 18:25:14 +1100 Subject: [PATCH 08/49] Fix test failures. --- Source/Scene/Camera.js | 2 +- Source/Scene/QuadtreePrimitive.js | 4 +++- Specs/DataSources/EntityClusterSpec.js | 4 +++- Specs/Scene/GlobeSpec.js | 2 +- Specs/Scene/GlobeSurfaceTileProviderSpec.js | 2 +- Specs/Scene/ImageryLayerCollectionSpec.js | 2 +- Specs/Scene/ModelSpec.js | 4 +++- Specs/Scene/ScreenSpaceCameraControllerSpec.js | 4 +++- Specs/Scene/ShadowMapSpec.js | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js index a464d83fcaef..49799f1218ee 100644 --- a/Source/Scene/Camera.js +++ b/Source/Scene/Camera.js @@ -927,7 +927,7 @@ define([ } var globe = this._scene.globe; - var globeFinishedUpdating = !defined(globe) || (globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length == 0 && globe._surface._tileLoadQueueMedium.length == 0 && globe._surface._tileLoadQueueLow.length == 0 && globe._surface._debug.tilesWaitingForChildren === 0); + var globeFinishedUpdating = !defined(globe) || (globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length === 0 && globe._surface._tileLoadQueueMedium.length === 0 && globe._surface._tileLoadQueueLow.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0); if (this._suspendTerrainAdjustment) { this._suspendTerrainAdjustment = !globeFinishedUpdating; } diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 2d4f3d2c22c3..c86b2333b0e5 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -466,7 +466,9 @@ define([ tile = levelZeroTiles[i]; primitive._tileReplacementQueue.markTileRendered(tile); if (!tile.renderable) { - primitive._tileLoadQueueHigh.push(tile); + if (tile.needsLoading) { + primitive._tileLoadQueueHigh.push(tile); + } ++debug.tilesWaitingForChildren; } else if (tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { traversalQueue.enqueue(tile); diff --git a/Specs/DataSources/EntityClusterSpec.js b/Specs/DataSources/EntityClusterSpec.js index ea5d75ec066d..665343f1c236 100644 --- a/Specs/DataSources/EntityClusterSpec.js +++ b/Specs/DataSources/EntityClusterSpec.js @@ -44,7 +44,9 @@ defineSuite([ tileProvider : { ready : true }, - _tileLoadQueue : {}, + _tileLoadQueueHigh : [], + _tileLoadQueueMedium : [], + _tileLoadQueueLow : [], _debug : { tilesWaitingForChildren : 0 } diff --git a/Specs/Scene/GlobeSpec.js b/Specs/Scene/GlobeSpec.js index bae5e841afa7..466b18231e9a 100644 --- a/Specs/Scene/GlobeSpec.js +++ b/Specs/Scene/GlobeSpec.js @@ -68,7 +68,7 @@ defineSuite([ return pollToPromise(function() { globe._surface._debug.enableDebugOutput = true; scene.render(); - return globe._surface.tileProvider.ready && !defined(globe._surface._tileLoadQueue.head) && globe._surface._debug.tilesWaitingForChildren === 0; + return globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length === 0 && globe._surface._tileLoadQueueMedium.length === 0 && globe._surface._tileLoadQueueLow.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0; }); } diff --git a/Specs/Scene/GlobeSurfaceTileProviderSpec.js b/Specs/Scene/GlobeSurfaceTileProviderSpec.js index 4f3d44b0de31..b4685e66e783 100644 --- a/Specs/Scene/GlobeSurfaceTileProviderSpec.js +++ b/Specs/Scene/GlobeSurfaceTileProviderSpec.js @@ -83,7 +83,7 @@ defineSuite([ // update until the load queue is empty. return pollToPromise(function() { scene.renderForSpecs(); - return globe._surface.tileProvider.ready && !defined(globe._surface._tileLoadQueue.head) && globe._surface._debug.tilesWaitingForChildren === 0; + return globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length === 0 && globe._surface._tileLoadQueueMedium.length === 0 && globe._surface._tileLoadQueueLow.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0; }); } diff --git a/Specs/Scene/ImageryLayerCollectionSpec.js b/Specs/Scene/ImageryLayerCollectionSpec.js index 39f392a2f7a9..7749c1f490ff 100644 --- a/Specs/Scene/ImageryLayerCollectionSpec.js +++ b/Specs/Scene/ImageryLayerCollectionSpec.js @@ -304,7 +304,7 @@ defineSuite([ return pollToPromise(function() { globe._surface._debug.enableDebugOutput = true; scene.render(); - return globe._surface.tileProvider.ready && globe._surface._tileLoadQueue.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0; + return globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length === 0 && globe._surface._tileLoadQueueMedium.length === 0 && globe._surface._tileLoadQueueLow.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0; }); } diff --git a/Specs/Scene/ModelSpec.js b/Specs/Scene/ModelSpec.js index 2699f497616c..444c9a9d1137 100644 --- a/Specs/Scene/ModelSpec.js +++ b/Specs/Scene/ModelSpec.js @@ -1883,7 +1883,9 @@ defineSuite([ tileProvider : { ready : true }, - _tileLoadQueue : {}, + _tileLoadQueueHigh : [], + _tileLoadQueueMedium : [], + _tileLoadQueueLow : [], _debug : { tilesWaitingForChildren : 0 } diff --git a/Specs/Scene/ScreenSpaceCameraControllerSpec.js b/Specs/Scene/ScreenSpaceCameraControllerSpec.js index f205c1ce6db6..e1c42abae3fd 100644 --- a/Specs/Scene/ScreenSpaceCameraControllerSpec.js +++ b/Specs/Scene/ScreenSpaceCameraControllerSpec.js @@ -72,7 +72,9 @@ defineSuite([ tileProvider : { ready : true }, - _tileLoadQueue : {}, + _tileLoadQueueHigh : [], + _tileLoadQueueMedium : [], + _tileLoadQueueLow : [], _debug : { tilesWaitingForChildren : 0 } diff --git a/Specs/Scene/ShadowMapSpec.js b/Specs/Scene/ShadowMapSpec.js index 692a68548a2f..5330c1c48417 100644 --- a/Specs/Scene/ShadowMapSpec.js +++ b/Specs/Scene/ShadowMapSpec.js @@ -247,7 +247,8 @@ defineSuite([ function loadGlobe() { return pollToPromise(function() { scene.render(); - return scene.globe._surface.tileProvider.ready && !defined(scene.globe._surface._tileLoadQueue.head) && scene.globe._surface._debug.tilesWaitingForChildren === 0; + var globe = scene.globe; + return globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length === 0 && globe._surface._tileLoadQueueMedium.length === 0 && globe._surface._tileLoadQueueLow.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0; }); } From 9c0616cacd023d55482639201054e1fcde45d867 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 18:39:58 +1100 Subject: [PATCH 09/49] Fix jsHint warning. --- Source/Scene/QuadtreePrimitive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index c86b2333b0e5..93c082c778da 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -589,7 +589,7 @@ define([ var allDoneLoading = true; var children = tile.children; - var i + var i; var len; var child; for (i = 0, len = children.length; i < len; ++i) { From 77ba56bcbf532ca5c50b9d8212dde5bd495d440c Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 19:31:49 +1100 Subject: [PATCH 10/49] Fix typo, update CHANGES.md. --- CHANGES.md | 1 + Source/Scene/QuadtreePrimitive.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 452161ec5881..b792c21afb18 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Change Log * Breaking changes * * Added support for saving html and css in Github Gists [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125) +* Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. ### 1.27 - 2016-11-01 * Deprecated diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 93c082c778da..bd2cd271064a 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -98,7 +98,7 @@ define([ this._tileTraversalQueue = new Queue(); this._tileLoadQueueHigh = []; // high priority tiles are preventing refinement this._tileLoadQueueMedium = []; // medium priority tiles are being rendered - this._tileLoadQueueLow = []; // low priority tiles were were refined past or are non-visible parts of quads. + this._tileLoadQueueLow = []; // low priority tiles were refined past or are non-visible parts of quads. this._tileReplacementQueue = new TileReplacementQueue(); this._levelZeroTiles = undefined; this._levelZeroTilesReady = false; From eb6c78b099b0946cb3f9193bb3967eec9cd397c8 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sun, 6 Nov 2016 21:07:08 +1100 Subject: [PATCH 11/49] Use four properties instead of an array for child tiles. --- Source/Scene/QuadtreeTile.js | 107 +++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 29 deletions(-) diff --git a/Source/Scene/QuadtreeTile.js b/Source/Scene/QuadtreeTile.js index bce4d3442a15..e65730bb939a 100644 --- a/Source/Scene/QuadtreeTile.js +++ b/Source/Scene/QuadtreeTile.js @@ -52,7 +52,11 @@ define([ this._level = options.level; this._parent = options.parent; this._rectangle = this._tilingScheme.tileXYToRectangle(this._x, this._y, this._level); - this._children = undefined; + + this._southwestChild = undefined; + this._southeastChild = undefined; + this._northwestChild = undefined; + this._northeastChild = undefined; // QuadtreeTileReplacementQueue gets/sets these private properties. this._replacementPrevious = undefined; @@ -247,6 +251,7 @@ define([ } }, + /** * An array of tiles that is at the next level of the tile tree. * @memberof QuadtreeTile.prototype @@ -254,39 +259,83 @@ define([ */ children : { get : function() { - if (!defined(this._children)) { - var tilingScheme = this.tilingScheme; - var level = this.level + 1; - var x = this.x * 2; - var y = this.y * 2; - this._children = [new QuadtreeTile({ - tilingScheme : tilingScheme, - x : x, - y : y, - level : level, - parent : this - }), new QuadtreeTile({ - tilingScheme : tilingScheme, - x : x + 1, - y : y, - level : level, + return [this.northwestChild, this.northeastChild, this.southwestChild, this.southeastChild]; + } + }, + + /** + * Gets the southwest child tile. + * @type {QuadtreeTile} + */ + southwestChild : { + get : function() { + if (!defined(this._southwestChild)) { + this._southwestChild = new QuadtreeTile({ + tilingScheme : this.tilingScheme, + x : this.x * 2, + y : this.y * 2 + 1, + level : this.level + 1, parent : this - }), new QuadtreeTile({ - tilingScheme : tilingScheme, - x : x, - y : y + 1, - level : level, + }); + } + return this._southwestChild; + } + }, + + /** + * Gets the southeast child tile. + * @type {QuadtreeTile} + */ + southeastChild : { + get : function() { + if (!defined(this._southeastChild)) { + this._southeastChild = new QuadtreeTile({ + tilingScheme : this.tilingScheme, + x : this.x * 2 + 1, + y : this.y * 2 + 1, + level : this.level + 1, parent : this - }), new QuadtreeTile({ - tilingScheme : tilingScheme, - x : x + 1, - y : y + 1, - level : level, + }); + } + return this._southeastChild; + } + }, + + /** + * Gets the northwest child tile. + * @type {QuadtreeTile} + */ + northwestChild : { + get : function() { + if (!defined(this._northwestChild)) { + this._northwestChild = new QuadtreeTile({ + tilingScheme : this.tilingScheme, + x : this.x * 2, + y : this.y * 2, + level : this.level + 1, parent : this - })]; + }); } + return this._northwestChild; + } + }, - return this._children; + /** + * Gets the northeast child tile. + * @type {QuadtreeTile} + */ + northeastChild : { + get : function() { + if (!defined(this._northeastChild)) { + this._northeastChild = new QuadtreeTile({ + tilingScheme : this.tilingScheme, + x : this.x * 2 + 1, + y : this.y * 2, + level : this.level + 1, + parent : this + }); + } + return this._northeastChild; } }, From 46242f33267cd2175d7ef80e357cc701497d66c6 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 7 Nov 2016 13:08:25 +1100 Subject: [PATCH 12/49] Render and load tiles in near-to-far order. --- Source/Scene/Globe.js | 17 +- Source/Scene/GlobeSurfaceTile.js | 60 +++--- Source/Scene/QuadtreePrimitive.js | 195 +++++++++++++----- .../CesiumInspectorViewModel.js | 8 +- 4 files changed, 182 insertions(+), 98 deletions(-) diff --git a/Source/Scene/Globe.js b/Source/Scene/Globe.js index e84b483997b0..a3ea4f6ddd3f 100644 --- a/Source/Scene/Globe.js +++ b/Source/Scene/Globe.js @@ -373,6 +373,10 @@ define([ var scratchGetHeightCartographic = new Cartographic(); var scratchGetHeightRay = new Ray(); + function tileIfContainsCartographic(tile, cartographic) { + return Rectangle.contains(tile.rectangle, cartographic) ? tile : undefined; + } + /** * Get the height of the surface at a given cartographic. * @@ -407,15 +411,10 @@ define([ } while (tile.renderable) { - var children = tile.children; - length = children.length; - - for (i = 0; i < length; ++i) { - tile = children[i]; - if (Rectangle.contains(tile.rectangle, cartographic)) { - break; - } - } + tile = tileIfContainsCartographic(tile.southwestChild, cartographic) || + tileIfContainsCartographic(tile.southeastChild, cartographic) || + tileIfContainsCartographic(tile.northwestChild, cartographic) || + tile.northeastChild; } while (defined(tile) && (!defined(tile.data) || !defined(tile.data.pickTerrain))) { diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index 688680b4a8ac..aacd731823f5 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -494,40 +494,42 @@ define([ // - child tiles that were previously upsampled need to be re-upsampled based on the new data. // - child tiles that were previously deemed unavailable may now be available. - if (defined(tile.children)) { - for (var childIndex = 0; childIndex < 4; ++childIndex) { - var childTile = tile.children[childIndex]; - if (childTile.state !== QuadtreeTileLoadState.START) { - var childSurfaceTile = childTile.data; - if (defined(childSurfaceTile.terrainData) && !childSurfaceTile.terrainData.wasCreatedByUpsampling()) { - // Data for the child tile has already been loaded. - continue; - } + propagateNewLoadedDataToChildTile(tile, surfaceTile, tile.southwestChild); + propagateNewLoadedDataToChildTile(tile, surfaceTile, tile.southeastChild); + propagateNewLoadedDataToChildTile(tile, surfaceTile, tile.northwestChild); + propagateNewLoadedDataToChildTile(tile, surfaceTile, tile.northeastChild); + } - // Restart the upsampling process, no matter its current state. - // We create a new instance rather than just restarting the existing one - // because there could be an asynchronous operation pending on the existing one. - if (defined(childSurfaceTile.upsampledTerrain)) { - childSurfaceTile.upsampledTerrain.freeResources(); - } - childSurfaceTile.upsampledTerrain = new TileTerrain({ - data : surfaceTile.terrainData, - x : tile.x, - y : tile.y, - level : tile.level - }); + function propagateNewLoadedDataToChildTile(tile, surfaceTile, childTile) { + if (childTile.state !== QuadtreeTileLoadState.START) { + var childSurfaceTile = childTile.data; + if (defined(childSurfaceTile.terrainData) && !childSurfaceTile.terrainData.wasCreatedByUpsampling()) { + // Data for the child tile has already been loaded. + return; + } - if (surfaceTile.terrainData.isChildAvailable(tile.x, tile.y, childTile.x, childTile.y)) { - // Data is available for the child now. It might have been before, too. - if (!defined(childSurfaceTile.loadedTerrain)) { - // No load process is in progress, so start one. - childSurfaceTile.loadedTerrain = new TileTerrain(); - } - } + // Restart the upsampling process, no matter its current state. + // We create a new instance rather than just restarting the existing one + // because there could be an asynchronous operation pending on the existing one. + if (defined(childSurfaceTile.upsampledTerrain)) { + childSurfaceTile.upsampledTerrain.freeResources(); + } + childSurfaceTile.upsampledTerrain = new TileTerrain({ + data : surfaceTile.terrainData, + x : tile.x, + y : tile.y, + level : tile.level + }); - childTile.state = QuadtreeTileLoadState.LOADING; + if (surfaceTile.terrainData.isChildAvailable(tile.x, tile.y, childTile.x, childTile.y)) { + // Data is available for the child now. It might have been before, too. + if (!defined(childSurfaceTile.loadedTerrain)) { + // No load process is in progress, so start one. + childSurfaceTile.loadedTerrain = new TileTerrain(); } } + + childTile.state = QuadtreeTileLoadState.LOADING; } } diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index bd2cd271064a..3b79eeb5a274 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -95,7 +95,7 @@ define([ var ellipsoid = tilingScheme.ellipsoid; this._tilesToRender = []; - this._tileTraversalQueue = new Queue(); + this._tileTraversalStack = []; this._tileLoadQueueHigh = []; // high priority tiles are preventing refinement this._tileLoadQueueMedium = []; // medium priority tiles are being rendered this._tileLoadQueueLow = []; // low priority tiles were refined past or are non-visible parts of quads. @@ -403,8 +403,8 @@ define([ var tilesToRender = primitive._tilesToRender; tilesToRender.length = 0; - var traversalQueue = primitive._tileTraversalQueue; - traversalQueue.clear(); + var traversalStack = primitive._tileTraversalStack; + traversalStack.length = 0; // We can't render anything before the level zero tiles exist. if (!defined(primitive._levelZeroTiles)) { @@ -418,6 +418,7 @@ define([ } primitive._occluders.ellipsoid.cameraPosition = frameState.camera.positionWC; + var cameraPositionCartographic = frameState.camera.positionCartographic; var tileProvider = primitive._tileProvider; var occluders = primitive._occluders; @@ -471,7 +472,7 @@ define([ } ++debug.tilesWaitingForChildren; } else if (tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { - traversalQueue.enqueue(tile); + traversalStack.push(tile); } else { if (tile.needsLoading) { primitive._tileLoadQueueLow.push(tile); @@ -480,11 +481,8 @@ define([ } } - // Traverse the tiles in breadth-first order. - // This ordering allows us to load bigger, lower-detail tiles before smaller, higher-detail ones. - // This maximizes the average detail across the scene and results in fewer sharp transitions - // between very different LODs. - while (defined((tile = traversalQueue.dequeue()))) { + // Traverse in depth-first, near-to-far order. + while (defined((tile = traversalStack.pop()))) { ++debug.tilesVisited; primitive._tileReplacementQueue.markTileRendered(tile); @@ -494,10 +492,6 @@ define([ debug.maxDepth = tile.level; } - // There are a few different algorithms we could use here. - // This one doesn't load children unless we refine to them. - // We may want to revisit this in the future. - if (screenSpaceError(primitive, frameState, tile) < primitive.maximumScreenSpaceError) { // This tile meets SSE requirements, so render it. if (tile.needsLoading) { @@ -505,26 +499,46 @@ define([ primitive._tileLoadQueueMedium.push(tile); } addTileToRenderList(primitive, tile); - } else { + continue; + } + + var southwestChild = tile.southwestChild; + var southeastChild = tile.southeastChild; + var northwestChild = tile.northwestChild; + var northeastChild = tile.northeastChild; + var allAreRenderable = southwestChild.renderable && southeastChild.renderable && + northwestChild.renderable && northeastChild.renderable; + var allAreUpsampled = southwestChild.upsampledFromParent && southeastChild.upsampledFromParent && + northwestChild.upsampledFromParent && northeastChild.upsampledFromParent; + var allDoneLoading = !southwestChild.needsLoading && !southeastChild.needsLoading && + !northwestChild.needsLoading && !northeastChild.needsLoading; + + if (allAreRenderable && !allAreUpsampled) { + // SSE is not good enough and children are loaded, so refine. + // No need to add the children to the load queue because they'll be added (if necessary) when they're traversed. + traverseVisibleChildrenNearToFar(primitive, southwestChild, southeastChild, northwestChild, northeastChild, tileProvider, frameState, occluders, traversalStack); + if (tile.needsLoading) { - // We want to refine this tile if possible, so load with low priority. + // Tile is not rendered, so load it with low priority. primitive._tileLoadQueueLow.push(tile); } + } else if (allAreRenderable && !allAreUpsampled) { + // No point in rendering the children because they're all upsampled. Render this tile instead. + addTileToRenderList(primitive, tile); - if (queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(primitive, tile)) { - // SSE is not good enough and children are loaded, so refine. - var children = tile.children; - // PERFORMANCE_IDEA: traverse children front-to-back so we can avoid sorting by distance later. - for (i = 0, len = children.length; i < len; ++i) { - if (tileProvider.computeTileVisibility(children[i], frameState, occluders) !== Visibility.NONE) { - traversalQueue.enqueue(children[i]); - } else { - ++debug.tilesCulled; - } - } - } else { - // SSE is not good enough but not all children are loaded, so render this tile anyway. - addTileToRenderList(primitive, tile); + if (tile.needsLoading) { + // Rendered tile that's not waiting on children loads with medium priority. + primitive._tileLoadQueueMedium.push(tile); + } + } else { + // We'd like to refine but can't. Load the refinement blockers with high priority and + // render this tile in the meantime. + queueChildLoadNearToFar(primitive, cameraPositionCartographic, southwestChild, southeastChild, northwestChild, northeastChild); + addTileToRenderList(primitive, tile); + + if (tile.needsLoading) { + // We will refine this tile when it's possible, so load this tile only with low priority. + primitive._tileLoadQueueLow.push(tile); } } } @@ -532,6 +546,94 @@ define([ raiseTileLoadProgressEvent(primitive); } + function queueChildLoadNearToFar(primitive, cameraPosition, southwest, southeast, northwest, northeast) { + if (cameraPosition.longitude < southwest.east) { + if (cameraPosition.latitude < southwest.north) { + // Camera in southwest quadrant + queueChildTileLoad(primitive, southwest); + queueChildTileLoad(primitive, southeast); + queueChildTileLoad(primitive, northwest); + queueChildTileLoad(primitive, northeast); + } else { + // Camera in northwest quadrant + queueChildTileLoad(primitive, northwest); + queueChildTileLoad(primitive, southwest); + queueChildTileLoad(primitive, northeast); + queueChildTileLoad(primitive, southeast); + } + } else { + if (cameraPosition.latitude < southwest.north) { + // Camera southeast quadrant + queueChildTileLoad(primitive, southeast); + queueChildTileLoad(primitive, southwest); + queueChildTileLoad(primitive, northeast); + queueChildTileLoad(primitive, northwest); + } else { + // Camera in northeast quadrant + queueChildTileLoad(primitive, northeast); + queueChildTileLoad(primitive, northwest); + queueChildTileLoad(primitive, southeast); + queueChildTileLoad(primitive, southwest); + } + } + } + + function queueChildTileLoad(primitive, childTile) { + primitive._tileReplacementQueue.markTileRendered(childTile); + if (childTile.needsLoading) { + if (childTile.renderable) { + primitive._tileLoadQueueLow.push(childTile); + } else { + // A tile blocking refine loads with high priority + primitive._tileLoadQueueHigh.push(childTile); + } + } + } + + function traverseVisibleChildrenNearToFar(primitive, southwest, southeast, northwest, northeast, tileProvider, frameState, occluders, traversalStack) { + var cameraPosition = frameState.camera.positionCartographic; + + // Traverse in the opposite of the desired order, because we're pushing onto a stack (first in, last out), + // and we want the nearest out first. + if (cameraPosition.longitude < southwest.east) { + if (cameraPosition.latitude < southwest.north) { + // Camera in southwest quadrant + traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); + } else { + // Camera in northwest quadrant + traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); + } + } else { + if (cameraPosition.latitude < southwest.north) { + // Camera southeast quadrant + traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); + } else { + // Camera in northeast quadrant + traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); + traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); + } + } + } + + function traverseIfVisible(primitive, tile, tileProvider, frameState, occluders, traversalStack) { + if (tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { + traversalStack.push(tile); + } else { + ++primitive._debug.tilesCulled; + primitive._tileReplacementQueue.markTileRendered(tile); + } + } /** * Checks if the load queue length has changed since the last time we raised a queue change event - if so, raises * a new one. @@ -640,37 +742,18 @@ define([ // we're allowed to keep. primitive._tileReplacementQueue.trimTiles(primitive.tileCacheSize); - var startTime = getTimestamp(); - var timeSlice = primitive._loadQueueTimeSlice; - var endTime = startTime + timeSlice; - var i = 0; - var tile; - - for (i = tileLoadQueueHigh.length - 1; i >= 0; --i) { - tile = tileLoadQueueHigh[i]; - primitive._tileReplacementQueue.markTileRendered(tile); - tileProvider.loadTile(frameState, tile); - if (getTimestamp() >= endTime) { - break; - } - } + var endTime = getTimestamp() + primitive._loadQueueTimeSlice; - for (i = tileLoadQueueMedium.length - 1; i >= 0; --i) { - tile = tileLoadQueueMedium[i]; - primitive._tileReplacementQueue.markTileRendered(tile); - tileProvider.loadTile(frameState, tile); - if (getTimestamp() >= endTime) { - break; - } - } + processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueHigh); + processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueMedium); + processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueLow); + } - for (i = tileLoadQueueLow.length - 1; i >= 0; --i) { - tile = tileLoadQueueLow[i]; + function processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, loadQueue) { + for (var i = 0, len = loadQueue.length; i < len && getTimestamp() < endTime; ++i) { + var tile = loadQueue[i]; primitive._tileReplacementQueue.markTileRendered(tile); tileProvider.loadTile(frameState, tile); - if (getTimestamp() >= endTime) { - break; - } } } diff --git a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js index 57b76e94c8a3..34cdfe968807 100644 --- a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js +++ b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js @@ -805,7 +805,7 @@ define([ get : function() { var that = this; return createCommand(function() { - that.tile = that.tile.children[0]; + that.tile = that.tile.northwestChild; }); } }, @@ -820,7 +820,7 @@ define([ get : function() { var that = this; return createCommand(function() { - that.tile = that.tile.children[1]; + that.tile = that.tile.northeastChild; }); } }, @@ -835,7 +835,7 @@ define([ get : function() { var that = this; return createCommand(function() { - that.tile = that.tile.children[2]; + that.tile = that.tile.southwestChild; }); } }, @@ -850,7 +850,7 @@ define([ get : function() { var that = this; return createCommand(function() { - that.tile = that.tile.children[3]; + that.tile = that.tile.southeastChild; }); } }, From 2ef5282e93fdca74fa8eac40dd2f2dfbcfe550e5 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 7 Nov 2016 15:43:01 +1100 Subject: [PATCH 13/49] Actually load near-to-far. --- Source/Scene/QuadtreePrimitive.js | 51 +++---------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 3b79eeb5a274..3c167892ad89 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -522,7 +522,7 @@ define([ // Tile is not rendered, so load it with low priority. primitive._tileLoadQueueLow.push(tile); } - } else if (allAreRenderable && !allAreUpsampled) { + } else if (allAreRenderable && allAreUpsampled) { // No point in rendering the children because they're all upsampled. Render this tile instead. addTileToRenderList(primitive, tile); @@ -595,8 +595,8 @@ define([ // Traverse in the opposite of the desired order, because we're pushing onto a stack (first in, last out), // and we want the nearest out first. - if (cameraPosition.longitude < southwest.east) { - if (cameraPosition.latitude < southwest.north) { + if (cameraPosition.longitude < southwest.rectangle.east) { + if (cameraPosition.latitude < southwest.rectangle.north) { // Camera in southwest quadrant traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); @@ -610,7 +610,7 @@ define([ traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); } } else { - if (cameraPosition.latitude < southwest.north) { + if (cameraPosition.latitude < southwest.rectangle.north) { // Camera southeast quadrant traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); @@ -685,49 +685,6 @@ define([ ++primitive._debug.tilesRendered; } - function queueChildrenLoadAndDetermineIfChildrenAreAllRenderable(primitive, tile) { - var allRenderable = true; - var allUpsampledOnly = true; - var allDoneLoading = true; - - var children = tile.children; - var i; - var len; - var child; - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - - primitive._tileReplacementQueue.markTileRendered(child); - - allUpsampledOnly = allUpsampledOnly && child.upsampledFromParent; - allRenderable = allRenderable && child.renderable; - allDoneLoading = allDoneLoading && !child.needsLoading; - } - - if (!allRenderable) { - ++primitive._debug.tilesWaitingForChildren; - } - - // If all children are upsampled from this tile, we just render this tile instead of its children (don't refine). - var willRefine = allRenderable && !allUpsampledOnly; - - if (!willRefine && !allDoneLoading) { - for (i = 0, len = children.length; i < len; ++i) { - child = children[i]; - if (child.needsLoading) { - if (child.renderable) { - primitive._tileLoadQueueLow.push(child); - } else { - // A tile blocking refine loads with high priority - primitive._tileLoadQueueHigh.push(child); - } - } - } - } - - return willRefine; - } - function processTileLoadQueue(primitive, frameState) { var tileLoadQueueHigh = primitive._tileLoadQueueHigh; var tileLoadQueueMedium = primitive._tileLoadQueueMedium; From 099a65acca0271e6adff9df86cf5fc89439b73d9 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 7 Nov 2016 17:20:18 +1100 Subject: [PATCH 14/49] Use recursion instead of an explicit stack. This makes it easier to do pre- and post- order actions. --- Source/Scene/QuadtreePrimitive.js | 142 +++++++++++++++--------------- 1 file changed, 69 insertions(+), 73 deletions(-) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 3c167892ad89..7f6634ceeef2 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -95,7 +95,6 @@ define([ var ellipsoid = tilingScheme.ellipsoid; this._tilesToRender = []; - this._tileTraversalStack = []; this._tileLoadQueueHigh = []; // high priority tiles are preventing refinement this._tileLoadQueueMedium = []; // medium priority tiles are being rendered this._tileLoadQueueLow = []; // low priority tiles were refined past or are non-visible parts of quads. @@ -403,9 +402,6 @@ define([ var tilesToRender = primitive._tilesToRender; tilesToRender.length = 0; - var traversalStack = primitive._tileTraversalStack; - traversalStack.length = 0; - // We can't render anything before the level zero tiles exist. if (!defined(primitive._levelZeroTiles)) { if (primitive._tileProvider.ready) { @@ -418,7 +414,6 @@ define([ } primitive._occluders.ellipsoid.cameraPosition = frameState.camera.positionWC; - var cameraPositionCartographic = frameState.camera.positionCartographic; var tileProvider = primitive._tileProvider; var occluders = primitive._occluders; @@ -462,7 +457,7 @@ define([ // but currently they're just loaded in our traversal order which makes no guarantees // about depth ordering. - // Enqueue the root tiles that are renderable and visible. + // Traverse in depth-first, near-to-far order. for (i = 0, len = levelZeroTiles.length; i < len; ++i) { tile = levelZeroTiles[i]; primitive._tileReplacementQueue.markTileRendered(tile); @@ -472,7 +467,7 @@ define([ } ++debug.tilesWaitingForChildren; } else if (tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { - traversalStack.push(tile); + visitTile(primitive, frameState, tile); } else { if (tile.needsLoading) { primitive._tileLoadQueueLow.push(tile); @@ -481,48 +476,42 @@ define([ } } - // Traverse in depth-first, near-to-far order. - while (defined((tile = traversalStack.pop()))) { - ++debug.tilesVisited; + raiseTileLoadProgressEvent(primitive); + } - primitive._tileReplacementQueue.markTileRendered(tile); - tile._updateCustomData(frameNumber); + function visitTile(primitive, frameState, tile) { + var debug = primitive._debug; - if (tile.level > debug.maxDepth) { - debug.maxDepth = tile.level; - } + ++debug.tilesVisited; - if (screenSpaceError(primitive, frameState, tile) < primitive.maximumScreenSpaceError) { - // This tile meets SSE requirements, so render it. - if (tile.needsLoading) { - // Rendered tile meeting SSE loads with medium priority. - primitive._tileLoadQueueMedium.push(tile); - } - addTileToRenderList(primitive, tile); - continue; - } + primitive._tileReplacementQueue.markTileRendered(tile); + tile._updateCustomData(frameState.frameNumber); - var southwestChild = tile.southwestChild; - var southeastChild = tile.southeastChild; - var northwestChild = tile.northwestChild; - var northeastChild = tile.northeastChild; - var allAreRenderable = southwestChild.renderable && southeastChild.renderable && - northwestChild.renderable && northeastChild.renderable; - var allAreUpsampled = southwestChild.upsampledFromParent && southeastChild.upsampledFromParent && - northwestChild.upsampledFromParent && northeastChild.upsampledFromParent; - var allDoneLoading = !southwestChild.needsLoading && !southeastChild.needsLoading && - !northwestChild.needsLoading && !northeastChild.needsLoading; - - if (allAreRenderable && !allAreUpsampled) { - // SSE is not good enough and children are loaded, so refine. - // No need to add the children to the load queue because they'll be added (if necessary) when they're traversed. - traverseVisibleChildrenNearToFar(primitive, southwestChild, southeastChild, northwestChild, northeastChild, tileProvider, frameState, occluders, traversalStack); + if (tile.level > debug.maxDepth) { + debug.maxDepth = tile.level; + } - if (tile.needsLoading) { - // Tile is not rendered, so load it with low priority. - primitive._tileLoadQueueLow.push(tile); - } - } else if (allAreRenderable && allAreUpsampled) { + if (screenSpaceError(primitive, frameState, tile) < primitive.maximumScreenSpaceError) { + // This tile meets SSE requirements, so render it. + if (tile.needsLoading) { + // Rendered tile meeting SSE loads with medium priority. + primitive._tileLoadQueueMedium.push(tile); + } + addTileToRenderList(primitive, tile); + return; + } + + var southwestChild = tile.southwestChild; + var southeastChild = tile.southeastChild; + var northwestChild = tile.northwestChild; + var northeastChild = tile.northeastChild; + var allAreRenderable = southwestChild.renderable && southeastChild.renderable && + northwestChild.renderable && northeastChild.renderable; + var allAreUpsampled = southwestChild.upsampledFromParent && southeastChild.upsampledFromParent && + northwestChild.upsampledFromParent && northeastChild.upsampledFromParent; + + if (allAreRenderable) { + if (allAreUpsampled) { // No point in rendering the children because they're all upsampled. Render this tile instead. addTileToRenderList(primitive, tile); @@ -531,19 +520,26 @@ define([ primitive._tileLoadQueueMedium.push(tile); } } else { - // We'd like to refine but can't. Load the refinement blockers with high priority and - // render this tile in the meantime. - queueChildLoadNearToFar(primitive, cameraPositionCartographic, southwestChild, southeastChild, northwestChild, northeastChild); - addTileToRenderList(primitive, tile); + // SSE is not good enough and children are loaded, so refine. + // No need to add the children to the load queue because they'll be added (if necessary) when they're visited. + visitVisibleChildrenNearToFar(primitive, southwestChild, southeastChild, northwestChild, northeastChild, frameState); if (tile.needsLoading) { - // We will refine this tile when it's possible, so load this tile only with low priority. + // Tile is not rendered, so load it with low priority. primitive._tileLoadQueueLow.push(tile); } } + } else { + // We'd like to refine but can't because not all of our children are renderable. Load the refinement blockers with high priority and + // render this tile in the meantime. + queueChildLoadNearToFar(primitive, frameState.camera.positionCartographic, southwestChild, southeastChild, northwestChild, northeastChild); + addTileToRenderList(primitive, tile); + + if (tile.needsLoading) { + // We will refine this tile when it's possible, so load this tile only with low priority. + primitive._tileLoadQueueLow.push(tile); + } } - - raiseTileLoadProgressEvent(primitive); } function queueChildLoadNearToFar(primitive, cameraPosition, southwest, southeast, northwest, northeast) { @@ -590,45 +586,45 @@ define([ } } - function traverseVisibleChildrenNearToFar(primitive, southwest, southeast, northwest, northeast, tileProvider, frameState, occluders, traversalStack) { + function visitVisibleChildrenNearToFar(primitive, southwest, southeast, northwest, northeast, frameState) { var cameraPosition = frameState.camera.positionCartographic; + var tileProvider = primitive._tileProvider; + var occluders = primitive._occluders; - // Traverse in the opposite of the desired order, because we're pushing onto a stack (first in, last out), - // and we want the nearest out first. if (cameraPosition.longitude < southwest.rectangle.east) { if (cameraPosition.latitude < southwest.rectangle.north) { // Camera in southwest quadrant - traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); + visitIfVisible(primitive, southwest, tileProvider, frameState, occluders); + visitIfVisible(primitive, southeast, tileProvider, frameState, occluders); + visitIfVisible(primitive, northwest, tileProvider, frameState, occluders); + visitIfVisible(primitive, northeast, tileProvider, frameState, occluders); } else { // Camera in northwest quadrant - traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); + visitIfVisible(primitive, northwest, tileProvider, frameState, occluders); + visitIfVisible(primitive, southwest, tileProvider, frameState, occluders); + visitIfVisible(primitive, northeast, tileProvider, frameState, occluders); + visitIfVisible(primitive, southeast, tileProvider, frameState, occluders); } } else { if (cameraPosition.latitude < southwest.rectangle.north) { // Camera southeast quadrant - traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); + visitIfVisible(primitive, southeast, tileProvider, frameState, occluders); + visitIfVisible(primitive, southwest, tileProvider, frameState, occluders); + visitIfVisible(primitive, northeast, tileProvider, frameState, occluders); + visitIfVisible(primitive, northwest, tileProvider, frameState, occluders); } else { // Camera in northeast quadrant - traverseIfVisible(primitive, southwest, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, northwest, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, southeast, tileProvider, frameState, occluders, traversalStack); - traverseIfVisible(primitive, northeast, tileProvider, frameState, occluders, traversalStack); + visitIfVisible(primitive, northeast, tileProvider, frameState, occluders); + visitIfVisible(primitive, northwest, tileProvider, frameState, occluders); + visitIfVisible(primitive, southeast, tileProvider, frameState, occluders); + visitIfVisible(primitive, southwest, tileProvider, frameState, occluders); } } } - function traverseIfVisible(primitive, tile, tileProvider, frameState, occluders, traversalStack) { + function visitIfVisible(primitive, tile, tileProvider, frameState, occluders) { if (tileProvider.computeTileVisibility(tile, frameState, occluders) !== Visibility.NONE) { - traversalStack.push(tile); + visitTile(primitive, frameState, tile); } else { ++primitive._debug.tilesCulled; primitive._tileReplacementQueue.markTileRendered(tile); @@ -703,7 +699,7 @@ define([ processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueHigh); processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueMedium); - processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueLow); + //processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueLow); } function processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, loadQueue) { From 083e36e68fb950a1d0933b144954180389542297 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 7 Nov 2016 21:18:28 +1100 Subject: [PATCH 15/49] Fix test failures by removing uses of _children. --- Source/Scene/GlobeSurfaceTile.js | 50 +++++++++++++++------------- Source/Scene/QuadtreePrimitive.js | 2 +- Source/Scene/QuadtreeTile.js | 20 +++++++---- Specs/Scene/QuadtreePrimitiveSpec.js | 8 ++--- 4 files changed, 43 insertions(+), 37 deletions(-) diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index aacd731823f5..4e66c11fe858 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -458,32 +458,34 @@ define([ // of its ancestors receives new (better) data and we want to re-upsample from the // new data. - if (defined(tile._children)) { - for (var childIndex = 0; childIndex < 4; ++childIndex) { - var childTile = tile._children[childIndex]; - if (childTile.state !== QuadtreeTileLoadState.START) { - var childSurfaceTile = childTile.data; - if (defined(childSurfaceTile.terrainData) && !childSurfaceTile.terrainData.wasCreatedByUpsampling()) { - // Data for the child tile has already been loaded. - continue; - } + propagateNewUpsampledDataToChild(tile, tile._southwestChild); + propagateNewUpsampledDataToChild(tile, tile._southeastChild); + propagateNewUpsampledDataToChild(tile, tile._northwestChild); + propagateNewUpsampledDataToChild(tile, tile._northeastChild); + } - // Restart the upsampling process, no matter its current state. - // We create a new instance rather than just restarting the existing one - // because there could be an asynchronous operation pending on the existing one. - if (defined(childSurfaceTile.upsampledTerrain)) { - childSurfaceTile.upsampledTerrain.freeResources(); - } - childSurfaceTile.upsampledTerrain = new TileTerrain({ - data : surfaceTile.terrainData, - x : tile.x, - y : tile.y, - level : tile.level - }); - - childTile.state = QuadtreeTileLoadState.LOADING; - } + function propagateNewUpsampledDataToChild(tile, childTile) { + if (defined(childTile) && childTile.state !== QuadtreeTileLoadState.START) { + var childSurfaceTile = childTile.data; + if (defined(childSurfaceTile.terrainData) && !childSurfaceTile.terrainData.wasCreatedByUpsampling()) { + // Data for the child tile has already been loaded. + return; + } + + // Restart the upsampling process, no matter its current state. + // We create a new instance rather than just restarting the existing one + // because there could be an asynchronous operation pending on the existing one. + if (defined(childSurfaceTile.upsampledTerrain)) { + childSurfaceTile.upsampledTerrain.freeResources(); } + childSurfaceTile.upsampledTerrain = new TileTerrain({ + data : tile.data.terrainData, + x : tile.x, + y : tile.y, + level : tile.level + }); + + childTile.state = QuadtreeTileLoadState.LOADING; } } diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 7f6634ceeef2..c1f6d902e991 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -699,7 +699,7 @@ define([ processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueHigh); processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueMedium); - //processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueLow); + processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, tileLoadQueueLow); } function processSinglePriorityLoadQueue(primitive, frameState, tileProvider, endTime, loadQueue) { diff --git a/Source/Scene/QuadtreeTile.js b/Source/Scene/QuadtreeTile.js index e65730bb939a..faa211f32f74 100644 --- a/Source/Scene/QuadtreeTile.js +++ b/Source/Scene/QuadtreeTile.js @@ -406,13 +406,21 @@ define([ this.data.freeResources(); } - if (defined(this._children)) { - for (var i = 0, len = this._children.length; i < len; ++i) { - this._children[i].freeResources(); - } - this._children = undefined; - } + freeTile(this._southwestChild); + this._southwestChild = undefined; + freeTile(this._southeastChild); + this._southeastChild = undefined; + freeTile(this._northwestChild); + this._northwestChild = undefined; + freeTile(this._northeastChild); + this._northeastChild = undefined; }; + function freeTile(tile) { + if (defined(tile)) { + tile.freeResources(); + } + } + return QuadtreeTile; }); diff --git a/Specs/Scene/QuadtreePrimitiveSpec.js b/Specs/Scene/QuadtreePrimitiveSpec.js index 57e606d5642c..203041434204 100644 --- a/Specs/Scene/QuadtreePrimitiveSpec.js +++ b/Specs/Scene/QuadtreePrimitiveSpec.js @@ -191,18 +191,14 @@ defineSuite([ expect(progressEventSpy.calls.mostRecent().args[0]).toEqual(1); // Simulate the second zero-level child having loaded with two children. - quadtree._levelZeroTiles[1]._children = [ - buildEmptyQuadtreeTile(tileProvider), - buildEmptyQuadtreeTile(tileProvider) - ]; quadtree._levelZeroTiles[1].state = QuadtreeTileLoadState.DONE; quadtree._levelZeroTiles[1].renderable = true; quadtree.beginFrame(scene.frameState); quadtree.update(scene.frameState); quadtree.endFrame(scene.frameState); - // Now this should be back to 2. - expect(progressEventSpy.calls.mostRecent().args[0]).toEqual(2); + // Now that tile's four children should be in the load queue. + expect(progressEventSpy.calls.mostRecent().args[0]).toEqual(4); }); it('forEachLoadedTile does not enumerate tiles in the START state', function() { From d4426ae75c39e2456e7e65e7635e0685d8908ca1 Mon Sep 17 00:00:00 2001 From: Patrick Cozzi Date: Mon, 7 Nov 2016 07:22:17 -0500 Subject: [PATCH 16/49] Whitespace --- Source/Scene/QuadtreeTile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Scene/QuadtreeTile.js b/Source/Scene/QuadtreeTile.js index faa211f32f74..1609bf12dfe1 100644 --- a/Source/Scene/QuadtreeTile.js +++ b/Source/Scene/QuadtreeTile.js @@ -251,7 +251,6 @@ define([ } }, - /** * An array of tiles that is at the next level of the tile tree. * @memberof QuadtreeTile.prototype From b7c2faba0195938703af7db89da5dd841ec12b13 Mon Sep 17 00:00:00 2001 From: Sarah Chow Date: Mon, 7 Nov 2016 15:33:14 -0800 Subject: [PATCH 17/49] Newest demos --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 981de97c4833..e874a75f42d1 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,21 @@ We appreciate attribution by including the Cesium logo and link in your app. ### Demos ###

+ +  +  +  +  +  +  +  +  +  +  +  +  +  +        From f506e2f662e7d005e9c236fe2de2030dfccc19f9 Mon Sep 17 00:00:00 2001 From: Sarah Chow Date: Mon, 7 Nov 2016 15:34:14 -0800 Subject: [PATCH 18/49] tweak --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index e874a75f42d1..657f4e2b003f 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ We appreciate attribution by including the Cesium logo and link in your app. ### Demos ###

-       From 439161df20166ecae9a6aa42ab472de5dccf1dab Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 9 Nov 2016 16:17:30 +1100 Subject: [PATCH 19/49] Fix jshint warnings. --- Source/Scene/GlobeSurfaceTile.js | 2 -- Specs/Scene/QuadtreePrimitiveSpec.js | 9 --------- 2 files changed, 11 deletions(-) diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index 4e66c11fe858..e88ae7e81be6 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -449,8 +449,6 @@ define([ } function propagateNewUpsampledDataToChildren(tile) { - var surfaceTile = tile.data; - // Now that there's new data for this tile: // - child tiles that were previously upsampled need to be re-upsampled based on the new data. diff --git a/Specs/Scene/QuadtreePrimitiveSpec.js b/Specs/Scene/QuadtreePrimitiveSpec.js index 203041434204..63c13b86627e 100644 --- a/Specs/Scene/QuadtreePrimitiveSpec.js +++ b/Specs/Scene/QuadtreePrimitiveSpec.js @@ -350,13 +350,4 @@ defineSuite([ expect(position).toEqual(updatedPosition); }); - - function buildEmptyQuadtreeTile(tileProvider) { - return new QuadtreeTile({ - x : 0, - y : 0, - level : 0, - tilingScheme : tileProvider.tilingScheme - }); - } }, 'WebGL'); From bbcf49429cb89c2b9ebc3f351165bff6fff77e79 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 10 Nov 2016 15:51:52 +1100 Subject: [PATCH 20/49] Add a test, tweak loading of upsampled-only children. --- Source/Scene/QuadtreePrimitive.js | 5 ++ Specs/Scene/QuadtreePrimitiveSpec.js | 85 ++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index c1f6d902e991..2103b76daed8 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -515,6 +515,11 @@ define([ // No point in rendering the children because they're all upsampled. Render this tile instead. addTileToRenderList(primitive, tile); + // Load the children even though we're (currently) not going to render them. + // A tile that is "upsampled only" right now might change its tune once it does more loading. + // A tile that is upsampled now and forever should also be done loading, so no harm done. + queueChildLoadNearToFar(primitive, frameState.camera.positionCartographic, southwestChild, southeastChild, northwestChild, northeastChild); + if (tile.needsLoading) { // Rendered tile that's not waiting on children loads with medium priority. primitive._tileLoadQueueMedium.push(tile); diff --git a/Specs/Scene/QuadtreePrimitiveSpec.js b/Specs/Scene/QuadtreePrimitiveSpec.js index 63c13b86627e..b857ca534501 100644 --- a/Specs/Scene/QuadtreePrimitiveSpec.js +++ b/Specs/Scene/QuadtreePrimitiveSpec.js @@ -350,4 +350,89 @@ defineSuite([ expect(position).toEqual(updatedPosition); }); + + it('gives correct priority to tile loads', function() { + var tileProvider = createSpyTileProvider(); + tileProvider.getReady.and.returnValue(true); + tileProvider.computeTileVisibility.and.returnValue(Visibility.FULL); + + var quadtree = new QuadtreePrimitive({ + tileProvider : tileProvider + }); + + quadtree.beginFrame(scene.frameState); + quadtree.update(scene.frameState); + quadtree.endFrame(scene.frameState); + + // The root tiles should be in the high priority load queue + expect(quadtree._tileLoadQueueHigh.length).toBe(2); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[1]); + expect(quadtree._tileLoadQueueMedium.length).toBe(0); + expect(quadtree._tileLoadQueueLow.length).toBe(0); + + // Mark the first root tile renderable (but not done loading) + quadtree._levelZeroTiles[0].renderable = true; + + quadtree.beginFrame(scene.frameState); + quadtree.update(scene.frameState); + quadtree.endFrame(scene.frameState); + + // That root tile should now load with low priority while its children should load with high. + expect(quadtree._tileLoadQueueHigh.length).toBe(5); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[1]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[0]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[1]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[2]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[3]); + expect(quadtree._tileLoadQueueMedium.length).toBe(0); + expect(quadtree._tileLoadQueueLow.length).toBe(1); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0]); + + // Mark the children of that root tile renderable too, so we can refine it + quadtree._levelZeroTiles[0].children[0].renderable = true; + quadtree._levelZeroTiles[0].children[1].renderable = true; + quadtree._levelZeroTiles[0].children[2].renderable = true; + quadtree._levelZeroTiles[0].children[3].renderable = true; + + quadtree.beginFrame(scene.frameState); + quadtree.update(scene.frameState); + quadtree.endFrame(scene.frameState); + + expect(quadtree._tileLoadQueueHigh.length).toBe(17); // levelZeroTiles[1] plus levelZeroTiles[0]'s 16 grandchildren + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[1]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[0].children[0]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[0].children[1]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[0].children[2]); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[0].children[0].children[3]); + expect(quadtree._tileLoadQueueMedium.length).toBe(0); + expect(quadtree._tileLoadQueueLow.length).toBe(5); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[0]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[1]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[2]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[3]); + + // Mark the children of levelZeroTiles[0] upsampled + quadtree._levelZeroTiles[0].children[0].upsampledFromParent = true; + quadtree._levelZeroTiles[0].children[1].upsampledFromParent = true; + quadtree._levelZeroTiles[0].children[2].upsampledFromParent = true; + quadtree._levelZeroTiles[0].children[3].upsampledFromParent = true; + + quadtree.beginFrame(scene.frameState); + quadtree.update(scene.frameState); + quadtree.endFrame(scene.frameState); + + // levelZeroTiles[0] should move to medium priority. + // Its descendents should continue loading, so they have a chance to decide they're not upsampled later. + expect(quadtree._tileLoadQueueHigh.length).toBe(1); + expect(quadtree._tileLoadQueueHigh).toContain(quadtree._levelZeroTiles[1]); + expect(quadtree._tileLoadQueueMedium.length).toBe(1); + expect(quadtree._tileLoadQueueMedium).toContain(quadtree._levelZeroTiles[0]); + expect(quadtree._tileLoadQueueLow.length).toBe(4); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[0]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[1]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[2]); + expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[3]); + }); }, 'WebGL'); From 33878c3d1e1f17fbaf6d621c9e263568a0edbefd Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 10 Nov 2016 17:49:19 +1100 Subject: [PATCH 21/49] Remove explicit sort for near-to-far rendering. --- Source/Scene/QuadtreePrimitive.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 2103b76daed8..9b3f896a1a7c 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -802,17 +802,11 @@ define([ } } - function tileDistanceSortFunction(a, b) { - return a._distance - b._distance; - } - function createRenderCommandsForSelectedTiles(primitive, frameState) { var tileProvider = primitive._tileProvider; var tilesToRender = primitive._tilesToRender; var tilesToUpdateHeights = primitive._tileToUpdateHeights; - tilesToRender.sort(tileDistanceSortFunction); - for (var i = 0, len = tilesToRender.length; i < len; ++i) { var tile = tilesToRender[i]; tileProvider.showTileThisFrame(tile, frameState); From 2daf35397c2f24c51c7fa3da8596696f4bd182ea Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 10 Nov 2016 18:11:21 +1100 Subject: [PATCH 22/49] Update CHANGES.md. --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index f7d86848e02c..b6b5b82dd5a3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ Change Log * * Breaking changes * -* Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. +* Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. This results in a 25% reduction in load times in many cases. * Added support for saving html and css in Github Gists. [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125) * Fixed `Cartographic.fromCartesian` when the cartesian is not on the ellipsoid surface. [#4611](https://github.com/AnalyticalGraphicsInc/cesium/issues/4611) From 9fed2a83ec421c81d6d0681b2a2938d392d37e29 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Thu, 10 Nov 2016 18:40:09 -0500 Subject: [PATCH 23/49] chore(package): update aws-sdk to version 2.7.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 778c24336f19..cfc0592139e9 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "almond": "0.3.3", - "aws-sdk": "2.6.15", + "aws-sdk": "2.7.0", "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2", From d61437d23aaaff42377c5e7276a3bbb89cd06e45 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 11 Nov 2016 11:14:46 +1100 Subject: [PATCH 24/49] Add test of near-to-far render order. --- Source/Scene/QuadtreePrimitive.js | 20 ++++++++++ Specs/Scene/QuadtreePrimitiveSpec.js | 55 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index 9b3f896a1a7c..ef14e0b3697c 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -389,6 +389,20 @@ define([ this._tileProvider = this._tileProvider && this._tileProvider.destroy(); }; + var comparisonPoint; + var centerScratch = new Cartographic(); + function compareDistanceToPoint(a, b) { + var center = Rectangle.center(a.rectangle, centerScratch); + var alon = center.longitude - comparisonPoint.longitude; + var alat = center.latitude - comparisonPoint.latitude; + + center = Rectangle.center(b.rectangle, centerScratch); + var blon = center.longitude - comparisonPoint.longitude; + var blat = center.latitude - comparisonPoint.latitude; + + return (alon * alon + alat * alat) - (blon * blon + blat * blat); + } + function selectTilesForRendering(primitive, frameState) { var debug = primitive._debug; if (debug.suspendLodUpdate) { @@ -421,6 +435,12 @@ define([ var tile; var levelZeroTiles = primitive._levelZeroTiles; + // Sort the level zero tiles by the distance from the center to the camera. + // The level zero tiles aren't necessarily a nice neat quad, so we can use the + // quadtree ordering we use elsewhere in the tree + comparisonPoint = frameState.camera.positionCartographic; + levelZeroTiles.sort(compareDistanceToPoint) + var customDataAdded = primitive._addHeightCallbacks; var customDataRemoved = primitive._removeHeightCallbacks; var frameNumber = frameState.frameNumber; diff --git a/Specs/Scene/QuadtreePrimitiveSpec.js b/Specs/Scene/QuadtreePrimitiveSpec.js index b857ca534501..c23dc2ba5d0b 100644 --- a/Specs/Scene/QuadtreePrimitiveSpec.js +++ b/Specs/Scene/QuadtreePrimitiveSpec.js @@ -9,6 +9,7 @@ defineSuite([ 'Core/Visibility', 'Scene/QuadtreeTile', 'Scene/QuadtreeTileLoadState', + 'Specs/pollToPromise', 'Specs/createScene' ], function( QuadtreePrimitive, @@ -20,6 +21,7 @@ defineSuite([ Visibility, QuadtreeTile, QuadtreeTileLoadState, + pollToPromise, createScene) { 'use strict'; @@ -435,4 +437,57 @@ defineSuite([ expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[2]); expect(quadtree._tileLoadQueueLow).toContain(quadtree._levelZeroTiles[0].children[3]); }); + + it('renders tiles in approximate near-to-far order', function() { + var tileProvider = createSpyTileProvider(); + tileProvider.getReady.and.returnValue(true); + tileProvider.computeTileVisibility.and.returnValue(Visibility.FULL); + + var quadtree = new QuadtreePrimitive({ + tileProvider : tileProvider + }); + + tileProvider.loadTile.and.callFake(function(frameState, tile) { + if (tile.level <= 1) { + tile.state = QuadtreeTileLoadState.DONE; + tile.renderable = true; + } + }); + + scene.camera.setView({ + destination : Cartesian3.fromDegrees(1.0, 1.0, 15000.0) + }); + scene.camera.update(scene.mode); + + return pollToPromise(function() { + quadtree.beginFrame(scene.frameState); + quadtree.update(scene.frameState); + quadtree.endFrame(scene.frameState); + + return quadtree._tilesToRender.filter(function(tile) { return tile.level === 1; }).length === 8; + }).then(function() { + quadtree.beginFrame(scene.frameState); + quadtree.update(scene.frameState); + quadtree.endFrame(scene.frameState); + + // Rendered tiles: + // +----+----+----+----+ + // |w.nw|w.ne|e.nw|e.ne| + // +----+----+----+----+ + // |w.sw|w.se|e.sw|e.se| + // +----+----+----+----+ + // camera is located in e.nw (east.northwestChild) + + var west = quadtree._levelZeroTiles.filter(function(tile) { return tile.x === 0; })[0]; + var east = quadtree._levelZeroTiles.filter(function(tile) { return tile.x === 1; })[0]; + expect(quadtree._tilesToRender[0]).toBe(east.northwestChild); + expect(quadtree._tilesToRender[1] == east.southwestChild || quadtree._tilesToRender[1] === east.northeastChild).toBe(true); + expect(quadtree._tilesToRender[2] == east.southwestChild || quadtree._tilesToRender[2] === east.northeastChild).toBe(true); + expect(quadtree._tilesToRender[3]).toBe(east.southeastChild); + expect(quadtree._tilesToRender[4]).toBe(west.northeastChild); + expect(quadtree._tilesToRender[5] == west.northwestChild || quadtree._tilesToRender[5] === west.southeastChild).toBe(true); + expect(quadtree._tilesToRender[6] == west.northwestChild || quadtree._tilesToRender[6] === west.southeastChild).toBe(true); + expect(quadtree._tilesToRender[7]).toBe(west.southwestChild); + }); + }); }, 'WebGL'); From 71b56bfd3e32a9e84700b26805def2fa2d554f08 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 11 Nov 2016 11:45:44 +1100 Subject: [PATCH 25/49] Fix jshint warnings. --- Source/Scene/QuadtreePrimitive.js | 2 +- Specs/Scene/QuadtreePrimitiveSpec.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index ef14e0b3697c..782230e37ea2 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -439,7 +439,7 @@ define([ // The level zero tiles aren't necessarily a nice neat quad, so we can use the // quadtree ordering we use elsewhere in the tree comparisonPoint = frameState.camera.positionCartographic; - levelZeroTiles.sort(compareDistanceToPoint) + levelZeroTiles.sort(compareDistanceToPoint); var customDataAdded = primitive._addHeightCallbacks; var customDataRemoved = primitive._removeHeightCallbacks; diff --git a/Specs/Scene/QuadtreePrimitiveSpec.js b/Specs/Scene/QuadtreePrimitiveSpec.js index c23dc2ba5d0b..3a5641b3939b 100644 --- a/Specs/Scene/QuadtreePrimitiveSpec.js +++ b/Specs/Scene/QuadtreePrimitiveSpec.js @@ -481,12 +481,12 @@ defineSuite([ var west = quadtree._levelZeroTiles.filter(function(tile) { return tile.x === 0; })[0]; var east = quadtree._levelZeroTiles.filter(function(tile) { return tile.x === 1; })[0]; expect(quadtree._tilesToRender[0]).toBe(east.northwestChild); - expect(quadtree._tilesToRender[1] == east.southwestChild || quadtree._tilesToRender[1] === east.northeastChild).toBe(true); - expect(quadtree._tilesToRender[2] == east.southwestChild || quadtree._tilesToRender[2] === east.northeastChild).toBe(true); + expect(quadtree._tilesToRender[1] === east.southwestChild || quadtree._tilesToRender[1] === east.northeastChild).toBe(true); + expect(quadtree._tilesToRender[2] === east.southwestChild || quadtree._tilesToRender[2] === east.northeastChild).toBe(true); expect(quadtree._tilesToRender[3]).toBe(east.southeastChild); expect(quadtree._tilesToRender[4]).toBe(west.northeastChild); - expect(quadtree._tilesToRender[5] == west.northwestChild || quadtree._tilesToRender[5] === west.southeastChild).toBe(true); - expect(quadtree._tilesToRender[6] == west.northwestChild || quadtree._tilesToRender[6] === west.southeastChild).toBe(true); + expect(quadtree._tilesToRender[5] === west.northwestChild || quadtree._tilesToRender[5] === west.southeastChild).toBe(true); + expect(quadtree._tilesToRender[6] === west.northwestChild || quadtree._tilesToRender[6] === west.southeastChild).toBe(true); expect(quadtree._tilesToRender[7]).toBe(west.southwestChild); }); }); From 8a5ffc7249901549e6329950035a67dc4148f12c Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 11 Nov 2016 11:50:28 +1100 Subject: [PATCH 26/49] Remove QuadtreePrimitive development Sandcastle example. It doesn't work, and 3D Tiles are the true answer anway. --- .../development/QuadtreePrimitive.html | 173 ------------------ 1 file changed, 173 deletions(-) delete mode 100644 Apps/Sandcastle/gallery/development/QuadtreePrimitive.html diff --git a/Apps/Sandcastle/gallery/development/QuadtreePrimitive.html b/Apps/Sandcastle/gallery/development/QuadtreePrimitive.html deleted file mode 100644 index 0f9bc1427620..000000000000 --- a/Apps/Sandcastle/gallery/development/QuadtreePrimitive.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - Cesium Demo - - - - - - -

-

Loading...

-
- - - From 7f522840d0427298e42a2353b38e74fbdcdd664f Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 11 Nov 2016 10:21:34 -0500 Subject: [PATCH 27/49] chore(package): update electron to version 1.4.6 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cfc0592139e9..7637e1301336 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2", - "electron": "1.4.5", + "electron": "1.4.6", "event-stream": "3.3.4", "express": "4.14.0", "globby": "6.1.0", From d9332c47f6be60c736b808925ca6110e464ef06f Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 11 Nov 2016 10:21:34 -0500 Subject: [PATCH 28/49] chore(package): update karma-detect-browsers to version 2.2.3 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cfc0592139e9..188c39c1a6fd 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "jshint-stylish": "2.2.1", "karma": "1.3.0", "karma-chrome-launcher": "2.0.0", - "karma-detect-browsers": "2.2.1", + "karma-detect-browsers": "2.2.3", "karma-electron": "5.1.1", "karma-firefox-launcher": "1.0.0", "karma-ie-launcher": "1.0.0", From a1df7ad73232d6958553a13d79e456cb15e90930 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 11 Nov 2016 10:26:30 -0500 Subject: [PATCH 29/49] chore(package): update jsdoc to version 3.4.3 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e97cfa9585b1..e9d26247c3b8 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "gulp-replace": "0.5.4", "gulp-zip": "3.0.2", "jasmine-core": "2.5.2", - "jsdoc": "3.4.2", + "jsdoc": "3.4.3", "jshint": "2.9.4", "jshint-stylish": "2.2.1", "karma": "1.3.0", From c60b44886b696e99b21bacd22e79a1c2291a6b2a Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Mon, 14 Nov 2016 15:38:58 -0500 Subject: [PATCH 30/49] chore(package): update yargs to version 6.4.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9d26247c3b8..d01d30da0a05 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "request": "2.78.0", "rimraf": "2.5.4", "strip-comments": "0.3.2", - "yargs": "6.3.0" + "yargs": "6.4.0" }, "scripts": { "start": "node server.js", From 547d277fae79ea12d092f420aa479e1072463050 Mon Sep 17 00:00:00 2001 From: Dan Bagnell Date: Tue, 15 Nov 2016 19:18:55 -0500 Subject: [PATCH 31/49] Result after running sortRequires. --- Source/Core/HeadingPitchRoll.js | 18 ++-- Source/Core/HeightmapTessellator.js | 1 + Source/Core/PolylineVolumeGeometry.js | 4 +- Source/Core/TrustedServers.js | 18 ++-- Source/Core/loadImage.js | 8 +- Source/Core/loadWithXhr.js | 8 +- Source/DataSources/EntityCluster.js | 102 +++++++++--------- Specs/Core/HeadingPitchRollSpec.js | 14 +-- Specs/Core/Matrix3Spec.js | 22 ++-- Specs/Core/TransformsSpec.js | 82 +++++++------- Specs/Core/TrustedServersSpec.js | 6 +- Specs/DataSources/EntityClusterSpec.js | 1 + .../PolylineVolumeGeometryUpdaterSpec.js | 4 +- Specs/Scene/BatchTableSpec.js | 26 ++--- Specs/Scene/LabelCollectionSpec.js | 4 +- Specs/Scene/PrimitiveSpec.js | 4 +- Specs/Scene/QuadtreePrimitiveSpec.js | 8 +- Specs/Scene/SceneTransformsSpec.js | 4 +- 18 files changed, 168 insertions(+), 166 deletions(-) diff --git a/Source/Core/HeadingPitchRoll.js b/Source/Core/HeadingPitchRoll.js index 32229a9880f7..6428fc73a83b 100644 --- a/Source/Core/HeadingPitchRoll.js +++ b/Source/Core/HeadingPitchRoll.js @@ -1,14 +1,14 @@ /*global define*/ define([ - './defaultValue', - './defined', - './DeveloperError', - './Math' -], function( - defaultValue, - defined, - DeveloperError, - CesiumMath) { + './defaultValue', + './defined', + './DeveloperError', + './Math' + ], function( + defaultValue, + defined, + DeveloperError, + CesiumMath) { "use strict"; /** diff --git a/Source/Core/HeightmapTessellator.js b/Source/Core/HeightmapTessellator.js index 9454338ff0da..40406b0fa194 100644 --- a/Source/Core/HeightmapTessellator.js +++ b/Source/Core/HeightmapTessellator.js @@ -17,6 +17,7 @@ define([ './TerrainEncoding', './Transforms', './WebMercatorProjection', + ], function( AxisAlignedBoundingBox, BoundingSphere, diff --git a/Source/Core/PolylineVolumeGeometry.js b/Source/Core/PolylineVolumeGeometry.js index 4cf9b5cf04f9..4f65fbd941a6 100644 --- a/Source/Core/PolylineVolumeGeometry.js +++ b/Source/Core/PolylineVolumeGeometry.js @@ -9,7 +9,6 @@ define([ './CornerType', './defaultValue', './defined', - './oneTimeWarning', './DeveloperError', './Ellipsoid', './Geometry', @@ -18,6 +17,7 @@ define([ './GeometryPipeline', './IndexDatatype', './Math', + './oneTimeWarning', './PolygonPipeline', './PolylineVolumeGeometryLibrary', './PrimitiveType', @@ -33,7 +33,6 @@ define([ CornerType, defaultValue, defined, - oneTimeWarning, DeveloperError, Ellipsoid, Geometry, @@ -42,6 +41,7 @@ define([ GeometryPipeline, IndexDatatype, CesiumMath, + oneTimeWarning, PolygonPipeline, PolylineVolumeGeometryLibrary, PrimitiveType, diff --git a/Source/Core/TrustedServers.js b/Source/Core/TrustedServers.js index cc538ad2241c..fcd08d380188 100644 --- a/Source/Core/TrustedServers.js +++ b/Source/Core/TrustedServers.js @@ -1,14 +1,14 @@ /*global define*/ define([ - './defined', - './defineProperties', - './DeveloperError', - '../ThirdParty/Uri' -], function( - defined, - defineProperties, - DeveloperError, - Uri) { + '../ThirdParty/Uri', + './defined', + './defineProperties', + './DeveloperError' + ], function( + Uri, + defined, + defineProperties, + DeveloperError) { 'use strict'; /** diff --git a/Source/Core/loadImage.js b/Source/Core/loadImage.js index 861e29343feb..ba299a24c860 100644 --- a/Source/Core/loadImage.js +++ b/Source/Core/loadImage.js @@ -1,18 +1,18 @@ /*global define*/ define([ '../ThirdParty/when', - './TrustedServers', './defaultValue', './defined', './DeveloperError', - './isCrossOriginUrl' + './isCrossOriginUrl', + './TrustedServers' ], function( when, - TrustedServers, defaultValue, defined, DeveloperError, - isCrossOriginUrl) { + isCrossOriginUrl, + TrustedServers) { 'use strict'; var dataUriRegex = /^data:/; diff --git a/Source/Core/loadWithXhr.js b/Source/Core/loadWithXhr.js index 01066b2341ec..a44debf511db 100644 --- a/Source/Core/loadWithXhr.js +++ b/Source/Core/loadWithXhr.js @@ -1,20 +1,20 @@ /*global define*/ define([ '../ThirdParty/when', - './TrustedServers', './defaultValue', './defined', './DeveloperError', './RequestErrorEvent', - './RuntimeError' + './RuntimeError', + './TrustedServers' ], function( when, - TrustedServers, defaultValue, defined, DeveloperError, RequestErrorEvent, - RuntimeError) { + RuntimeError, + TrustedServers) { 'use strict'; /** diff --git a/Source/DataSources/EntityCluster.js b/Source/DataSources/EntityCluster.js index e652c41c257a..9db3ae94b549 100644 --- a/Source/DataSources/EntityCluster.js +++ b/Source/DataSources/EntityCluster.js @@ -1,56 +1,56 @@ /*global define*/ define([ - '../Core/BoundingRectangle', - '../Core/Cartesian2', - '../Core/Cartesian3', - '../Core/Color', - '../Core/defaultValue', - '../Core/defined', - '../Core/defineProperties', - '../Core/destroyObject', - '../Core/EllipsoidalOccluder', - '../Core/Event', - '../Core/Matrix4', - '../Scene/Billboard', - '../Scene/BillboardCollection', - '../Scene/HeightReference', - '../Scene/HorizontalOrigin', - '../Scene/Label', - '../Scene/LabelCollection', - '../Scene/LabelStyle', - '../Scene/PointPrimitive', - '../Scene/PointPrimitiveCollection', - '../Scene/SceneTransforms', - '../Scene/VerticalOrigin', - '../ThirdParty/kdbush', - './Entity', - './Property' -], function( - BoundingRectangle, - Cartesian2, - Cartesian3, - Color, - defaultValue, - defined, - defineProperties, - destroyObject, - EllipsoidalOccluder, - Event, - Matrix4, - Billboard, - BillboardCollection, - HeightReference, - HorizontalOrigin, - Label, - LabelCollection, - LabelStyle, - PointPrimitive, - PointPrimitiveCollection, - SceneTransforms, - VerticalOrigin, - kdbush, - Entity, - Property) { + '../Core/BoundingRectangle', + '../Core/Cartesian2', + '../Core/Cartesian3', + '../Core/Color', + '../Core/defaultValue', + '../Core/defined', + '../Core/defineProperties', + '../Core/destroyObject', + '../Core/EllipsoidalOccluder', + '../Core/Event', + '../Core/Matrix4', + '../Scene/Billboard', + '../Scene/BillboardCollection', + '../Scene/HeightReference', + '../Scene/HorizontalOrigin', + '../Scene/Label', + '../Scene/LabelCollection', + '../Scene/LabelStyle', + '../Scene/PointPrimitive', + '../Scene/PointPrimitiveCollection', + '../Scene/SceneTransforms', + '../Scene/VerticalOrigin', + '../ThirdParty/kdbush', + './Entity', + './Property' + ], function( + BoundingRectangle, + Cartesian2, + Cartesian3, + Color, + defaultValue, + defined, + defineProperties, + destroyObject, + EllipsoidalOccluder, + Event, + Matrix4, + Billboard, + BillboardCollection, + HeightReference, + HorizontalOrigin, + Label, + LabelCollection, + LabelStyle, + PointPrimitive, + PointPrimitiveCollection, + SceneTransforms, + VerticalOrigin, + kdbush, + Entity, + Property) { 'use strict'; /** diff --git a/Specs/Core/HeadingPitchRollSpec.js b/Specs/Core/HeadingPitchRollSpec.js index cb0212267adf..93c150ea666e 100644 --- a/Specs/Core/HeadingPitchRollSpec.js +++ b/Specs/Core/HeadingPitchRollSpec.js @@ -1,12 +1,12 @@ /*global defineSuite*/ defineSuite([ - 'Core/HeadingPitchRoll', - 'Core/Math', - 'Core/Quaternion' -], function( - HeadingPitchRoll, - CesiumMath, - Quaternion) { + 'Core/HeadingPitchRoll', + 'Core/Math', + 'Core/Quaternion' + ], function( + HeadingPitchRoll, + CesiumMath, + Quaternion) { "use strict"; /*global it,expect*/ diff --git a/Specs/Core/Matrix3Spec.js b/Specs/Core/Matrix3Spec.js index 213593f49e66..df3c4c009bc3 100644 --- a/Specs/Core/Matrix3Spec.js +++ b/Specs/Core/Matrix3Spec.js @@ -1,16 +1,16 @@ /*global defineSuite*/ defineSuite([ - 'Core/Matrix3', - 'Core/Cartesian3', - 'Core/Math', - 'Core/HeadingPitchRoll', - 'Core/Quaternion' -], function( - Matrix3, - Cartesian3, - CesiumMath, - HeadingPitchRoll, - Quaternion) { + 'Core/Matrix3', + 'Core/Cartesian3', + 'Core/HeadingPitchRoll', + 'Core/Math', + 'Core/Quaternion' + ], function( + Matrix3, + Cartesian3, + HeadingPitchRoll, + CesiumMath, + Quaternion) { 'use strict'; it('default constructor creates values array with all zeros.', function() { diff --git a/Specs/Core/TransformsSpec.js b/Specs/Core/TransformsSpec.js index 40221fc9bc1f..f6be7aa1abf8 100644 --- a/Specs/Core/TransformsSpec.js +++ b/Specs/Core/TransformsSpec.js @@ -1,46 +1,46 @@ /*global defineSuite*/ defineSuite([ - 'Core/Transforms', - 'Core/Cartesian2', - 'Core/Cartesian3', - 'Core/Cartesian4', - 'Core/defined', - 'Core/DeveloperError', - 'Core/EarthOrientationParameters', - 'Core/Ellipsoid', - 'Core/GeographicProjection', - 'Core/HeadingPitchRoll', - 'Core/Iau2006XysData', - 'Core/JulianDate', - 'Core/loadJson', - 'Core/Math', - 'Core/Matrix3', - 'Core/Matrix4', - 'Core/Quaternion', - 'Core/TimeConstants', - 'Core/TimeInterval', - 'ThirdParty/when' -], function( - Transforms, - Cartesian2, - Cartesian3, - Cartesian4, - defined, - DeveloperError, - EarthOrientationParameters, - Ellipsoid, - GeographicProjection, - HeadingPitchRoll, - Iau2006XysData, - JulianDate, - loadJson, - CesiumMath, - Matrix3, - Matrix4, - Quaternion, - TimeConstants, - TimeInterval, - when) { + 'Core/Transforms', + 'Core/Cartesian2', + 'Core/Cartesian3', + 'Core/Cartesian4', + 'Core/defined', + 'Core/DeveloperError', + 'Core/EarthOrientationParameters', + 'Core/Ellipsoid', + 'Core/GeographicProjection', + 'Core/HeadingPitchRoll', + 'Core/Iau2006XysData', + 'Core/JulianDate', + 'Core/loadJson', + 'Core/Math', + 'Core/Matrix3', + 'Core/Matrix4', + 'Core/Quaternion', + 'Core/TimeConstants', + 'Core/TimeInterval', + 'ThirdParty/when' + ], function( + Transforms, + Cartesian2, + Cartesian3, + Cartesian4, + defined, + DeveloperError, + EarthOrientationParameters, + Ellipsoid, + GeographicProjection, + HeadingPitchRoll, + Iau2006XysData, + JulianDate, + loadJson, + CesiumMath, + Matrix3, + Matrix4, + Quaternion, + TimeConstants, + TimeInterval, + when) { 'use strict'; var negativeX = new Cartesian4(-1, 0, 0, 0); diff --git a/Specs/Core/TrustedServersSpec.js b/Specs/Core/TrustedServersSpec.js index 0eee872ec672..164b9b0340aa 100644 --- a/Specs/Core/TrustedServersSpec.js +++ b/Specs/Core/TrustedServersSpec.js @@ -1,8 +1,8 @@ /*global defineSuite*/ defineSuite([ - 'Core/TrustedServers' -], function( - TrustedServers) { + 'Core/TrustedServers' + ], function( + TrustedServers) { 'use strict'; afterEach(function() { diff --git a/Specs/DataSources/EntityClusterSpec.js b/Specs/DataSources/EntityClusterSpec.js index 665343f1c236..21e3a2a1272a 100644 --- a/Specs/DataSources/EntityClusterSpec.js +++ b/Specs/DataSources/EntityClusterSpec.js @@ -14,6 +14,7 @@ defineSuite([ 'Specs/createCanvas', 'Specs/createGlobe', 'Specs/createScene', + ], function( EntityCluster, Cartesian2, diff --git a/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js b/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js index 27618dda0ddf..b577d0a96abe 100644 --- a/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js +++ b/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js @@ -5,9 +5,9 @@ defineSuite([ 'Core/Cartesian3', 'Core/Color', 'Core/ColorGeometryInstanceAttribute', + 'Core/CornerType', 'Core/DistanceDisplayCondition', 'Core/DistanceDisplayConditionGeometryInstanceAttribute', - 'Core/CornerType', 'Core/JulianDate', 'Core/ShowGeometryInstanceAttribute', 'Core/TimeInterval', @@ -31,9 +31,9 @@ defineSuite([ Cartesian3, Color, ColorGeometryInstanceAttribute, + CornerType, DistanceDisplayCondition, DistanceDisplayConditionGeometryInstanceAttribute, - CornerType, JulianDate, ShowGeometryInstanceAttribute, TimeInterval, diff --git a/Specs/Scene/BatchTableSpec.js b/Specs/Scene/BatchTableSpec.js index 87b1fdaeffff..015fa808b21d 100644 --- a/Specs/Scene/BatchTableSpec.js +++ b/Specs/Scene/BatchTableSpec.js @@ -1,18 +1,18 @@ /*global defineSuite*/ defineSuite([ - 'Scene/BatchTable', - 'Core/Cartesian4', - 'Core/ComponentDatatype', - 'Renderer/PixelDatatype', - 'Renderer/Texture', - 'Specs/createScene' -], function( - BatchTable, - Cartesian4, - ComponentDatatype, - PixelDatatype, - Texture, - createScene) { + 'Scene/BatchTable', + 'Core/Cartesian4', + 'Core/ComponentDatatype', + 'Renderer/PixelDatatype', + 'Renderer/Texture', + 'Specs/createScene' + ], function( + BatchTable, + Cartesian4, + ComponentDatatype, + PixelDatatype, + Texture, + createScene) { 'use strict'; var unsignedByteAttributes = [{ diff --git a/Specs/Scene/LabelCollectionSpec.js b/Specs/Scene/LabelCollectionSpec.js index 81a460109812..3b61582483be 100644 --- a/Specs/Scene/LabelCollectionSpec.js +++ b/Specs/Scene/LabelCollectionSpec.js @@ -13,9 +13,9 @@ defineSuite([ 'Core/NearFarScalar', 'Core/Rectangle', 'Renderer/ContextLimits', + 'Scene/Globe', 'Scene/HeightReference', 'Scene/HorizontalOrigin', - 'Scene/Globe', 'Scene/Label', 'Scene/LabelStyle', 'Scene/OrthographicFrustum', @@ -36,9 +36,9 @@ defineSuite([ NearFarScalar, Rectangle, ContextLimits, + Globe, HeightReference, HorizontalOrigin, - Globe, Label, LabelStyle, OrthographicFrustum, diff --git a/Specs/Scene/PrimitiveSpec.js b/Specs/Scene/PrimitiveSpec.js index dc3ded46321b..6d491c2c00ea 100644 --- a/Specs/Scene/PrimitiveSpec.js +++ b/Specs/Scene/PrimitiveSpec.js @@ -6,6 +6,7 @@ defineSuite([ 'Core/Cartesian3', 'Core/ColorGeometryInstanceAttribute', 'Core/ComponentDatatype', + 'Core/CylinderGeometry', 'Core/defined', 'Core/DistanceDisplayConditionGeometryInstanceAttribute', 'Core/Ellipsoid', @@ -17,7 +18,6 @@ defineSuite([ 'Core/Math', 'Core/Matrix4', 'Core/PolygonGeometry', - 'Core/CylinderGeometry', 'Core/PrimitiveType', 'Core/Rectangle', 'Core/RectangleGeometry', @@ -39,6 +39,7 @@ defineSuite([ Cartesian3, ColorGeometryInstanceAttribute, ComponentDatatype, + CylinderGeometry, defined, DistanceDisplayConditionGeometryInstanceAttribute, Ellipsoid, @@ -50,7 +51,6 @@ defineSuite([ CesiumMath, Matrix4, PolygonGeometry, - CylinderGeometry, PrimitiveType, Rectangle, RectangleGeometry, diff --git a/Specs/Scene/QuadtreePrimitiveSpec.js b/Specs/Scene/QuadtreePrimitiveSpec.js index 3a5641b3939b..03647b5f9b03 100644 --- a/Specs/Scene/QuadtreePrimitiveSpec.js +++ b/Specs/Scene/QuadtreePrimitiveSpec.js @@ -9,8 +9,8 @@ defineSuite([ 'Core/Visibility', 'Scene/QuadtreeTile', 'Scene/QuadtreeTileLoadState', - 'Specs/pollToPromise', - 'Specs/createScene' + 'Specs/createScene', + 'Specs/pollToPromise' ], function( QuadtreePrimitive, Cartesian3, @@ -21,8 +21,8 @@ defineSuite([ Visibility, QuadtreeTile, QuadtreeTileLoadState, - pollToPromise, - createScene) { + createScene, + pollToPromise) { 'use strict'; var scene; diff --git a/Specs/Scene/SceneTransformsSpec.js b/Specs/Scene/SceneTransformsSpec.js index de674888cb81..3592c301d076 100644 --- a/Specs/Scene/SceneTransformsSpec.js +++ b/Specs/Scene/SceneTransformsSpec.js @@ -1,23 +1,23 @@ /*global defineSuite*/ defineSuite([ 'Scene/SceneTransforms', - 'Scene/SceneMode', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Ellipsoid', 'Core/Math', 'Core/Rectangle', 'Scene/Camera', + 'Scene/SceneMode', 'Specs/createScene' ], function( SceneTransforms, - SceneMode, Cartesian2, Cartesian3, Ellipsoid, CesiumMath, Rectangle, Camera, + SceneMode, createScene) { 'use strict'; From 772583067ed2011897eec9ab77fa03c394e71ecd Mon Sep 17 00:00:00 2001 From: Dan Bagnell Date: Tue, 15 Nov 2016 19:25:11 -0500 Subject: [PATCH 32/49] Remove inserted whitespace because of extra commas. --- Source/Core/HeightmapTessellator.js | 3 +-- Specs/DataSources/EntityClusterSpec.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/HeightmapTessellator.js b/Source/Core/HeightmapTessellator.js index 40406b0fa194..fa222bf44dde 100644 --- a/Source/Core/HeightmapTessellator.js +++ b/Source/Core/HeightmapTessellator.js @@ -16,8 +16,7 @@ define([ './Rectangle', './TerrainEncoding', './Transforms', - './WebMercatorProjection', - + './WebMercatorProjection' ], function( AxisAlignedBoundingBox, BoundingSphere, diff --git a/Specs/DataSources/EntityClusterSpec.js b/Specs/DataSources/EntityClusterSpec.js index 21e3a2a1272a..466323b543a4 100644 --- a/Specs/DataSources/EntityClusterSpec.js +++ b/Specs/DataSources/EntityClusterSpec.js @@ -13,8 +13,7 @@ defineSuite([ 'Scene/SceneTransforms', 'Specs/createCanvas', 'Specs/createGlobe', - 'Specs/createScene', - + 'Specs/createScene' ], function( EntityCluster, Cartesian2, From 999fea8481964d71350c2e3200f6b6fdacd8bf4f Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Thu, 17 Nov 2016 19:39:15 -0500 Subject: [PATCH 33/49] chore(package): update aws-sdk to version 2.7.4 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9d26247c3b8..87caf0f7d491 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "almond": "0.3.3", - "aws-sdk": "2.7.0", + "aws-sdk": "2.7.4", "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2", From 3cf0309a377d410e44fc94c14f1419bc87e9d0f3 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 18 Nov 2016 12:30:41 -0500 Subject: [PATCH 34/49] chore(package): update request to version 2.79.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9d26247c3b8..d6b2c2ca91f5 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "karma-spec-reporter": "0.0.26", "mime": "1.3.4", "mkdirp": "0.5.1", - "request": "2.78.0", + "request": "2.79.0", "rimraf": "2.5.4", "strip-comments": "0.3.2", "yargs": "6.3.0" From 5034a2a4d5965b7a799e9d5743792857a3d7cfd9 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 18 Nov 2016 13:37:33 -0500 Subject: [PATCH 35/49] chore(package): update electron to version 1.4.7 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d6b2c2ca91f5..f8194d4969a1 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2", - "electron": "1.4.6", + "electron": "1.4.7", "event-stream": "3.3.4", "express": "4.14.0", "globby": "6.1.0", From 97012d838614ec97de17c70449b20021df909e36 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 18 Nov 2016 13:37:55 -0500 Subject: [PATCH 36/49] chore(package): update gulp-jshint to version 2.0.3 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc3b6d5ae69c..1d46905f063a 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "globby": "6.1.0", "gulp": "3.9.1", "gulp-insert": "0.5.0", - "gulp-jshint": "2.0.2", + "gulp-jshint": "2.0.3", "gulp-rename": "1.2.2", "gulp-replace": "0.5.4", "gulp-zip": "3.0.2", From 0684fdca02fd482d78fb9a141f72cc233244cf97 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Mon, 21 Nov 2016 18:35:37 -0500 Subject: [PATCH 37/49] chore(package): update aws-sdk to version 2.7.6 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc120682b606..6c6c0e004d41 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "almond": "0.3.3", - "aws-sdk": "2.7.4", + "aws-sdk": "2.7.6", "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2", From 8ba5ce179717e887a8bea1dc148ed2432f00efd3 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 28 Oct 2016 14:37:31 +0200 Subject: [PATCH 38/49] Remove unused require --- Apps/CesiumViewer/CesiumViewer.js | 2 -- Source/Core/AttributeCompression.js | 2 -- Source/Core/BoundingSphere.js | 2 -- Source/Core/CesiumTerrainProvider.js | 4 --- Source/Core/CircleGeometry.js | 2 -- Source/Core/CorridorGeometryLibrary.js | 2 -- Source/Core/DistanceDisplayCondition.js | 2 -- Source/Core/EllipsoidTangentPlane.js | 2 -- Source/Core/GeometryPipeline.js | 2 -- Source/Core/Matrix3.js | 2 -- Source/Core/PolygonGeometry.js | 2 -- Source/Core/PolygonGeometryLibrary.js | 4 --- Source/Core/PolygonPipeline.js | 6 ----- Source/Core/TaskProcessor.js | 2 -- Source/Core/TerrainEncoding.js | 2 -- Source/Core/TranslationRotationScale.js | 2 -- Source/Core/TrustedServers.js | 2 -- Source/Core/VideoSynchronizer.js | 4 --- Source/DataSources/BillboardVisualizer.js | 4 --- Source/DataSources/ColorMaterialProperty.js | 2 -- Source/DataSources/ConstantProperty.js | 4 --- Source/DataSources/CylinderGeometryUpdater.js | 2 -- Source/DataSources/DataSourceDisplay.js | 2 -- Source/DataSources/EntityCluster.js | 22 ++-------------- Source/DataSources/EntityView.js | 4 --- Source/DataSources/KmlDataSource.js | 2 -- Source/DataSources/LabelVisualizer.js | 2 -- Source/DataSources/PointVisualizer.js | 4 --- .../PolylineArrowMaterialProperty.js | 2 -- Source/DataSources/PolylineGeometryUpdater.js | 2 -- Source/DataSources/Property.js | 6 ++--- .../StaticGroundGeometryColorBatch.js | 2 -- .../VelocityOrientationProperty.js | 2 -- Source/Renderer/ComputeCommand.js | 2 -- Source/Renderer/ComputeEngine.js | 12 --------- Source/Renderer/Context.js | 8 ------ Source/Renderer/CubeMap.js | 6 ++--- Source/Renderer/PassState.js | 5 +--- Source/Renderer/RenderState.js | 2 -- Source/Renderer/Texture.js | 2 -- Source/Renderer/createUniformArray.js | 2 -- .../Scene/ArcGisMapServerImageryProvider.js | 2 -- Source/Scene/DebugCameraPrimitive.js | 2 -- .../DeviceOrientationCameraController.js | 2 -- Source/Scene/GetFeatureInfoFormat.js | 2 -- Source/Scene/Globe.js | 2 -- Source/Scene/GlobeDepth.js | 2 -- Source/Scene/GlobeSurfaceTile.js | 6 ----- Source/Scene/GlobeSurfaceTileProvider.js | 6 ----- Source/Scene/GroundPrimitive.js | 8 ------ Source/Scene/ImageryLayer.js | 16 ------------ Source/Scene/LabelCollection.js | 2 -- Source/Scene/Model.js | 2 -- Source/Scene/ModelNode.js | 2 -- Source/Scene/OrthographicFrustum.js | 2 -- Source/Scene/PerformanceDisplay.js | 2 -- Source/Scene/PerspectiveOffCenterFrustum.js | 4 --- Source/Scene/PickDepth.js | 8 ++---- Source/Scene/PointAppearance.js | 2 -- Source/Scene/PointPrimitiveCollection.js | 4 --- Source/Scene/Primitive.js | 6 ----- Source/Scene/PrimitivePipeline.js | 4 --- Source/Scene/SceneTransitioner.js | 4 --- Source/Scene/ShadowMap.js | 4 --- Source/Scene/ShadowMapShader.js | 2 -- Source/Scene/Sun.js | 8 ------ Source/Scene/TextureAtlas.js | 2 -- Source/Scene/TileTerrain.js | 2 -- Source/Scene/UrlTemplateImageryProvider.js | 4 --- .../createTileMapServiceImageryProvider.js | 6 ----- .../CesiumInspectorViewModel.js | 2 -- Source/Widgets/Geocoder/GeocoderViewModel.js | 2 -- .../Widgets/HomeButton/HomeButtonViewModel.js | 12 --------- Source/Widgets/Viewer/Viewer.js | 4 --- Source/Widgets/Viewer/viewerDragDropMixin.js | 2 -- Source/Workers/createGeometry.js | 2 -- .../createVerticesFromQuantizedTerrainMesh.js | 2 -- Specs/Core/AxisAlignedBoundingBoxSpec.js | 2 -- Specs/Core/BoundingSphereSpec.js | 2 -- Specs/Core/CesiumTerrainProviderSpec.js | 4 --- Specs/Core/ClockSpec.js | 6 ++--- Specs/Core/DistanceDisplayConditionSpec.js | 8 ++---- Specs/Core/EllipsoidTangentPlaneSpec.js | 10 ++----- Specs/Core/HeightmapTerrainDataSpec.js | 8 ++---- Specs/Core/OrientedBoundingBoxSpec.js | 4 --- Specs/Core/PinBuilderSpec.js | 2 -- Specs/Core/PolylineGeometrySpec.js | 2 -- Specs/Core/QuantizedMeshTerrainDataSpec.js | 2 -- Specs/Core/TerrainEncodingSpec.js | 2 -- Specs/Core/TransformsSpec.js | 12 ++------- Specs/Core/TranslationRotationScaleSpec.js | 2 -- Specs/Core/VRTheWorldTerrainProviderSpec.js | 2 -- Specs/Core/loadImageFromTypedArraySpec.js | 8 ++---- Specs/Core/loadImageSpec.js | 2 -- Specs/Core/loadImageViaBlobSpec.js | 2 -- Specs/Core/loadJsonpSpec.js | 6 ++--- Specs/Core/loadWithXhrSpec.js | 6 ++--- Specs/Core/sampleTerrainSpec.js | 6 ++--- Specs/DataSources/BillboardVisualizerSpec.js | 2 -- Specs/DataSources/CallbackPropertySpec.js | 2 -- Specs/DataSources/CzmlDataSourceSpec.js | 4 --- Specs/DataSources/LabelVisualizerSpec.js | 2 -- .../PolylineGeometryUpdaterSpec.js | 2 -- .../PolylineVolumeGeometryUpdaterSpec.js | 2 -- Specs/Renderer/SamplerSpec.js | 2 -- Specs/Renderer/ShaderProgramSpec.js | 14 ---------- Specs/Renderer/loadCubeMapSpec.js | 8 ++---- .../ArcGisMapServerImageryProviderSpec.js | 2 -- Specs/Scene/BillboardCollectionSpec.js | 10 ------- Specs/Scene/CameraEventAggregatorSpec.js | 2 -- Specs/Scene/CameraFlightPathSpec.js | 4 --- Specs/Scene/DebugAppearanceSpec.js | 2 -- Specs/Scene/DebugModelMatrixPrimitiveSpec.js | 2 -- .../DiscardMissingTileImagePolicySpec.js | 2 -- Specs/Scene/EllipsoidPrimitiveSpec.js | 2 -- Specs/Scene/EllipsoidSurfaceAppearanceSpec.js | 2 -- Specs/Scene/GeometryRenderingSpec.js | 6 ----- Specs/Scene/GlobeSpec.js | 4 --- Specs/Scene/GlobeSurfaceTileProviderSpec.js | 4 --- Specs/Scene/GoogleEarthImageryProviderSpec.js | 2 -- Specs/Scene/GroundPrimitiveSpec.js | 24 ----------------- Specs/Scene/ImageryLayerSpec.js | 2 -- Specs/Scene/LabelCollectionSpec.js | 6 ----- Specs/Scene/MaterialAppearanceSpec.js | 2 -- Specs/Scene/MaterialSpec.js | 12 --------- Specs/Scene/ModelSpec.js | 2 -- Specs/Scene/MoonSpec.js | 4 --- Specs/Scene/PerInstanceColorAppearanceSpec.js | 2 -- Specs/Scene/PickSpec.js | 8 ------ Specs/Scene/PointPrimitiveCollectionSpec.js | 2 -- Specs/Scene/PrimitiveCollectionSpec.js | 6 ----- Specs/Scene/PrimitiveCullingSpec.js | 26 ------------------- Specs/Scene/PrimitiveSpec.js | 4 --- .../Scene/ScreenSpaceCameraControllerSpec.js | 2 -- Specs/Scene/SkyAtmosphereSpec.js | 2 -- Specs/Scene/SkyBoxSpec.js | 4 --- Specs/Scene/SunSpec.js | 6 ----- .../TileCoordinatesImageryProviderSpec.js | 2 -- Specs/Scene/ViewportQuadSpec.js | 2 -- .../Scene/WebMapServiceImageryProviderSpec.js | 8 ++---- .../WebMapTileServiceImageryProviderSpec.js | 2 -- .../createOpenStreetMapImageryProviderSpec.js | 2 -- .../CesiumInspectorViewModelSpec.js | 2 -- Specs/Widgets/InfoBox/InfoBoxViewModelSpec.js | 6 ++--- Specs/Widgets/SvgPathBindingHandlerSpec.js | 2 -- Specs/Widgets/Viewer/ViewerSpec.js | 2 -- Specs/createPackableArraySpecs.js | 6 ++--- Specs/createScene.js | 2 -- Specs/render.js | 2 -- 149 files changed, 35 insertions(+), 588 deletions(-) diff --git a/Apps/CesiumViewer/CesiumViewer.js b/Apps/CesiumViewer/CesiumViewer.js index 1f3880728728..9d0cbfeb9ff5 100644 --- a/Apps/CesiumViewer/CesiumViewer.js +++ b/Apps/CesiumViewer/CesiumViewer.js @@ -3,7 +3,6 @@ define([ 'Cesium/Core/Cartesian3', 'Cesium/Core/defined', 'Cesium/Core/formatError', - 'Cesium/Core/getFilenameFromUri', 'Cesium/Core/Math', 'Cesium/Core/objectToQuery', 'Cesium/Core/queryToObject', @@ -19,7 +18,6 @@ define([ Cartesian3, defined, formatError, - getFilenameFromUri, CesiumMath, objectToQuery, queryToObject, diff --git a/Source/Core/AttributeCompression.js b/Source/Core/AttributeCompression.js index d5e6973d29cf..0d943901ceec 100644 --- a/Source/Core/AttributeCompression.js +++ b/Source/Core/AttributeCompression.js @@ -2,14 +2,12 @@ define([ './Cartesian2', './Cartesian3', - './defaultValue', './defined', './DeveloperError', './Math' ], function( Cartesian2, Cartesian3, - defaultValue, defined, DeveloperError, CesiumMath) { diff --git a/Source/Core/BoundingSphere.js b/Source/Core/BoundingSphere.js index 78f7ddf1abba..5c729fd38142 100644 --- a/Source/Core/BoundingSphere.js +++ b/Source/Core/BoundingSphere.js @@ -11,7 +11,6 @@ define([ './Interval', './Matrix3', './Matrix4', - './Plane', './Rectangle' ], function( Cartesian3, @@ -25,7 +24,6 @@ define([ Interval, Matrix3, Matrix4, - Plane, Rectangle) { 'use strict'; diff --git a/Source/Core/CesiumTerrainProvider.js b/Source/Core/CesiumTerrainProvider.js index 61955ae9bd01..ef6f4e3e9f9b 100644 --- a/Source/Core/CesiumTerrainProvider.js +++ b/Source/Core/CesiumTerrainProvider.js @@ -17,10 +17,8 @@ define([ './loadArrayBuffer', './loadJson', './Math', - './Matrix3', './OrientedBoundingBox', './QuantizedMeshTerrainData', - './RuntimeError', './TerrainProvider', './throttleRequestByServer', './TileProviderError' @@ -42,10 +40,8 @@ define([ loadArrayBuffer, loadJson, CesiumMath, - Matrix3, OrientedBoundingBox, QuantizedMeshTerrainData, - RuntimeError, TerrainProvider, throttleRequestByServer, TileProviderError) { diff --git a/Source/Core/CircleGeometry.js b/Source/Core/CircleGeometry.js index bd225683229b..8aa557d4c33b 100644 --- a/Source/Core/CircleGeometry.js +++ b/Source/Core/CircleGeometry.js @@ -7,7 +7,6 @@ define([ './DeveloperError', './EllipseGeometry', './Ellipsoid', - './Math', './VertexFormat' ], function( Cartesian3, @@ -17,7 +16,6 @@ define([ DeveloperError, EllipseGeometry, Ellipsoid, - CesiumMath, VertexFormat) { 'use strict'; diff --git a/Source/Core/CorridorGeometryLibrary.js b/Source/Core/CorridorGeometryLibrary.js index 5631968ee32b..7ffd2953ded6 100644 --- a/Source/Core/CorridorGeometryLibrary.js +++ b/Source/Core/CorridorGeometryLibrary.js @@ -3,7 +3,6 @@ define([ './Cartesian3', './CornerType', './defined', - './isArray', './Math', './Matrix3', './PolylinePipeline', @@ -13,7 +12,6 @@ define([ Cartesian3, CornerType, defined, - isArray, CesiumMath, Matrix3, PolylinePipeline, diff --git a/Source/Core/DistanceDisplayCondition.js b/Source/Core/DistanceDisplayCondition.js index 87ae8d9b8204..6c0a1df9e36c 100644 --- a/Source/Core/DistanceDisplayCondition.js +++ b/Source/Core/DistanceDisplayCondition.js @@ -1,11 +1,9 @@ /*global define*/ define([ - './Cartesian3', './defaultValue', './defined', './defineProperties' ], function( - Cartesian3, defaultValue, defined, defineProperties) { diff --git a/Source/Core/EllipsoidTangentPlane.js b/Source/Core/EllipsoidTangentPlane.js index 1533ca94f703..c2c178566c18 100644 --- a/Source/Core/EllipsoidTangentPlane.js +++ b/Source/Core/EllipsoidTangentPlane.js @@ -10,7 +10,6 @@ define([ './DeveloperError', './Ellipsoid', './IntersectionTests', - './Matrix3', './Matrix4', './Plane', './Ray', @@ -26,7 +25,6 @@ define([ DeveloperError, Ellipsoid, IntersectionTests, - Matrix3, Matrix4, Plane, Ray, diff --git a/Source/Core/GeometryPipeline.js b/Source/Core/GeometryPipeline.js index 6252e4d763ed..c27a9dda80cd 100644 --- a/Source/Core/GeometryPipeline.js +++ b/Source/Core/GeometryPipeline.js @@ -15,7 +15,6 @@ define([ './GeographicProjection', './Geometry', './GeometryAttribute', - './GeometryInstance', './GeometryType', './IndexDatatype', './Intersect', @@ -42,7 +41,6 @@ define([ GeographicProjection, Geometry, GeometryAttribute, - GeometryInstance, GeometryType, IndexDatatype, Intersect, diff --git a/Source/Core/Matrix3.js b/Source/Core/Matrix3.js index e896df174256..2faff37a7283 100644 --- a/Source/Core/Matrix3.js +++ b/Source/Core/Matrix3.js @@ -6,7 +6,6 @@ define([ './defineProperties', './DeveloperError', './freezeObject', - './HeadingPitchRoll', './Math' ], function( Cartesian3, @@ -15,7 +14,6 @@ define([ defineProperties, DeveloperError, freezeObject, - HeadingPitchRoll, CesiumMath) { 'use strict'; diff --git a/Source/Core/PolygonGeometry.js b/Source/Core/PolygonGeometry.js index 0b2d7dbca180..f8276fa5880b 100644 --- a/Source/Core/PolygonGeometry.js +++ b/Source/Core/PolygonGeometry.js @@ -14,7 +14,6 @@ define([ './EllipsoidTangentPlane', './Geometry', './GeometryAttribute', - './GeometryAttributes', './GeometryInstance', './GeometryPipeline', './IndexDatatype', @@ -41,7 +40,6 @@ define([ EllipsoidTangentPlane, Geometry, GeometryAttribute, - GeometryAttributes, GeometryInstance, GeometryPipeline, IndexDatatype, diff --git a/Source/Core/PolygonGeometryLibrary.js b/Source/Core/PolygonGeometryLibrary.js index 1a08ae5e9955..f36e24764715 100644 --- a/Source/Core/PolygonGeometryLibrary.js +++ b/Source/Core/PolygonGeometryLibrary.js @@ -1,13 +1,11 @@ /*global define*/ define([ './arrayRemoveDuplicates', - './Cartesian2', './Cartesian3', './ComponentDatatype', './defaultValue', './defined', './Ellipsoid', - './EllipsoidTangentPlane', './Geometry', './GeometryAttribute', './GeometryAttributes', @@ -20,13 +18,11 @@ define([ './WindingOrder' ], function( arrayRemoveDuplicates, - Cartesian2, Cartesian3, ComponentDatatype, defaultValue, defined, Ellipsoid, - EllipsoidTangentPlane, Geometry, GeometryAttribute, GeometryAttributes, diff --git a/Source/Core/PolygonPipeline.js b/Source/Core/PolygonPipeline.js index 3f3bb509e9dc..6ed1a3e0a33b 100644 --- a/Source/Core/PolygonPipeline.js +++ b/Source/Core/PolygonPipeline.js @@ -8,13 +8,10 @@ define([ './defined', './DeveloperError', './Ellipsoid', - './EllipsoidTangentPlane', './Geometry', './GeometryAttribute', './Math', - './pointInsideTriangle', './PrimitiveType', - './Queue', './WindingOrder' ], function( earcut, @@ -25,13 +22,10 @@ define([ defined, DeveloperError, Ellipsoid, - EllipsoidTangentPlane, Geometry, GeometryAttribute, CesiumMath, - pointInsideTriangle, PrimitiveType, - Queue, WindingOrder) { 'use strict'; diff --git a/Source/Core/TaskProcessor.js b/Source/Core/TaskProcessor.js index 2beefbcac620..0a7edeb4220c 100644 --- a/Source/Core/TaskProcessor.js +++ b/Source/Core/TaskProcessor.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../ThirdParty/Uri', '../ThirdParty/when', './buildModuleUrl', './defaultValue', @@ -12,7 +11,6 @@ define([ './RuntimeError', 'require' ], function( - Uri, when, buildModuleUrl, defaultValue, diff --git a/Source/Core/TerrainEncoding.js b/Source/Core/TerrainEncoding.js index 9241995d44e0..9b91b0f1c9e9 100644 --- a/Source/Core/TerrainEncoding.js +++ b/Source/Core/TerrainEncoding.js @@ -7,7 +7,6 @@ define([ './defaultValue', './defined', './Math', - './Matrix3', './Matrix4', './TerrainQuantization' ], function( @@ -18,7 +17,6 @@ define([ defaultValue, defined, CesiumMath, - Matrix3, Matrix4, TerrainQuantization) { 'use strict'; diff --git a/Source/Core/TranslationRotationScale.js b/Source/Core/TranslationRotationScale.js index bfbaff72d63a..dea95c42570e 100644 --- a/Source/Core/TranslationRotationScale.js +++ b/Source/Core/TranslationRotationScale.js @@ -3,13 +3,11 @@ define([ './Cartesian3', './defaultValue', './defined', - './Matrix4', './Quaternion' ], function( Cartesian3, defaultValue, defined, - Matrix4, Quaternion) { 'use strict'; diff --git a/Source/Core/TrustedServers.js b/Source/Core/TrustedServers.js index fcd08d380188..027903d86a2b 100644 --- a/Source/Core/TrustedServers.js +++ b/Source/Core/TrustedServers.js @@ -2,12 +2,10 @@ define([ '../ThirdParty/Uri', './defined', - './defineProperties', './DeveloperError' ], function( Uri, defined, - defineProperties, DeveloperError) { 'use strict'; diff --git a/Source/Core/VideoSynchronizer.js b/Source/Core/VideoSynchronizer.js index 764753983f14..0f16ff61dbc6 100644 --- a/Source/Core/VideoSynchronizer.js +++ b/Source/Core/VideoSynchronizer.js @@ -4,8 +4,6 @@ define([ './defined', './defineProperties', './destroyObject', - './DeveloperError', - './Event', './Iso8601', './JulianDate' ], function( @@ -13,8 +11,6 @@ define([ defined, defineProperties, destroyObject, - DeveloperError, - Event, Iso8601, JulianDate) { 'use strict'; diff --git a/Source/DataSources/BillboardVisualizer.js b/Source/DataSources/BillboardVisualizer.js index fdd03d1c4f08..b1595fd5dca5 100644 --- a/Source/DataSources/BillboardVisualizer.js +++ b/Source/DataSources/BillboardVisualizer.js @@ -5,7 +5,6 @@ define([ '../Core/Cartesian2', '../Core/Cartesian3', '../Core/Color', - '../Core/defaultValue', '../Core/defined', '../Core/destroyObject', '../Core/DeveloperError', @@ -15,7 +14,6 @@ define([ '../Scene/HorizontalOrigin', '../Scene/VerticalOrigin', './BoundingSphereState', - './EntityCluster', './Property' ], function( AssociativeArray, @@ -23,7 +21,6 @@ define([ Cartesian2, Cartesian3, Color, - defaultValue, defined, destroyObject, DeveloperError, @@ -33,7 +30,6 @@ define([ HorizontalOrigin, VerticalOrigin, BoundingSphereState, - EntityCluster, Property) { 'use strict'; diff --git a/Source/DataSources/ColorMaterialProperty.js b/Source/DataSources/ColorMaterialProperty.js index 2f3103a90687..dd034ef0ad6f 100644 --- a/Source/DataSources/ColorMaterialProperty.js +++ b/Source/DataSources/ColorMaterialProperty.js @@ -4,7 +4,6 @@ define([ '../Core/defined', '../Core/defineProperties', '../Core/Event', - './ConstantProperty', './createPropertyDescriptor', './Property' ], function( @@ -12,7 +11,6 @@ define([ defined, defineProperties, Event, - ConstantProperty, createPropertyDescriptor, Property) { 'use strict'; diff --git a/Source/DataSources/ConstantProperty.js b/Source/DataSources/ConstantProperty.js index 905a46007dde..39dd1257fbd0 100644 --- a/Source/DataSources/ConstantProperty.js +++ b/Source/DataSources/ConstantProperty.js @@ -1,15 +1,11 @@ /*global define*/ define([ - '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', - '../Core/DeveloperError', '../Core/Event' ], function( - defaultValue, defined, defineProperties, - DeveloperError, Event) { 'use strict'; diff --git a/Source/DataSources/CylinderGeometryUpdater.js b/Source/DataSources/CylinderGeometryUpdater.js index 6556de373db0..669606b4c4bb 100644 --- a/Source/DataSources/CylinderGeometryUpdater.js +++ b/Source/DataSources/CylinderGeometryUpdater.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../Core/Cartesian3', '../Core/Color', '../Core/ColorGeometryInstanceAttribute', '../Core/CylinderGeometry', @@ -26,7 +25,6 @@ define([ './MaterialProperty', './Property' ], function( - Cartesian3, Color, ColorGeometryInstanceAttribute, CylinderGeometry, diff --git a/Source/DataSources/DataSourceDisplay.js b/Source/DataSources/DataSourceDisplay.js index edc756aa425b..3ca8cef027f0 100644 --- a/Source/DataSources/DataSourceDisplay.js +++ b/Source/DataSources/DataSourceDisplay.js @@ -16,7 +16,6 @@ define([ './CylinderGeometryUpdater', './EllipseGeometryUpdater', './EllipsoidGeometryUpdater', - './EntityCluster', './GeometryVisualizer', './LabelVisualizer', './ModelVisualizer', @@ -44,7 +43,6 @@ define([ CylinderGeometryUpdater, EllipseGeometryUpdater, EllipsoidGeometryUpdater, - EntityCluster, GeometryVisualizer, LabelVisualizer, ModelVisualizer, diff --git a/Source/DataSources/EntityCluster.js b/Source/DataSources/EntityCluster.js index 9db3ae94b549..e3d4641b965d 100644 --- a/Source/DataSources/EntityCluster.js +++ b/Source/DataSources/EntityCluster.js @@ -3,54 +3,36 @@ define([ '../Core/BoundingRectangle', '../Core/Cartesian2', '../Core/Cartesian3', - '../Core/Color', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', - '../Core/destroyObject', '../Core/EllipsoidalOccluder', '../Core/Event', '../Core/Matrix4', '../Scene/Billboard', '../Scene/BillboardCollection', - '../Scene/HeightReference', - '../Scene/HorizontalOrigin', '../Scene/Label', '../Scene/LabelCollection', - '../Scene/LabelStyle', '../Scene/PointPrimitive', '../Scene/PointPrimitiveCollection', - '../Scene/SceneTransforms', - '../Scene/VerticalOrigin', - '../ThirdParty/kdbush', - './Entity', - './Property' + '../ThirdParty/kdbush' ], function( BoundingRectangle, Cartesian2, Cartesian3, - Color, defaultValue, defined, defineProperties, - destroyObject, EllipsoidalOccluder, Event, Matrix4, Billboard, BillboardCollection, - HeightReference, - HorizontalOrigin, Label, LabelCollection, - LabelStyle, PointPrimitive, PointPrimitiveCollection, - SceneTransforms, - VerticalOrigin, - kdbush, - Entity, - Property) { + kdbush) { 'use strict'; /** diff --git a/Source/DataSources/EntityView.js b/Source/DataSources/EntityView.js index f8f07f593871..e6653e3fa8d9 100644 --- a/Source/DataSources/EntityView.js +++ b/Source/DataSources/EntityView.js @@ -1,8 +1,6 @@ /*global define*/ define([ - '../Core/BoundingSphere', '../Core/Cartesian3', - '../Core/Cartesian4', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', @@ -16,9 +14,7 @@ define([ '../Core/Transforms', '../Scene/SceneMode' ], function( - BoundingSphere, Cartesian3, - Cartesian4, defaultValue, defined, defineProperties, diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index 8f9342107d32..0df12a27e333 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -41,7 +41,6 @@ define([ '../ThirdParty/zip', './BillboardGraphics', './CompositePositionProperty', - './ConstantPositionProperty', './CorridorGraphics', './DataSource', './DataSourceClock', @@ -101,7 +100,6 @@ define([ zip, BillboardGraphics, CompositePositionProperty, - ConstantPositionProperty, CorridorGraphics, DataSource, DataSourceClock, diff --git a/Source/DataSources/LabelVisualizer.js b/Source/DataSources/LabelVisualizer.js index 0042865047ca..7689eeff192b 100644 --- a/Source/DataSources/LabelVisualizer.js +++ b/Source/DataSources/LabelVisualizer.js @@ -15,7 +15,6 @@ define([ '../Scene/LabelStyle', '../Scene/VerticalOrigin', './BoundingSphereState', - './EntityCluster', './Property' ], function( AssociativeArray, @@ -33,7 +32,6 @@ define([ LabelStyle, VerticalOrigin, BoundingSphereState, - EntityCluster, Property) { 'use strict'; diff --git a/Source/DataSources/PointVisualizer.js b/Source/DataSources/PointVisualizer.js index 72cd7a7e3a90..f287439389dc 100644 --- a/Source/DataSources/PointVisualizer.js +++ b/Source/DataSources/PointVisualizer.js @@ -3,7 +3,6 @@ define([ '../Core/AssociativeArray', '../Core/Cartesian3', '../Core/Color', - '../Core/defaultValue', '../Core/defined', '../Core/destroyObject', '../Core/DeveloperError', @@ -11,13 +10,11 @@ define([ '../Core/NearFarScalar', '../Scene/HeightReference', './BoundingSphereState', - './EntityCluster', './Property' ], function( AssociativeArray, Cartesian3, Color, - defaultValue, defined, destroyObject, DeveloperError, @@ -25,7 +22,6 @@ define([ NearFarScalar, HeightReference, BoundingSphereState, - EntityCluster, Property) { 'use strict'; diff --git a/Source/DataSources/PolylineArrowMaterialProperty.js b/Source/DataSources/PolylineArrowMaterialProperty.js index 53c31faae493..5dba53c76041 100644 --- a/Source/DataSources/PolylineArrowMaterialProperty.js +++ b/Source/DataSources/PolylineArrowMaterialProperty.js @@ -4,7 +4,6 @@ define([ '../Core/defined', '../Core/defineProperties', '../Core/Event', - './ConstantProperty', './createPropertyDescriptor', './Property' ], function( @@ -12,7 +11,6 @@ define([ defined, defineProperties, Event, - ConstantProperty, createPropertyDescriptor, Property) { 'use strict'; diff --git a/Source/DataSources/PolylineGeometryUpdater.js b/Source/DataSources/PolylineGeometryUpdater.js index f0b600e34dc2..f4714c250878 100644 --- a/Source/DataSources/PolylineGeometryUpdater.js +++ b/Source/DataSources/PolylineGeometryUpdater.js @@ -10,7 +10,6 @@ define([ '../Core/DeveloperError', '../Core/DistanceDisplayCondition', '../Core/DistanceDisplayConditionGeometryInstanceAttribute', - '../Core/Ellipsoid', '../Core/Event', '../Core/GeometryInstance', '../Core/Iso8601', @@ -37,7 +36,6 @@ define([ DeveloperError, DistanceDisplayCondition, DistanceDisplayConditionGeometryInstanceAttribute, - Ellipsoid, Event, GeometryInstance, Iso8601, diff --git a/Source/DataSources/Property.js b/Source/DataSources/Property.js index 5183f79d46b8..3f201ddcda0a 100644 --- a/Source/DataSources/Property.js +++ b/Source/DataSources/Property.js @@ -3,14 +3,12 @@ define([ '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', - '../Core/DeveloperError', - '../Core/Iso8601' + '../Core/DeveloperError' ], function( defaultValue, defined, defineProperties, - DeveloperError, - Iso8601) { + DeveloperError) { 'use strict'; /** diff --git a/Source/DataSources/StaticGroundGeometryColorBatch.js b/Source/DataSources/StaticGroundGeometryColorBatch.js index aa19dc270bba..bc0bda478422 100644 --- a/Source/DataSources/StaticGroundGeometryColorBatch.js +++ b/Source/DataSources/StaticGroundGeometryColorBatch.js @@ -2,7 +2,6 @@ define([ '../Core/AssociativeArray', '../Core/Color', - '../Core/ColorGeometryInstanceAttribute', '../Core/defined', '../Core/DistanceDisplayCondition', '../Core/DistanceDisplayConditionGeometryInstanceAttribute', @@ -13,7 +12,6 @@ define([ ], function( AssociativeArray, Color, - ColorGeometryInstanceAttribute, defined, DistanceDisplayCondition, DistanceDisplayConditionGeometryInstanceAttribute, diff --git a/Source/DataSources/VelocityOrientationProperty.js b/Source/DataSources/VelocityOrientationProperty.js index 08022a1b6277..5a23864f1b61 100644 --- a/Source/DataSources/VelocityOrientationProperty.js +++ b/Source/DataSources/VelocityOrientationProperty.js @@ -6,7 +6,6 @@ define([ '../Core/defineProperties', '../Core/Ellipsoid', '../Core/Event', - '../Core/JulianDate', '../Core/Matrix3', '../Core/Quaternion', '../Core/Transforms', @@ -19,7 +18,6 @@ define([ defineProperties, Ellipsoid, Event, - JulianDate, Matrix3, Quaternion, Transforms, diff --git a/Source/Renderer/ComputeCommand.js b/Source/Renderer/ComputeCommand.js index 0c7f29085be8..2e7678276f76 100644 --- a/Source/Renderer/ComputeCommand.js +++ b/Source/Renderer/ComputeCommand.js @@ -1,11 +1,9 @@ /*global define*/ define([ '../Core/defaultValue', - '../Core/PrimitiveType', '../Scene/Pass' ], function( defaultValue, - PrimitiveType, Pass) { 'use strict'; diff --git a/Source/Renderer/ComputeEngine.js b/Source/Renderer/ComputeEngine.js index 0a04d4a176a3..13235334a893 100644 --- a/Source/Renderer/ComputeEngine.js +++ b/Source/Renderer/ComputeEngine.js @@ -2,17 +2,11 @@ define([ '../Core/BoundingRectangle', '../Core/Color', - '../Core/ComponentDatatype', - '../Core/defaultValue', '../Core/defined', - '../Core/defineProperties', '../Core/destroyObject', '../Core/DeveloperError', - '../Core/Geometry', - '../Core/GeometryAttribute', '../Core/PrimitiveType', '../Shaders/ViewportQuadVS', - './BufferUsage', './ClearCommand', './DrawCommand', './Framebuffer', @@ -21,17 +15,11 @@ define([ ], function( BoundingRectangle, Color, - ComponentDatatype, - defaultValue, defined, - defineProperties, destroyObject, DeveloperError, - Geometry, - GeometryAttribute, PrimitiveType, ViewportQuadVS, - BufferUsage, ClearCommand, DrawCommand, Framebuffer, diff --git a/Source/Renderer/Context.js b/Source/Renderer/Context.js index 760b0d718346..ca41b53f505f 100644 --- a/Source/Renderer/Context.js +++ b/Source/Renderer/Context.js @@ -9,10 +9,8 @@ define([ '../Core/defineProperties', '../Core/destroyObject', '../Core/DeveloperError', - '../Core/FeatureDetection', '../Core/Geometry', '../Core/GeometryAttribute', - '../Core/Math', '../Core/Matrix4', '../Core/PrimitiveType', '../Core/RuntimeError', @@ -24,8 +22,6 @@ define([ './DrawCommand', './PassState', './PickFramebuffer', - './PixelDatatype', - './RenderbufferFormat', './RenderState', './ShaderCache', './ShaderProgram', @@ -43,10 +39,8 @@ define([ defineProperties, destroyObject, DeveloperError, - FeatureDetection, Geometry, GeometryAttribute, - CesiumMath, Matrix4, PrimitiveType, RuntimeError, @@ -58,8 +52,6 @@ define([ DrawCommand, PassState, PickFramebuffer, - PixelDatatype, - RenderbufferFormat, RenderState, ShaderCache, ShaderProgram, diff --git a/Source/Renderer/CubeMap.js b/Source/Renderer/CubeMap.js index 3f033e3391d8..4947d22d9e72 100644 --- a/Source/Renderer/CubeMap.js +++ b/Source/Renderer/CubeMap.js @@ -13,8 +13,7 @@ define([ './PixelDatatype', './Sampler', './TextureMagnificationFilter', - './TextureMinificationFilter', - './TextureWrap' + './TextureMinificationFilter' ], function( defaultValue, defined, @@ -29,8 +28,7 @@ define([ PixelDatatype, Sampler, TextureMagnificationFilter, - TextureMinificationFilter, - TextureWrap) { + TextureMinificationFilter) { 'use strict'; function CubeMap(options) { diff --git a/Source/Renderer/PassState.js b/Source/Renderer/PassState.js index 62d8c25c50d3..4a0e5515143a 100644 --- a/Source/Renderer/PassState.js +++ b/Source/Renderer/PassState.js @@ -1,8 +1,5 @@ /*global define*/ -define([ - '../Core/BoundingRectangle' - ], function( - BoundingRectangle) { +define([], function() { 'use strict'; /** diff --git a/Source/Renderer/RenderState.js b/Source/Renderer/RenderState.js index 523b8711e247..92aea5c35a45 100644 --- a/Source/Renderer/RenderState.js +++ b/Source/Renderer/RenderState.js @@ -5,7 +5,6 @@ define([ '../Core/defaultValue', '../Core/defined', '../Core/DeveloperError', - '../Core/RuntimeError', '../Core/WindingOrder', './ContextLimits', './WebGLConstants' @@ -15,7 +14,6 @@ define([ defaultValue, defined, DeveloperError, - RuntimeError, WindingOrder, ContextLimits, WebGLConstants) { diff --git a/Source/Renderer/Texture.js b/Source/Renderer/Texture.js index aa13b97ef5b6..bc2876a82f65 100644 --- a/Source/Renderer/Texture.js +++ b/Source/Renderer/Texture.js @@ -14,7 +14,6 @@ define([ './Sampler', './TextureMagnificationFilter', './TextureMinificationFilter', - './TextureWrap', './WebGLConstants' ], function( Cartesian2, @@ -31,7 +30,6 @@ define([ Sampler, TextureMagnificationFilter, TextureMinificationFilter, - TextureWrap, WebGLConstants) { 'use strict'; diff --git a/Source/Renderer/createUniformArray.js b/Source/Renderer/createUniformArray.js index 843aeb77060b..0a55769997ab 100644 --- a/Source/Renderer/createUniformArray.js +++ b/Source/Renderer/createUniformArray.js @@ -5,7 +5,6 @@ define([ '../Core/Cartesian4', '../Core/Color', '../Core/defined', - '../Core/defineProperties', '../Core/DeveloperError', '../Core/Matrix2', '../Core/Matrix3', @@ -17,7 +16,6 @@ define([ Cartesian4, Color, defined, - defineProperties, DeveloperError, Matrix2, Matrix3, diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index ac00c0c1d7c0..e8d4f067347e 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -9,7 +9,6 @@ define([ '../Core/defineProperties', '../Core/DeveloperError', '../Core/Event', - '../Core/GeographicProjection', '../Core/GeographicTilingScheme', '../Core/loadJson', '../Core/loadJsonp', @@ -33,7 +32,6 @@ define([ defineProperties, DeveloperError, Event, - GeographicProjection, GeographicTilingScheme, loadJson, loadJsonp, diff --git a/Source/Scene/DebugCameraPrimitive.js b/Source/Scene/DebugCameraPrimitive.js index 12df3e1ddb1b..ffcf283e6cf1 100644 --- a/Source/Scene/DebugCameraPrimitive.js +++ b/Source/Scene/DebugCameraPrimitive.js @@ -10,7 +10,6 @@ define([ '../Core/defined', '../Core/destroyObject', '../Core/DeveloperError', - '../Core/Geometry', '../Core/GeometryAttribute', '../Core/GeometryAttributes', '../Core/GeometryInstance', @@ -29,7 +28,6 @@ define([ defined, destroyObject, DeveloperError, - Geometry, GeometryAttribute, GeometryAttributes, GeometryInstance, diff --git a/Source/Scene/DeviceOrientationCameraController.js b/Source/Scene/DeviceOrientationCameraController.js index 189c125f42b9..0b026cdc0a38 100644 --- a/Source/Scene/DeviceOrientationCameraController.js +++ b/Source/Scene/DeviceOrientationCameraController.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../Core/defaultValue', '../Core/defined', '../Core/destroyObject', '../Core/DeveloperError', @@ -8,7 +7,6 @@ define([ '../Core/Matrix3', '../Core/Quaternion' ], function( - defaultValue, defined, destroyObject, DeveloperError, diff --git a/Source/Scene/GetFeatureInfoFormat.js b/Source/Scene/GetFeatureInfoFormat.js index 8c370b3ae868..c5fac1744df5 100644 --- a/Source/Scene/GetFeatureInfoFormat.js +++ b/Source/Scene/GetFeatureInfoFormat.js @@ -1,14 +1,12 @@ /*global define*/ define([ '../Core/Cartographic', - '../Core/defaultValue', '../Core/defined', '../Core/DeveloperError', '../Core/RuntimeError', './ImageryLayerFeatureInfo' ], function( Cartographic, - defaultValue, defined, DeveloperError, RuntimeError, diff --git a/Source/Scene/Globe.js b/Source/Scene/Globe.js index a3ea4f6ddd3f..ee15de74b801 100644 --- a/Source/Scene/Globe.js +++ b/Source/Scene/Globe.js @@ -12,7 +12,6 @@ define([ '../Core/Ellipsoid', '../Core/EllipsoidTerrainProvider', '../Core/Event', - '../Core/GeographicProjection', '../Core/IntersectionTests', '../Core/loadImage', '../Core/Ray', @@ -42,7 +41,6 @@ define([ Ellipsoid, EllipsoidTerrainProvider, Event, - GeographicProjection, IntersectionTests, loadImage, Ray, diff --git a/Source/Scene/GlobeDepth.js b/Source/Scene/GlobeDepth.js index e2a28db927aa..20fa390c0bdf 100644 --- a/Source/Scene/GlobeDepth.js +++ b/Source/Scene/GlobeDepth.js @@ -3,7 +3,6 @@ define([ '../Core/BoundingRectangle', '../Core/Color', '../Core/defined', - '../Core/defineProperties', '../Core/destroyObject', '../Core/PixelFormat', '../Renderer/ClearCommand', @@ -16,7 +15,6 @@ define([ BoundingRectangle, Color, defined, - defineProperties, destroyObject, PixelFormat, ClearCommand, diff --git a/Source/Scene/GlobeSurfaceTile.js b/Source/Scene/GlobeSurfaceTile.js index e88ae7e81be6..3d0a226758ac 100644 --- a/Source/Scene/GlobeSurfaceTile.js +++ b/Source/Scene/GlobeSurfaceTile.js @@ -3,13 +3,11 @@ define([ '../Core/BoundingSphere', '../Core/Cartesian3', '../Core/Cartesian4', - '../Core/Cartographic', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', '../Core/IntersectionTests', '../Core/PixelFormat', - '../Core/Rectangle', '../Renderer/PixelDatatype', '../Renderer/Sampler', '../Renderer/Texture', @@ -20,19 +18,16 @@ define([ './QuadtreeTileLoadState', './SceneMode', './TerrainState', - './TileBoundingBox', './TileTerrain' ], function( BoundingSphere, Cartesian3, Cartesian4, - Cartographic, defaultValue, defined, defineProperties, IntersectionTests, PixelFormat, - Rectangle, PixelDatatype, Sampler, Texture, @@ -43,7 +38,6 @@ define([ QuadtreeTileLoadState, SceneMode, TerrainState, - TileBoundingBox, TileTerrain) { 'use strict'; diff --git a/Source/Scene/GlobeSurfaceTileProvider.js b/Source/Scene/GlobeSurfaceTileProvider.js index ee3685490408..20f3a40ecb2f 100644 --- a/Source/Scene/GlobeSurfaceTileProvider.js +++ b/Source/Scene/GlobeSurfaceTileProvider.js @@ -13,7 +13,6 @@ define([ '../Core/destroyObject', '../Core/DeveloperError', '../Core/Event', - '../Core/FeatureDetection', '../Core/GeometryInstance', '../Core/GeometryPipeline', '../Core/IndexDatatype', @@ -38,10 +37,8 @@ define([ '../Scene/Pass', '../Scene/PerInstanceColorAppearance', '../Scene/Primitive', - '../ThirdParty/when', './GlobeSurfaceTile', './ImageryLayer', - './ImageryState', './QuadtreeTileLoadState', './SceneMode', './ShadowMode' @@ -59,7 +56,6 @@ define([ destroyObject, DeveloperError, Event, - FeatureDetection, GeometryInstance, GeometryPipeline, IndexDatatype, @@ -84,10 +80,8 @@ define([ Pass, PerInstanceColorAppearance, Primitive, - when, GlobeSurfaceTile, ImageryLayer, - ImageryState, QuadtreeTileLoadState, SceneMode, ShadowMode) { diff --git a/Source/Scene/GroundPrimitive.js b/Source/Scene/GroundPrimitive.js index 3704f14a5c6a..c35c4b1828c5 100644 --- a/Source/Scene/GroundPrimitive.js +++ b/Source/Scene/GroundPrimitive.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../Core/AssociativeArray', '../Core/BoundingSphere', '../Core/buildModuleUrl', '../Core/Cartesian2', @@ -18,10 +17,7 @@ define([ '../Core/isArray', '../Core/loadJson', '../Core/Math', - '../Core/Matrix3', - '../Core/Matrix4', '../Core/OrientedBoundingBox', - '../Core/PolygonGeometry', '../Core/Rectangle', '../Renderer/DrawCommand', '../Renderer/RenderState', @@ -39,7 +35,6 @@ define([ './StencilFunction', './StencilOperation' ], function( - AssociativeArray, BoundingSphere, buildModuleUrl, Cartesian2, @@ -57,10 +52,7 @@ define([ isArray, loadJson, CesiumMath, - Matrix3, - Matrix4, OrientedBoundingBox, - PolygonGeometry, Rectangle, DrawCommand, RenderState, diff --git a/Source/Scene/ImageryLayer.js b/Source/Scene/ImageryLayer.js index 3d0e2640286c..3a0a04d7f99e 100644 --- a/Source/Scene/ImageryLayer.js +++ b/Source/Scene/ImageryLayer.js @@ -1,10 +1,7 @@ /*global define*/ define([ - '../Core/BoundingRectangle', '../Core/Cartesian2', '../Core/Cartesian4', - '../Core/Color', - '../Core/ComponentDatatype', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', @@ -14,7 +11,6 @@ define([ '../Core/IndexDatatype', '../Core/Math', '../Core/PixelFormat', - '../Core/PrimitiveType', '../Core/Rectangle', '../Core/TerrainProvider', '../Core/TileProviderError', @@ -22,13 +18,9 @@ define([ '../Core/WebMercatorTilingScheme', '../Renderer/Buffer', '../Renderer/BufferUsage', - '../Renderer/ClearCommand', '../Renderer/ComputeCommand', '../Renderer/ContextLimits', - '../Renderer/DrawCommand', - '../Renderer/Framebuffer', '../Renderer/MipmapHint', - '../Renderer/RenderState', '../Renderer/Sampler', '../Renderer/ShaderProgram', '../Renderer/ShaderSource', @@ -44,11 +36,8 @@ define([ './ImageryState', './TileImagery' ], function( - BoundingRectangle, Cartesian2, Cartesian4, - Color, - ComponentDatatype, defaultValue, defined, defineProperties, @@ -58,7 +47,6 @@ define([ IndexDatatype, CesiumMath, PixelFormat, - PrimitiveType, Rectangle, TerrainProvider, TileProviderError, @@ -66,13 +54,9 @@ define([ WebMercatorTilingScheme, Buffer, BufferUsage, - ClearCommand, ComputeCommand, ContextLimits, - DrawCommand, - Framebuffer, MipmapHint, - RenderState, Sampler, ShaderProgram, ShaderSource, diff --git a/Source/Scene/LabelCollection.js b/Source/Scene/LabelCollection.js index bbaa96c887a8..7bcfdefc419a 100644 --- a/Source/Scene/LabelCollection.js +++ b/Source/Scene/LabelCollection.js @@ -9,7 +9,6 @@ define([ '../Core/Matrix4', '../Core/writeTextToCanvas', './BillboardCollection', - './HeightReference', './HorizontalOrigin', './Label', './LabelStyle', @@ -25,7 +24,6 @@ define([ Matrix4, writeTextToCanvas, BillboardCollection, - HeightReference, HorizontalOrigin, Label, LabelStyle, diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js index 0d70dce0f32a..697013a61d5a 100644 --- a/Source/Scene/Model.js +++ b/Source/Scene/Model.js @@ -7,7 +7,6 @@ define([ '../Core/Cartographic', '../Core/clone', '../Core/combine', - '../Core/ComponentDatatype', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', @@ -67,7 +66,6 @@ define([ Cartographic, clone, combine, - ComponentDatatype, defaultValue, defined, defineProperties, diff --git a/Source/Scene/ModelNode.js b/Source/Scene/ModelNode.js index bf377a3b26c5..0f2503564c80 100644 --- a/Source/Scene/ModelNode.js +++ b/Source/Scene/ModelNode.js @@ -1,10 +1,8 @@ /*global define*/ define([ - '../Core/defaultValue', '../Core/defineProperties', '../Core/Matrix4' ], function( - defaultValue, defineProperties, Matrix4) { 'use strict'; diff --git a/Source/Scene/OrthographicFrustum.js b/Source/Scene/OrthographicFrustum.js index 4bf7cc0264dc..9c709b191809 100644 --- a/Source/Scene/OrthographicFrustum.js +++ b/Source/Scene/OrthographicFrustum.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../Core/Cartesian2', '../Core/Cartesian3', '../Core/Cartesian4', '../Core/defined', @@ -9,7 +8,6 @@ define([ '../Core/Matrix4', './CullingVolume' ], function( - Cartesian2, Cartesian3, Cartesian4, defined, diff --git a/Source/Scene/PerformanceDisplay.js b/Source/Scene/PerformanceDisplay.js index c27a6c4e48c6..d624d002b561 100644 --- a/Source/Scene/PerformanceDisplay.js +++ b/Source/Scene/PerformanceDisplay.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../Core/Color', '../Core/defaultValue', '../Core/defined', '../Core/destroyObject', @@ -8,7 +7,6 @@ define([ '../Core/getTimestamp', '../Widgets/getElement' ], function( - Color, defaultValue, defined, destroyObject, diff --git a/Source/Scene/PerspectiveOffCenterFrustum.js b/Source/Scene/PerspectiveOffCenterFrustum.js index 32b2001c8555..fdb5322fe548 100644 --- a/Source/Scene/PerspectiveOffCenterFrustum.js +++ b/Source/Scene/PerspectiveOffCenterFrustum.js @@ -1,19 +1,15 @@ /*global define*/ define([ - '../Core/Cartesian2', '../Core/Cartesian3', '../Core/Cartesian4', - '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', '../Core/DeveloperError', '../Core/Matrix4', './CullingVolume' ], function( - Cartesian2, Cartesian3, Cartesian4, - defaultValue, defined, defineProperties, DeveloperError, diff --git a/Source/Scene/PickDepth.js b/Source/Scene/PickDepth.js index 38598d1d0fba..5e1f85e3e510 100644 --- a/Source/Scene/PickDepth.js +++ b/Source/Scene/PickDepth.js @@ -1,24 +1,20 @@ /*global define*/ define([ '../Core/defined', - '../Core/defineProperties', '../Core/destroyObject', '../Core/PixelFormat', '../Renderer/Framebuffer', '../Renderer/PixelDatatype', '../Renderer/RenderState', - '../Renderer/Texture', - '../Shaders/PostProcessFilters/PassThrough' + '../Renderer/Texture' ], function( defined, - defineProperties, destroyObject, PixelFormat, Framebuffer, PixelDatatype, RenderState, - Texture, - PassThrough) { + Texture) { 'use strict'; /** diff --git a/Source/Scene/PointAppearance.js b/Source/Scene/PointAppearance.js index a8e88aac6e2d..ee481d512c1c 100644 --- a/Source/Scene/PointAppearance.js +++ b/Source/Scene/PointAppearance.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../Core/clone', '../Core/Color', '../Core/combine', '../Core/defaultValue', @@ -11,7 +10,6 @@ define([ '../Shaders/Appearances/PointAppearanceVS', './Appearance' ], function( - clone, Color, combine, defaultValue, diff --git a/Source/Scene/PointPrimitiveCollection.js b/Source/Scene/PointPrimitiveCollection.js index 1d4a241b7dc4..988d7fb3f9f7 100644 --- a/Source/Scene/PointPrimitiveCollection.js +++ b/Source/Scene/PointPrimitiveCollection.js @@ -1,8 +1,6 @@ /*global define*/ define([ '../Core/BoundingSphere', - '../Core/Cartesian2', - '../Core/Cartesian3', '../Core/Color', '../Core/ComponentDatatype', '../Core/defaultValue', @@ -29,8 +27,6 @@ define([ './SceneMode' ], function( BoundingSphere, - Cartesian2, - Cartesian3, Color, ComponentDatatype, defaultValue, diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index ad03055caeec..51205cf09503 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -19,14 +19,11 @@ define([ '../Core/Geometry', '../Core/GeometryAttribute', '../Core/GeometryAttributes', - '../Core/GeometryInstance', - '../Core/GeometryInstanceAttribute', '../Core/isArray', '../Core/Matrix4', '../Core/RuntimeError', '../Core/subdivideArray', '../Core/TaskProcessor', - '../Renderer/Buffer', '../Renderer/BufferUsage', '../Renderer/ContextLimits', '../Renderer/DrawCommand', @@ -62,14 +59,11 @@ define([ Geometry, GeometryAttribute, GeometryAttributes, - GeometryInstance, - GeometryInstanceAttribute, isArray, Matrix4, RuntimeError, subdivideArray, TaskProcessor, - Buffer, BufferUsage, ContextLimits, DrawCommand, diff --git a/Source/Scene/PrimitivePipeline.js b/Source/Scene/PrimitivePipeline.js index aa50aab5f3db..dfffa094a7f5 100644 --- a/Source/Scene/PrimitivePipeline.js +++ b/Source/Scene/PrimitivePipeline.js @@ -1,9 +1,7 @@ /*global define*/ define([ '../Core/BoundingSphere', - '../Core/Color', '../Core/ComponentDatatype', - '../Core/defaultValue', '../Core/defined', '../Core/DeveloperError', '../Core/Ellipsoid', @@ -18,9 +16,7 @@ define([ '../Core/WebMercatorProjection' ], function( BoundingSphere, - Color, ComponentDatatype, - defaultValue, defined, DeveloperError, Ellipsoid, diff --git a/Source/Scene/SceneTransitioner.js b/Source/Scene/SceneTransitioner.js index f625f2f0e368..59ccefbd81bb 100644 --- a/Source/Scene/SceneTransitioner.js +++ b/Source/Scene/SceneTransitioner.js @@ -2,12 +2,10 @@ define([ '../Core/Cartesian3', '../Core/Cartographic', - '../Core/defaultValue', '../Core/defined', '../Core/destroyObject', '../Core/DeveloperError', '../Core/EasingFunction', - '../Core/Ellipsoid', '../Core/Math', '../Core/Matrix4', '../Core/Ray', @@ -21,12 +19,10 @@ define([ ], function( Cartesian3, Cartographic, - defaultValue, defined, destroyObject, DeveloperError, EasingFunction, - Ellipsoid, CesiumMath, Matrix4, Ray, diff --git a/Source/Scene/ShadowMap.js b/Source/Scene/ShadowMap.js index 85fa22cbcf09..e9f35afb74cb 100644 --- a/Source/Scene/ShadowMap.js +++ b/Source/Scene/ShadowMap.js @@ -22,7 +22,6 @@ define([ '../Core/Math', '../Core/Matrix4', '../Core/PixelFormat', - '../Core/PrimitiveType', '../Core/Quaternion', '../Core/SphereOutlineGeometry', '../Renderer/ClearCommand', @@ -37,7 +36,6 @@ define([ '../Renderer/RenderState', '../Renderer/Sampler', '../Renderer/ShaderProgram', - '../Renderer/ShaderSource', '../Renderer/Texture', '../Renderer/TextureMagnificationFilter', '../Renderer/TextureMinificationFilter', @@ -76,7 +74,6 @@ define([ CesiumMath, Matrix4, PixelFormat, - PrimitiveType, Quaternion, SphereOutlineGeometry, ClearCommand, @@ -91,7 +88,6 @@ define([ RenderState, Sampler, ShaderProgram, - ShaderSource, Texture, TextureMagnificationFilter, TextureMinificationFilter, diff --git a/Source/Scene/ShadowMapShader.js b/Source/Scene/ShadowMapShader.js index 5214d86a8f3e..555b61b8e0ad 100644 --- a/Source/Scene/ShadowMapShader.js +++ b/Source/Scene/ShadowMapShader.js @@ -1,10 +1,8 @@ /*global define*/ define([ - '../Core/defaultValue', '../Core/defined', '../Renderer/ShaderSource' ], function( - defaultValue, defined, ShaderSource) { 'use strict'; diff --git a/Source/Scene/Sun.js b/Source/Scene/Sun.js index f1dfe1e0d18b..78d22a8b40b1 100644 --- a/Source/Scene/Sun.js +++ b/Source/Scene/Sun.js @@ -1,11 +1,9 @@ /*global define*/ define([ - '../Core/BoundingRectangle', '../Core/BoundingSphere', '../Core/Cartesian2', '../Core/Cartesian3', '../Core/Cartesian4', - '../Core/Color', '../Core/ComponentDatatype', '../Core/defined', '../Core/defineProperties', @@ -17,10 +15,8 @@ define([ '../Core/PrimitiveType', '../Renderer/Buffer', '../Renderer/BufferUsage', - '../Renderer/ClearCommand', '../Renderer/ComputeCommand', '../Renderer/DrawCommand', - '../Renderer/Framebuffer', '../Renderer/RenderState', '../Renderer/ShaderProgram', '../Renderer/Texture', @@ -32,12 +28,10 @@ define([ './SceneMode', './SceneTransforms' ], function( - BoundingRectangle, BoundingSphere, Cartesian2, Cartesian3, Cartesian4, - Color, ComponentDatatype, defined, defineProperties, @@ -49,10 +43,8 @@ define([ PrimitiveType, Buffer, BufferUsage, - ClearCommand, ComputeCommand, DrawCommand, - Framebuffer, RenderState, ShaderProgram, Texture, diff --git a/Source/Scene/TextureAtlas.js b/Source/Scene/TextureAtlas.js index adf579f2c555..427c687c7dba 100644 --- a/Source/Scene/TextureAtlas.js +++ b/Source/Scene/TextureAtlas.js @@ -12,7 +12,6 @@ define([ '../Core/PixelFormat', '../Core/RuntimeError', '../Renderer/Framebuffer', - '../Renderer/RenderState', '../Renderer/Texture', '../ThirdParty/when' ], function( @@ -28,7 +27,6 @@ define([ PixelFormat, RuntimeError, Framebuffer, - RenderState, Texture, when) { 'use strict'; diff --git a/Source/Scene/TileTerrain.js b/Source/Scene/TileTerrain.js index fa039c3a29d3..f152e32cdbb7 100644 --- a/Source/Scene/TileTerrain.js +++ b/Source/Scene/TileTerrain.js @@ -2,7 +2,6 @@ define([ '../Core/BoundingSphere', '../Core/Cartesian3', - '../Core/ComponentDatatype', '../Core/defined', '../Core/DeveloperError', '../Core/IndexDatatype', @@ -17,7 +16,6 @@ define([ ], function( BoundingSphere, Cartesian3, - ComponentDatatype, defined, DeveloperError, IndexDatatype, diff --git a/Source/Scene/UrlTemplateImageryProvider.js b/Source/Scene/UrlTemplateImageryProvider.js index f5901822eb9d..9e39944102c6 100644 --- a/Source/Scene/UrlTemplateImageryProvider.js +++ b/Source/Scene/UrlTemplateImageryProvider.js @@ -10,7 +10,6 @@ define([ '../Core/defineProperties', '../Core/DeveloperError', '../Core/Event', - '../Core/freezeObject', '../Core/GeographicTilingScheme', '../Core/isArray', '../Core/loadJson', @@ -19,7 +18,6 @@ define([ '../Core/loadXML', '../Core/Math', '../Core/Rectangle', - '../Core/TileProviderError', '../Core/WebMercatorTilingScheme', '../ThirdParty/when', './ImageryProvider' @@ -34,7 +32,6 @@ define([ defineProperties, DeveloperError, Event, - freezeObject, GeographicTilingScheme, isArray, loadJson, @@ -43,7 +40,6 @@ define([ loadXML, CesiumMath, Rectangle, - TileProviderError, WebMercatorTilingScheme, when, ImageryProvider) { diff --git a/Source/Scene/createTileMapServiceImageryProvider.js b/Source/Scene/createTileMapServiceImageryProvider.js index 87f93461a71f..bc71467d1d25 100644 --- a/Source/Scene/createTileMapServiceImageryProvider.js +++ b/Source/Scene/createTileMapServiceImageryProvider.js @@ -2,12 +2,9 @@ define([ '../Core/Cartesian2', '../Core/Cartographic', - '../Core/Credit', '../Core/defaultValue', '../Core/defined', - '../Core/defineProperties', '../Core/DeveloperError', - '../Core/Event', '../Core/GeographicTilingScheme', '../Core/joinUrls', '../Core/loadXML', @@ -20,12 +17,9 @@ define([ ], function( Cartesian2, Cartographic, - Credit, defaultValue, defined, - defineProperties, DeveloperError, - Event, GeographicTilingScheme, joinUrls, loadXML, diff --git a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js index 34cdfe968807..cf787930de7b 100644 --- a/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js +++ b/Source/Widgets/CesiumInspector/CesiumInspectorViewModel.js @@ -1,6 +1,5 @@ /*global define*/ define([ - '../../Core/Color', '../../Core/defined', '../../Core/defineProperties', '../../Core/destroyObject', @@ -14,7 +13,6 @@ define([ '../../ThirdParty/knockout', '../createCommand' ], function( - Color, defined, defineProperties, destroyObject, diff --git a/Source/Widgets/Geocoder/GeocoderViewModel.js b/Source/Widgets/Geocoder/GeocoderViewModel.js index c7d13cc633b4..d6227719787e 100644 --- a/Source/Widgets/Geocoder/GeocoderViewModel.js +++ b/Source/Widgets/Geocoder/GeocoderViewModel.js @@ -10,7 +10,6 @@ define([ '../../Core/loadJsonp', '../../Core/Matrix4', '../../Core/Rectangle', - '../../Scene/SceneMode', '../../ThirdParty/knockout', '../../ThirdParty/when', '../createCommand' @@ -25,7 +24,6 @@ define([ loadJsonp, Matrix4, Rectangle, - SceneMode, knockout, when, createCommand) { diff --git a/Source/Widgets/HomeButton/HomeButtonViewModel.js b/Source/Widgets/HomeButton/HomeButtonViewModel.js index 46c569ed5bbe..1c869d24bcb9 100644 --- a/Source/Widgets/HomeButton/HomeButtonViewModel.js +++ b/Source/Widgets/HomeButton/HomeButtonViewModel.js @@ -1,26 +1,14 @@ /*global define*/ define([ - '../../Core/Cartesian3', - '../../Core/defaultValue', '../../Core/defined', '../../Core/defineProperties', '../../Core/DeveloperError', - '../../Core/Matrix4', - '../../Core/Rectangle', - '../../Scene/Camera', - '../../Scene/SceneMode', '../../ThirdParty/knockout', '../createCommand' ], function( - Cartesian3, - defaultValue, defined, defineProperties, DeveloperError, - Matrix4, - Rectangle, - Camera, - SceneMode, knockout, createCommand) { 'use strict'; diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js index aa067441d541..aa66497dd207 100644 --- a/Source/Widgets/Viewer/Viewer.js +++ b/Source/Widgets/Viewer/Viewer.js @@ -8,7 +8,6 @@ define([ '../../Core/destroyObject', '../../Core/DeveloperError', '../../Core/EventHelper', - '../../Core/Fullscreen', '../../Core/isArray', '../../Core/Matrix4', '../../Core/Rectangle', @@ -22,7 +21,6 @@ define([ '../../DataSources/Property', '../../Scene/ImageryLayer', '../../Scene/SceneMode', - '../../Scene/ShadowMode', '../../ThirdParty/knockout', '../../ThirdParty/when', '../Animation/Animation', @@ -52,7 +50,6 @@ define([ destroyObject, DeveloperError, EventHelper, - Fullscreen, isArray, Matrix4, Rectangle, @@ -66,7 +63,6 @@ define([ Property, ImageryLayer, SceneMode, - ShadowMode, knockout, when, Animation, diff --git a/Source/Widgets/Viewer/viewerDragDropMixin.js b/Source/Widgets/Viewer/viewerDragDropMixin.js index bfb21466cda1..183424f9fe21 100644 --- a/Source/Widgets/Viewer/viewerDragDropMixin.js +++ b/Source/Widgets/Viewer/viewerDragDropMixin.js @@ -9,7 +9,6 @@ define([ '../../DataSources/CzmlDataSource', '../../DataSources/GeoJsonDataSource', '../../DataSources/KmlDataSource', - '../../Scene/GroundPrimitive', '../getElement' ], function( defaultValue, @@ -21,7 +20,6 @@ define([ CzmlDataSource, GeoJsonDataSource, KmlDataSource, - GroundPrimitive, getElement) { 'use strict'; diff --git a/Source/Workers/createGeometry.js b/Source/Workers/createGeometry.js index 1b0871fcfcec..7afe0f2c4f1b 100644 --- a/Source/Workers/createGeometry.js +++ b/Source/Workers/createGeometry.js @@ -2,13 +2,11 @@ define([ '../Core/defined', '../Scene/PrimitivePipeline', - '../ThirdParty/when', './createTaskProcessorWorker', 'require' ], function( defined, PrimitivePipeline, - when, createTaskProcessorWorker, require) { 'use strict'; diff --git a/Source/Workers/createVerticesFromQuantizedTerrainMesh.js b/Source/Workers/createVerticesFromQuantizedTerrainMesh.js index 2dcd5d9d5cb5..3a9d5118dad0 100644 --- a/Source/Workers/createVerticesFromQuantizedTerrainMesh.js +++ b/Source/Workers/createVerticesFromQuantizedTerrainMesh.js @@ -10,7 +10,6 @@ define([ '../Core/Ellipsoid', '../Core/IndexDatatype', '../Core/Math', - '../Core/Matrix3', '../Core/Matrix4', '../Core/OrientedBoundingBox', '../Core/TerrainEncoding', @@ -28,7 +27,6 @@ define([ Ellipsoid, IndexDatatype, CesiumMath, - Matrix3, Matrix4, OrientedBoundingBox, TerrainEncoding, diff --git a/Specs/Core/AxisAlignedBoundingBoxSpec.js b/Specs/Core/AxisAlignedBoundingBoxSpec.js index 25662097d1e6..07ea32ac8b1a 100644 --- a/Specs/Core/AxisAlignedBoundingBoxSpec.js +++ b/Specs/Core/AxisAlignedBoundingBoxSpec.js @@ -2,13 +2,11 @@ defineSuite([ 'Core/AxisAlignedBoundingBox', 'Core/Cartesian3', - 'Core/Cartesian4', 'Core/Intersect', 'Core/Plane' ], function( AxisAlignedBoundingBox, Cartesian3, - Cartesian4, Intersect, Plane) { 'use strict'; diff --git a/Specs/Core/BoundingSphereSpec.js b/Specs/Core/BoundingSphereSpec.js index b5d0d9c0f891..849ba66278c7 100644 --- a/Specs/Core/BoundingSphereSpec.js +++ b/Specs/Core/BoundingSphereSpec.js @@ -2,7 +2,6 @@ defineSuite([ 'Core/BoundingSphere', 'Core/Cartesian3', - 'Core/Cartesian4', 'Core/Cartographic', 'Core/Ellipsoid', 'Core/EncodedCartesian3', @@ -18,7 +17,6 @@ defineSuite([ ], function( BoundingSphere, Cartesian3, - Cartesian4, Cartographic, Ellipsoid, EncodedCartesian3, diff --git a/Specs/Core/CesiumTerrainProviderSpec.js b/Specs/Core/CesiumTerrainProviderSpec.js index d9c50157ad3d..e479b6011e0d 100644 --- a/Specs/Core/CesiumTerrainProviderSpec.js +++ b/Specs/Core/CesiumTerrainProviderSpec.js @@ -2,7 +2,6 @@ defineSuite([ 'Core/CesiumTerrainProvider', 'Core/DefaultProxy', - 'Core/defined', 'Core/Ellipsoid', 'Core/GeographicTilingScheme', 'Core/getAbsoluteUri', @@ -12,12 +11,10 @@ defineSuite([ 'Core/QuantizedMeshTerrainData', 'Core/TerrainProvider', 'Specs/pollToPromise', - 'ThirdParty/Uri', 'ThirdParty/when' ], function( CesiumTerrainProvider, DefaultProxy, - defined, Ellipsoid, GeographicTilingScheme, getAbsoluteUri, @@ -27,7 +24,6 @@ defineSuite([ QuantizedMeshTerrainData, TerrainProvider, pollToPromise, - Uri, when) { 'use strict'; diff --git a/Specs/Core/ClockSpec.js b/Specs/Core/ClockSpec.js index b7ba51e50e97..5bc6e164a8f2 100644 --- a/Specs/Core/ClockSpec.js +++ b/Specs/Core/ClockSpec.js @@ -4,15 +4,13 @@ defineSuite([ 'Core/ClockRange', 'Core/ClockStep', 'Core/defined', - 'Core/JulianDate', - 'Specs/pollToPromise' + 'Core/JulianDate' ], function( Clock, ClockRange, ClockStep, defined, - JulianDate, - pollToPromise) { + JulianDate) { 'use strict'; it('sets default parameters when constructed', function() { diff --git a/Specs/Core/DistanceDisplayConditionSpec.js b/Specs/Core/DistanceDisplayConditionSpec.js index 0a0b3fc5c44c..22b35a8ae8d2 100644 --- a/Specs/Core/DistanceDisplayConditionSpec.js +++ b/Specs/Core/DistanceDisplayConditionSpec.js @@ -1,12 +1,8 @@ /*global defineSuite*/ defineSuite([ - 'Core/DistanceDisplayCondition', - 'Core/Cartesian3', - 'Core/Matrix4' + 'Core/DistanceDisplayCondition' ], function( - DistanceDisplayCondition, - Cartesian3, - Matrix4) { + DistanceDisplayCondition) { 'use strict'; it('default constructs', function() { diff --git a/Specs/Core/EllipsoidTangentPlaneSpec.js b/Specs/Core/EllipsoidTangentPlaneSpec.js index 1768014b2f6d..54e34c0e8641 100644 --- a/Specs/Core/EllipsoidTangentPlaneSpec.js +++ b/Specs/Core/EllipsoidTangentPlaneSpec.js @@ -3,18 +3,12 @@ defineSuite([ 'Core/EllipsoidTangentPlane', 'Core/Cartesian2', 'Core/Cartesian3', - 'Core/Ellipsoid', - 'Core/Math', - 'Core/Matrix3', - 'Core/OrientedBoundingBox' + 'Core/Ellipsoid' ], function( EllipsoidTangentPlane, Cartesian2, Cartesian3, - Ellipsoid, - CesiumMath, - Matrix3, - OrientedBoundingBox) { + Ellipsoid) { 'use strict'; it('constructor defaults to WGS84', function() { diff --git a/Specs/Core/HeightmapTerrainDataSpec.js b/Specs/Core/HeightmapTerrainDataSpec.js index 809ba6b61585..d0c64e8053ca 100644 --- a/Specs/Core/HeightmapTerrainDataSpec.js +++ b/Specs/Core/HeightmapTerrainDataSpec.js @@ -1,16 +1,12 @@ /*global defineSuite*/ defineSuite([ 'Core/HeightmapTerrainData', - 'Core/defined', 'Core/GeographicTilingScheme', - 'Core/TerrainData', - 'ThirdParty/when' + 'Core/TerrainData' ], function( HeightmapTerrainData, - defined, GeographicTilingScheme, - TerrainData, - when) { + TerrainData) { 'use strict'; it('conforms to TerrainData interface', function() { diff --git a/Specs/Core/OrientedBoundingBoxSpec.js b/Specs/Core/OrientedBoundingBoxSpec.js index 9845c0dc700e..38f1a6855cb5 100644 --- a/Specs/Core/OrientedBoundingBoxSpec.js +++ b/Specs/Core/OrientedBoundingBoxSpec.js @@ -1,12 +1,10 @@ /*global defineSuite*/ defineSuite([ 'Core/OrientedBoundingBox', - 'Core/BoundingRectangle', 'Core/BoundingSphere', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Ellipsoid', - 'Core/EllipsoidTangentPlane', 'Core/Intersect', 'Core/Math', 'Core/Matrix3', @@ -16,12 +14,10 @@ defineSuite([ 'Core/Rectangle' ], function( OrientedBoundingBox, - BoundingRectangle, BoundingSphere, Cartesian3, Cartesian4, Ellipsoid, - EllipsoidTangentPlane, Intersect, CesiumMath, Matrix3, diff --git a/Specs/Core/PinBuilderSpec.js b/Specs/Core/PinBuilderSpec.js index 2895c3d66100..33d6b8ba4f99 100644 --- a/Specs/Core/PinBuilderSpec.js +++ b/Specs/Core/PinBuilderSpec.js @@ -3,13 +3,11 @@ defineSuite([ 'Core/PinBuilder', 'Core/buildModuleUrl', 'Core/Color', - 'Core/defined', 'ThirdParty/when' ], function( PinBuilder, buildModuleUrl, Color, - defined, when) { 'use strict'; diff --git a/Specs/Core/PolylineGeometrySpec.js b/Specs/Core/PolylineGeometrySpec.js index 1d02cc1284ec..4f7b6d3a27e8 100644 --- a/Specs/Core/PolylineGeometrySpec.js +++ b/Specs/Core/PolylineGeometrySpec.js @@ -4,7 +4,6 @@ defineSuite([ 'Core/Cartesian3', 'Core/Color', 'Core/Ellipsoid', - 'Core/Math', 'Core/VertexFormat', 'Specs/createPackableSpecs' ], function( @@ -12,7 +11,6 @@ defineSuite([ Cartesian3, Color, Ellipsoid, - CesiumMath, VertexFormat, createPackableSpecs) { 'use strict'; diff --git a/Specs/Core/QuantizedMeshTerrainDataSpec.js b/Specs/Core/QuantizedMeshTerrainDataSpec.js index b2981728f2fd..c66692cc7b95 100644 --- a/Specs/Core/QuantizedMeshTerrainDataSpec.js +++ b/Specs/Core/QuantizedMeshTerrainDataSpec.js @@ -3,7 +3,6 @@ defineSuite([ 'Core/QuantizedMeshTerrainData', 'Core/BoundingSphere', 'Core/Cartesian3', - 'Core/defined', 'Core/GeographicTilingScheme', 'Core/Math', 'Core/TerrainData', @@ -13,7 +12,6 @@ defineSuite([ QuantizedMeshTerrainData, BoundingSphere, Cartesian3, - defined, GeographicTilingScheme, CesiumMath, TerrainData, diff --git a/Specs/Core/TerrainEncodingSpec.js b/Specs/Core/TerrainEncodingSpec.js index 8b511b1bbee1..de33f7b07687 100644 --- a/Specs/Core/TerrainEncodingSpec.js +++ b/Specs/Core/TerrainEncodingSpec.js @@ -5,7 +5,6 @@ defineSuite([ 'Core/AxisAlignedBoundingBox', 'Core/Cartesian2', 'Core/Cartesian3', - 'Core/Math', 'Core/Matrix4', 'Core/TerrainQuantization', 'Core/Transforms' @@ -15,7 +14,6 @@ defineSuite([ AxisAlignedBoundingBox, Cartesian2, Cartesian3, - CesiumMath, Matrix4, TerrainQuantization, Transforms) { diff --git a/Specs/Core/TransformsSpec.js b/Specs/Core/TransformsSpec.js index f6be7aa1abf8..de42f2f68270 100644 --- a/Specs/Core/TransformsSpec.js +++ b/Specs/Core/TransformsSpec.js @@ -4,8 +4,6 @@ defineSuite([ 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', - 'Core/defined', - 'Core/DeveloperError', 'Core/EarthOrientationParameters', 'Core/Ellipsoid', 'Core/GeographicProjection', @@ -17,16 +15,12 @@ defineSuite([ 'Core/Matrix3', 'Core/Matrix4', 'Core/Quaternion', - 'Core/TimeConstants', - 'Core/TimeInterval', - 'ThirdParty/when' + 'Core/TimeInterval' ], function( Transforms, Cartesian2, Cartesian3, Cartesian4, - defined, - DeveloperError, EarthOrientationParameters, Ellipsoid, GeographicProjection, @@ -38,9 +32,7 @@ defineSuite([ Matrix3, Matrix4, Quaternion, - TimeConstants, - TimeInterval, - when) { + TimeInterval) { 'use strict'; var negativeX = new Cartesian4(-1, 0, 0, 0); diff --git a/Specs/Core/TranslationRotationScaleSpec.js b/Specs/Core/TranslationRotationScaleSpec.js index 1b2b14344b13..ab51f2e833f1 100644 --- a/Specs/Core/TranslationRotationScaleSpec.js +++ b/Specs/Core/TranslationRotationScaleSpec.js @@ -2,12 +2,10 @@ defineSuite([ 'Core/TranslationRotationScale', 'Core/Cartesian3', - 'Core/Matrix4', 'Core/Quaternion' ], function( TranslationRotationScale, Cartesian3, - Matrix4, Quaternion) { 'use strict'; diff --git a/Specs/Core/VRTheWorldTerrainProviderSpec.js b/Specs/Core/VRTheWorldTerrainProviderSpec.js index 1b367b597952..f04ccee3a016 100644 --- a/Specs/Core/VRTheWorldTerrainProviderSpec.js +++ b/Specs/Core/VRTheWorldTerrainProviderSpec.js @@ -2,7 +2,6 @@ defineSuite([ 'Core/VRTheWorldTerrainProvider', 'Core/DefaultProxy', - 'Core/defined', 'Core/GeographicTilingScheme', 'Core/HeightmapTerrainData', 'Core/loadImage', @@ -14,7 +13,6 @@ defineSuite([ ], function( VRTheWorldTerrainProvider, DefaultProxy, - defined, GeographicTilingScheme, HeightmapTerrainData, loadImage, diff --git a/Specs/Core/loadImageFromTypedArraySpec.js b/Specs/Core/loadImageFromTypedArraySpec.js index 8231513950b1..d16e6468ab4f 100644 --- a/Specs/Core/loadImageFromTypedArraySpec.js +++ b/Specs/Core/loadImageFromTypedArraySpec.js @@ -1,14 +1,10 @@ /*global defineSuite*/ defineSuite([ 'Core/loadImageFromTypedArray', - 'Core/defined', - 'Core/loadArrayBuffer', - 'ThirdParty/when' + 'Core/loadArrayBuffer' ], function( loadImageFromTypedArray, - defined, - loadArrayBuffer, - when) { + loadArrayBuffer) { 'use strict'; it('can load an image', function() { diff --git a/Specs/Core/loadImageSpec.js b/Specs/Core/loadImageSpec.js index b396a886f61d..2a31f4cb2bdb 100644 --- a/Specs/Core/loadImageSpec.js +++ b/Specs/Core/loadImageSpec.js @@ -1,11 +1,9 @@ /*global defineSuite*/ defineSuite([ 'Core/loadImage', - 'Core/defined', 'ThirdParty/when' ], function( loadImage, - defined, when) { 'use strict'; diff --git a/Specs/Core/loadImageViaBlobSpec.js b/Specs/Core/loadImageViaBlobSpec.js index 372d61c4fdf8..bfbe82e5b965 100644 --- a/Specs/Core/loadImageViaBlobSpec.js +++ b/Specs/Core/loadImageViaBlobSpec.js @@ -1,11 +1,9 @@ /*global defineSuite*/ defineSuite([ 'Core/loadImageViaBlob', - 'Core/defined', 'ThirdParty/when' ], function( loadImageViaBlob, - defined, when) { 'use strict'; diff --git a/Specs/Core/loadJsonpSpec.js b/Specs/Core/loadJsonpSpec.js index 066ce79e0a6c..9b735b692178 100644 --- a/Specs/Core/loadJsonpSpec.js +++ b/Specs/Core/loadJsonpSpec.js @@ -1,12 +1,10 @@ /*global defineSuite*/ defineSuite([ 'Core/loadJsonp', - 'Core/DefaultProxy', - 'Core/RequestErrorEvent' + 'Core/DefaultProxy' ], function( loadJsonp, - DefaultProxy, - RequestErrorEvent) { + DefaultProxy) { 'use strict'; it('throws with no url', function() { diff --git a/Specs/Core/loadWithXhrSpec.js b/Specs/Core/loadWithXhrSpec.js index 44cc1799f33a..6b2b5a5742ec 100644 --- a/Specs/Core/loadWithXhrSpec.js +++ b/Specs/Core/loadWithXhrSpec.js @@ -2,13 +2,11 @@ defineSuite([ 'Core/loadWithXhr', 'Core/loadImage', - 'Core/RequestErrorEvent', - 'Core/RuntimeError' + 'Core/RequestErrorEvent' ], function( loadWithXhr, loadImage, - RequestErrorEvent, - RuntimeError) { + RequestErrorEvent) { 'use strict'; it('throws with no url', function() { diff --git a/Specs/Core/sampleTerrainSpec.js b/Specs/Core/sampleTerrainSpec.js index 1cf13884d8c7..3ab1971a23f4 100644 --- a/Specs/Core/sampleTerrainSpec.js +++ b/Specs/Core/sampleTerrainSpec.js @@ -2,13 +2,11 @@ defineSuite([ 'Core/sampleTerrain', 'Core/Cartographic', - 'Core/CesiumTerrainProvider', - 'ThirdParty/when' + 'Core/CesiumTerrainProvider' ], function( sampleTerrain, Cartographic, - CesiumTerrainProvider, - when) { + CesiumTerrainProvider) { 'use strict'; var terrainProvider = new CesiumTerrainProvider({ diff --git a/Specs/DataSources/BillboardVisualizerSpec.js b/Specs/DataSources/BillboardVisualizerSpec.js index df82126feca4..d802621455e7 100644 --- a/Specs/DataSources/BillboardVisualizerSpec.js +++ b/Specs/DataSources/BillboardVisualizerSpec.js @@ -14,7 +14,6 @@ defineSuite([ 'DataSources/ConstantProperty', 'DataSources/EntityCluster', 'DataSources/EntityCollection', - 'Scene/BillboardCollection', 'Scene/HeightReference', 'Scene/HorizontalOrigin', 'Scene/VerticalOrigin', @@ -36,7 +35,6 @@ defineSuite([ ConstantProperty, EntityCluster, EntityCollection, - BillboardCollection, HeightReference, HorizontalOrigin, VerticalOrigin, diff --git a/Specs/DataSources/CallbackPropertySpec.js b/Specs/DataSources/CallbackPropertySpec.js index 759b39c17be5..96c992d8c23f 100644 --- a/Specs/DataSources/CallbackPropertySpec.js +++ b/Specs/DataSources/CallbackPropertySpec.js @@ -1,11 +1,9 @@ /*global defineSuite*/ defineSuite([ 'DataSources/CallbackProperty', - 'Core/Cartesian3', 'Core/JulianDate' ], function( CallbackProperty, - Cartesian3, JulianDate) { 'use strict'; diff --git a/Specs/DataSources/CzmlDataSourceSpec.js b/Specs/DataSources/CzmlDataSourceSpec.js index 4e96c76e68fe..5a6cbbe0fa81 100644 --- a/Specs/DataSources/CzmlDataSourceSpec.js +++ b/Specs/DataSources/CzmlDataSourceSpec.js @@ -9,7 +9,6 @@ defineSuite([ 'Core/ClockStep', 'Core/Color', 'Core/CornerType', - 'Core/defined', 'Core/Ellipsoid', 'Core/Event', 'Core/ExtrapolationType', @@ -33,7 +32,6 @@ defineSuite([ 'Scene/LabelStyle', 'Scene/ShadowMode', 'Scene/VerticalOrigin', - 'Specs/pollToPromise', 'ThirdParty/when' ], function( CzmlDataSource, @@ -45,7 +43,6 @@ defineSuite([ ClockStep, Color, CornerType, - defined, Ellipsoid, Event, ExtrapolationType, @@ -69,7 +66,6 @@ defineSuite([ LabelStyle, ShadowMode, VerticalOrigin, - pollToPromise, when) { 'use strict'; diff --git a/Specs/DataSources/LabelVisualizerSpec.js b/Specs/DataSources/LabelVisualizerSpec.js index 5da3bf985806..55021d652b94 100644 --- a/Specs/DataSources/LabelVisualizerSpec.js +++ b/Specs/DataSources/LabelVisualizerSpec.js @@ -14,7 +14,6 @@ defineSuite([ 'DataSources/EntityCollection', 'DataSources/LabelGraphics', 'Scene/HorizontalOrigin', - 'Scene/LabelCollection', 'Scene/LabelStyle', 'Scene/VerticalOrigin', 'Specs/createGlobe', @@ -34,7 +33,6 @@ defineSuite([ EntityCollection, LabelGraphics, HorizontalOrigin, - LabelCollection, LabelStyle, VerticalOrigin, createGlobe, diff --git a/Specs/DataSources/PolylineGeometryUpdaterSpec.js b/Specs/DataSources/PolylineGeometryUpdaterSpec.js index 080f71c3cbd5..5dc3db3d66ef 100644 --- a/Specs/DataSources/PolylineGeometryUpdaterSpec.js +++ b/Specs/DataSources/PolylineGeometryUpdaterSpec.js @@ -22,7 +22,6 @@ defineSuite([ 'DataSources/SampledProperty', 'DataSources/TimeIntervalCollectionProperty', 'Scene/Globe', - 'Scene/PrimitiveCollection', 'Scene/ShadowMode', 'Specs/createDynamicProperty', 'Specs/createScene' @@ -49,7 +48,6 @@ defineSuite([ SampledProperty, TimeIntervalCollectionProperty, Globe, - PrimitiveCollection, ShadowMode, createDynamicProperty, createScene) { diff --git a/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js b/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js index b577d0a96abe..811ef935437e 100644 --- a/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js +++ b/Specs/DataSources/PolylineVolumeGeometryUpdaterSpec.js @@ -17,7 +17,6 @@ defineSuite([ 'DataSources/Entity', 'DataSources/GridMaterialProperty', 'DataSources/PolylineVolumeGraphics', - 'DataSources/PropertyArray', 'DataSources/SampledProperty', 'DataSources/TimeIntervalCollectionProperty', 'Scene/PrimitiveCollection', @@ -43,7 +42,6 @@ defineSuite([ Entity, GridMaterialProperty, PolylineVolumeGraphics, - PropertyArray, SampledProperty, TimeIntervalCollectionProperty, PrimitiveCollection, diff --git a/Specs/Renderer/SamplerSpec.js b/Specs/Renderer/SamplerSpec.js index f0c2860e1d81..42ed448636fd 100644 --- a/Specs/Renderer/SamplerSpec.js +++ b/Specs/Renderer/SamplerSpec.js @@ -1,13 +1,11 @@ /*global defineSuite*/ defineSuite([ 'Renderer/Sampler', - 'Renderer/TextureMagnificationFilter', 'Renderer/TextureMinificationFilter', 'Renderer/TextureWrap', 'Specs/createContext' ], function( Sampler, - TextureMagnificationFilter, TextureMinificationFilter, TextureWrap, createContext) { diff --git a/Specs/Renderer/ShaderProgramSpec.js b/Specs/Renderer/ShaderProgramSpec.js index c99c5d9e270f..c5528a195c65 100644 --- a/Specs/Renderer/ShaderProgramSpec.js +++ b/Specs/Renderer/ShaderProgramSpec.js @@ -1,13 +1,6 @@ /*global defineSuite*/ defineSuite([ 'Renderer/ShaderProgram', - 'Core/Cartesian2', - 'Core/Cartesian3', - 'Core/Cartesian4', - 'Core/Color', - 'Core/Matrix2', - 'Core/Matrix3', - 'Core/Matrix4', 'Core/PrimitiveType', 'Renderer/Buffer', 'Renderer/BufferUsage', @@ -19,13 +12,6 @@ defineSuite([ 'Specs/createContext' ], function( ShaderProgram, - Cartesian2, - Cartesian3, - Cartesian4, - Color, - Matrix2, - Matrix3, - Matrix4, PrimitiveType, Buffer, BufferUsage, diff --git a/Specs/Renderer/loadCubeMapSpec.js b/Specs/Renderer/loadCubeMapSpec.js index a23dd4b5f748..4968b19082ce 100644 --- a/Specs/Renderer/loadCubeMapSpec.js +++ b/Specs/Renderer/loadCubeMapSpec.js @@ -2,27 +2,23 @@ defineSuite([ 'Renderer/loadCubeMap', 'Core/Cartesian3', - 'Core/defined', 'Core/PrimitiveType', 'Renderer/Buffer', 'Renderer/BufferUsage', 'Renderer/DrawCommand', 'Renderer/ShaderProgram', 'Renderer/VertexArray', - 'Specs/createContext', - 'ThirdParty/when' + 'Specs/createContext' ], function( loadCubeMap, Cartesian3, - defined, PrimitiveType, Buffer, BufferUsage, DrawCommand, ShaderProgram, VertexArray, - createContext, - when) { + createContext) { 'use strict'; var context; diff --git a/Specs/Scene/ArcGisMapServerImageryProviderSpec.js b/Specs/Scene/ArcGisMapServerImageryProviderSpec.js index b2d9de777c58..14276f52a1f7 100644 --- a/Specs/Scene/ArcGisMapServerImageryProviderSpec.js +++ b/Specs/Scene/ArcGisMapServerImageryProviderSpec.js @@ -6,7 +6,6 @@ defineSuite([ 'Core/Cartographic', 'Core/DefaultProxy', 'Core/defined', - 'Core/GeographicProjection', 'Core/GeographicTilingScheme', 'Core/loadImage', 'Core/loadJsonp', @@ -30,7 +29,6 @@ defineSuite([ Cartographic, DefaultProxy, defined, - GeographicProjection, GeographicTilingScheme, loadImage, loadJsonp, diff --git a/Specs/Scene/BillboardCollectionSpec.js b/Specs/Scene/BillboardCollectionSpec.js index c953eb6e1625..6bd1cd3af55c 100644 --- a/Specs/Scene/BillboardCollectionSpec.js +++ b/Specs/Scene/BillboardCollectionSpec.js @@ -7,16 +7,11 @@ defineSuite([ 'Core/Cartesian3', 'Core/CesiumTerrainProvider', 'Core/Color', - 'Core/defined', - 'Core/defineProperties', 'Core/DistanceDisplayCondition', - 'Core/Ellipsoid', - 'Core/Event', 'Core/loadImage', 'Core/Math', 'Core/NearFarScalar', 'Core/Rectangle', - 'Renderer/ContextLimits', 'Scene/Billboard', 'Scene/HeightReference', 'Scene/HorizontalOrigin', @@ -35,16 +30,11 @@ defineSuite([ Cartesian3, CesiumTerrainProvider, Color, - defined, - defineProperties, DistanceDisplayCondition, - Ellipsoid, - Event, loadImage, CesiumMath, NearFarScalar, Rectangle, - ContextLimits, Billboard, HeightReference, HorizontalOrigin, diff --git a/Specs/Scene/CameraEventAggregatorSpec.js b/Specs/Scene/CameraEventAggregatorSpec.js index 6e61c0bba0ec..17ee047fdf8d 100644 --- a/Specs/Scene/CameraEventAggregatorSpec.js +++ b/Specs/Scene/CameraEventAggregatorSpec.js @@ -3,7 +3,6 @@ defineSuite([ 'Scene/CameraEventAggregator', 'Core/Cartesian2', 'Core/combine', - 'Core/defined', 'Core/FeatureDetection', 'Core/KeyboardEventModifier', 'Scene/CameraEventType', @@ -14,7 +13,6 @@ defineSuite([ CameraEventAggregator, Cartesian2, combine, - defined, FeatureDetection, KeyboardEventModifier, CameraEventType, diff --git a/Specs/Scene/CameraFlightPathSpec.js b/Specs/Scene/CameraFlightPathSpec.js index 38bf6a6f2dbb..2b5ecc5dff4e 100644 --- a/Specs/Scene/CameraFlightPathSpec.js +++ b/Specs/Scene/CameraFlightPathSpec.js @@ -2,18 +2,14 @@ defineSuite([ 'Scene/CameraFlightPath', 'Core/Cartesian3', - 'Core/Cartographic', 'Core/Math', - 'Core/Rectangle', 'Scene/OrthographicFrustum', 'Scene/SceneMode', 'Specs/createScene' ], function( CameraFlightPath, Cartesian3, - Cartographic, CesiumMath, - Rectangle, OrthographicFrustum, SceneMode, createScene) { diff --git a/Specs/Scene/DebugAppearanceSpec.js b/Specs/Scene/DebugAppearanceSpec.js index 229e31d72582..ce9f5d1cd096 100644 --- a/Specs/Scene/DebugAppearanceSpec.js +++ b/Specs/Scene/DebugAppearanceSpec.js @@ -8,7 +8,6 @@ defineSuite([ 'Core/Rectangle', 'Core/RectangleGeometry', 'Core/VertexFormat', - 'Renderer/ClearCommand', 'Scene/Appearance', 'Scene/Primitive', 'Specs/createScene' @@ -21,7 +20,6 @@ defineSuite([ Rectangle, RectangleGeometry, VertexFormat, - ClearCommand, Appearance, Primitive, createScene) { diff --git a/Specs/Scene/DebugModelMatrixPrimitiveSpec.js b/Specs/Scene/DebugModelMatrixPrimitiveSpec.js index 8f95c8f24a4d..7210ab1fc002 100644 --- a/Specs/Scene/DebugModelMatrixPrimitiveSpec.js +++ b/Specs/Scene/DebugModelMatrixPrimitiveSpec.js @@ -1,13 +1,11 @@ /*global defineSuite*/ defineSuite([ 'Scene/DebugModelMatrixPrimitive', - 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Matrix4', 'Specs/createScene' ], function( DebugModelMatrixPrimitive, - Cartesian2, Cartesian3, Matrix4, createScene) { diff --git a/Specs/Scene/DiscardMissingTileImagePolicySpec.js b/Specs/Scene/DiscardMissingTileImagePolicySpec.js index 63857e64dcaa..bf1281142743 100644 --- a/Specs/Scene/DiscardMissingTileImagePolicySpec.js +++ b/Specs/Scene/DiscardMissingTileImagePolicySpec.js @@ -2,7 +2,6 @@ defineSuite([ 'Scene/DiscardMissingTileImagePolicy', 'Core/Cartesian2', - 'Core/defined', 'Core/loadImage', 'Core/loadWithXhr', 'Specs/pollToPromise', @@ -10,7 +9,6 @@ defineSuite([ ], function( DiscardMissingTileImagePolicy, Cartesian2, - defined, loadImage, loadWithXhr, pollToPromise, diff --git a/Specs/Scene/EllipsoidPrimitiveSpec.js b/Specs/Scene/EllipsoidPrimitiveSpec.js index 96431a7a6162..764ea7575424 100644 --- a/Specs/Scene/EllipsoidPrimitiveSpec.js +++ b/Specs/Scene/EllipsoidPrimitiveSpec.js @@ -4,7 +4,6 @@ defineSuite([ 'Core/Cartesian3', 'Core/defined', 'Core/Matrix4', - 'Renderer/ClearCommand', 'Scene/Material', 'Specs/createScene' ], function( @@ -12,7 +11,6 @@ defineSuite([ Cartesian3, defined, Matrix4, - ClearCommand, Material, createScene) { 'use strict'; diff --git a/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js b/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js index 1919c32b5dc3..eb3815022919 100644 --- a/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js +++ b/Specs/Scene/EllipsoidSurfaceAppearanceSpec.js @@ -5,7 +5,6 @@ defineSuite([ 'Core/GeometryInstance', 'Core/Rectangle', 'Core/RectangleGeometry', - 'Renderer/ClearCommand', 'Scene/Appearance', 'Scene/Material', 'Scene/Primitive', @@ -16,7 +15,6 @@ defineSuite([ GeometryInstance, Rectangle, RectangleGeometry, - ClearCommand, Appearance, Material, Primitive, diff --git a/Specs/Scene/GeometryRenderingSpec.js b/Specs/Scene/GeometryRenderingSpec.js index e732ef84f9d6..9b1e7effa501 100644 --- a/Specs/Scene/GeometryRenderingSpec.js +++ b/Specs/Scene/GeometryRenderingSpec.js @@ -15,7 +15,6 @@ defineSuite([ 'Core/EllipseGeometry', 'Core/Ellipsoid', 'Core/EllipsoidGeometry', - 'Core/GeographicProjection', 'Core/Geometry', 'Core/GeometryAttribute', 'Core/GeometryInstance', @@ -31,10 +30,8 @@ defineSuite([ 'Core/SphereGeometry', 'Core/Transforms', 'Core/WallGeometry', - 'Renderer/ClearCommand', 'Scene/EllipsoidSurfaceAppearance', 'Scene/Material', - 'Scene/OrthographicFrustum', 'Scene/PerInstanceColorAppearance', 'Scene/PolylineColorAppearance', 'Scene/Primitive', @@ -57,7 +54,6 @@ defineSuite([ EllipseGeometry, Ellipsoid, EllipsoidGeometry, - GeographicProjection, Geometry, GeometryAttribute, GeometryInstance, @@ -73,10 +69,8 @@ defineSuite([ SphereGeometry, Transforms, WallGeometry, - ClearCommand, EllipsoidSurfaceAppearance, Material, - OrthographicFrustum, PerInstanceColorAppearance, PolylineColorAppearance, Primitive, diff --git a/Specs/Scene/GlobeSpec.js b/Specs/Scene/GlobeSpec.js index 466b18231e9a..78de4c934908 100644 --- a/Specs/Scene/GlobeSpec.js +++ b/Specs/Scene/GlobeSpec.js @@ -3,10 +3,8 @@ defineSuite([ 'Scene/Globe', 'Core/CesiumTerrainProvider', 'Core/defined', - 'Core/Ellipsoid', 'Core/loadWithXhr', 'Core/Rectangle', - 'Renderer/ClearCommand', 'Scene/SingleTileImageryProvider', 'Specs/createScene', 'Specs/pollToPromise' @@ -14,10 +12,8 @@ defineSuite([ Globe, CesiumTerrainProvider, defined, - Ellipsoid, loadWithXhr, Rectangle, - ClearCommand, SingleTileImageryProvider, createScene, pollToPromise) { diff --git a/Specs/Scene/GlobeSurfaceTileProviderSpec.js b/Specs/Scene/GlobeSurfaceTileProviderSpec.js index b4685e66e783..91ae16b315eb 100644 --- a/Specs/Scene/GlobeSurfaceTileProviderSpec.js +++ b/Specs/Scene/GlobeSurfaceTileProviderSpec.js @@ -9,7 +9,6 @@ defineSuite([ 'Core/Ellipsoid', 'Core/EllipsoidTerrainProvider', 'Core/GeographicProjection', - 'Core/Math', 'Core/Rectangle', 'Core/WebMercatorProjection', 'Renderer/ContextLimits', @@ -19,7 +18,6 @@ defineSuite([ 'Scene/Globe', 'Scene/GlobeSurfaceShaderSet', 'Scene/ImageryLayerCollection', - 'Scene/OrthographicFrustum', 'Scene/QuadtreeTile', 'Scene/QuadtreeTileProvider', 'Scene/SceneMode', @@ -37,7 +35,6 @@ defineSuite([ Ellipsoid, EllipsoidTerrainProvider, GeographicProjection, - CesiumMath, Rectangle, WebMercatorProjection, ContextLimits, @@ -47,7 +44,6 @@ defineSuite([ Globe, GlobeSurfaceShaderSet, ImageryLayerCollection, - OrthographicFrustum, QuadtreeTile, QuadtreeTileProvider, SceneMode, diff --git a/Specs/Scene/GoogleEarthImageryProviderSpec.js b/Specs/Scene/GoogleEarthImageryProviderSpec.js index b642eed65e88..7df3ce2e74ea 100644 --- a/Specs/Scene/GoogleEarthImageryProviderSpec.js +++ b/Specs/Scene/GoogleEarthImageryProviderSpec.js @@ -2,7 +2,6 @@ defineSuite([ 'Scene/GoogleEarthImageryProvider', 'Core/DefaultProxy', - 'Core/defined', 'Core/GeographicTilingScheme', 'Core/loadImage', 'Core/loadWithXhr', @@ -16,7 +15,6 @@ defineSuite([ ], function( GoogleEarthImageryProvider, DefaultProxy, - defined, GeographicTilingScheme, loadImage, loadWithXhr, diff --git a/Specs/Scene/GroundPrimitiveSpec.js b/Specs/Scene/GroundPrimitiveSpec.js index a09afbb7360e..a64916d714dc 100644 --- a/Specs/Scene/GroundPrimitiveSpec.js +++ b/Specs/Scene/GroundPrimitiveSpec.js @@ -1,64 +1,40 @@ /*global defineSuite*/ defineSuite([ 'Scene/GroundPrimitive', - 'Core/Cartesian3', 'Core/Color', 'Core/ColorGeometryInstanceAttribute', - 'Core/ComponentDatatype', 'Core/destroyObject', 'Core/DistanceDisplayConditionGeometryInstanceAttribute', 'Core/Ellipsoid', - 'Core/Geometry', - 'Core/GeometryAttribute', 'Core/GeometryInstance', - 'Core/GeometryInstanceAttribute', 'Core/HeadingPitchRange', 'Core/Math', 'Core/PolygonGeometry', - 'Core/PrimitiveType', 'Core/Rectangle', 'Core/RectangleGeometry', - 'Core/RuntimeError', 'Core/ShowGeometryInstanceAttribute', - 'Core/Transforms', - 'Scene/MaterialAppearance', - 'Scene/OrthographicFrustum', 'Scene/Pass', 'Scene/PerInstanceColorAppearance', 'Scene/Primitive', - 'Scene/SceneMode', - 'Specs/BadGeometry', 'Specs/createScene', 'Specs/pollToPromise' ], function( GroundPrimitive, - Cartesian3, Color, ColorGeometryInstanceAttribute, - ComponentDatatype, destroyObject, DistanceDisplayConditionGeometryInstanceAttribute, Ellipsoid, - Geometry, - GeometryAttribute, GeometryInstance, - GeometryInstanceAttribute, HeadingPitchRange, CesiumMath, PolygonGeometry, - PrimitiveType, Rectangle, RectangleGeometry, - RuntimeError, ShowGeometryInstanceAttribute, - Transforms, - MaterialAppearance, - OrthographicFrustum, Pass, PerInstanceColorAppearance, Primitive, - SceneMode, - BadGeometry, createScene, pollToPromise) { 'use strict'; diff --git a/Specs/Scene/ImageryLayerSpec.js b/Specs/Scene/ImageryLayerSpec.js index 94ddc52ac0a2..88a8804b12fd 100644 --- a/Specs/Scene/ImageryLayerSpec.js +++ b/Specs/Scene/ImageryLayerSpec.js @@ -10,7 +10,6 @@ defineSuite([ 'Scene/ArcGisMapServerImageryProvider', 'Scene/BingMapsImageryProvider', 'Scene/createTileMapServiceImageryProvider', - 'Scene/Globe', 'Scene/GlobeSurfaceTile', 'Scene/Imagery', 'Scene/ImageryLayerCollection', @@ -32,7 +31,6 @@ defineSuite([ ArcGisMapServerImageryProvider, BingMapsImageryProvider, createTileMapServiceImageryProvider, - Globe, GlobeSurfaceTile, Imagery, ImageryLayerCollection, diff --git a/Specs/Scene/LabelCollectionSpec.js b/Specs/Scene/LabelCollectionSpec.js index 3b61582483be..b23b9f579169 100644 --- a/Specs/Scene/LabelCollectionSpec.js +++ b/Specs/Scene/LabelCollectionSpec.js @@ -8,17 +8,14 @@ defineSuite([ 'Core/Color', 'Core/defined', 'Core/DistanceDisplayCondition', - 'Core/Ellipsoid', 'Core/Math', 'Core/NearFarScalar', 'Core/Rectangle', - 'Renderer/ContextLimits', 'Scene/Globe', 'Scene/HeightReference', 'Scene/HorizontalOrigin', 'Scene/Label', 'Scene/LabelStyle', - 'Scene/OrthographicFrustum', 'Scene/VerticalOrigin', 'Specs/createGlobe', 'Specs/createScene' @@ -31,17 +28,14 @@ defineSuite([ Color, defined, DistanceDisplayCondition, - Ellipsoid, CesiumMath, NearFarScalar, Rectangle, - ContextLimits, Globe, HeightReference, HorizontalOrigin, Label, LabelStyle, - OrthographicFrustum, VerticalOrigin, createGlobe, createScene) { diff --git a/Specs/Scene/MaterialAppearanceSpec.js b/Specs/Scene/MaterialAppearanceSpec.js index 28a305b88217..d2d535827b5a 100644 --- a/Specs/Scene/MaterialAppearanceSpec.js +++ b/Specs/Scene/MaterialAppearanceSpec.js @@ -7,7 +7,6 @@ defineSuite([ 'Core/GeometryInstance', 'Core/Rectangle', 'Core/RectangleGeometry', - 'Renderer/ClearCommand', 'Scene/Appearance', 'Scene/Material', 'Scene/Primitive', @@ -20,7 +19,6 @@ defineSuite([ GeometryInstance, Rectangle, RectangleGeometry, - ClearCommand, Appearance, Material, Primitive, diff --git a/Specs/Scene/MaterialSpec.js b/Specs/Scene/MaterialSpec.js index e6c3b44b71ca..0be40157f399 100644 --- a/Specs/Scene/MaterialSpec.js +++ b/Specs/Scene/MaterialSpec.js @@ -3,17 +3,11 @@ defineSuite([ 'Scene/Material', 'Core/Cartesian3', 'Core/Color', - 'Core/ColorGeometryInstanceAttribute', 'Core/defaultValue', 'Core/Ellipsoid', 'Core/GeometryInstance', - 'Core/Math', - 'Core/Matrix4', - 'Core/PolygonGeometry', 'Core/Rectangle', 'Core/RectangleGeometry', - 'Renderer/ClearCommand', - 'Scene/EllipsoidSurfaceAppearance', 'Scene/MaterialAppearance', 'Scene/PolylineCollection', 'Scene/Primitive', @@ -23,17 +17,11 @@ defineSuite([ Material, Cartesian3, Color, - ColorGeometryInstanceAttribute, defaultValue, Ellipsoid, GeometryInstance, - CesiumMath, - Matrix4, - PolygonGeometry, Rectangle, RectangleGeometry, - ClearCommand, - EllipsoidSurfaceAppearance, MaterialAppearance, PolylineCollection, Primitive, diff --git a/Specs/Scene/ModelSpec.js b/Specs/Scene/ModelSpec.js index 444c9a9d1137..a7ad11f11fa2 100644 --- a/Specs/Scene/ModelSpec.js +++ b/Specs/Scene/ModelSpec.js @@ -7,7 +7,6 @@ defineSuite([ 'Core/CesiumTerrainProvider', 'Core/clone', 'Core/combine', - 'Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/DistanceDisplayCondition', @@ -39,7 +38,6 @@ defineSuite([ CesiumTerrainProvider, clone, combine, - defaultValue, defined, defineProperties, DistanceDisplayCondition, diff --git a/Specs/Scene/MoonSpec.js b/Specs/Scene/MoonSpec.js index e38e521411c5..a743dfe7ec6c 100644 --- a/Specs/Scene/MoonSpec.js +++ b/Specs/Scene/MoonSpec.js @@ -2,24 +2,20 @@ defineSuite([ 'Scene/Moon', 'Core/BoundingSphere', - 'Core/Cartesian3', 'Core/Color', 'Core/defined', 'Core/Ellipsoid', 'Core/Matrix3', - 'Core/Matrix4', 'Core/Simon1994PlanetaryPositions', 'Core/Transforms', 'Specs/createScene' ], function( Moon, BoundingSphere, - Cartesian3, Color, defined, Ellipsoid, Matrix3, - Matrix4, Simon1994PlanetaryPositions, Transforms, createScene) { diff --git a/Specs/Scene/PerInstanceColorAppearanceSpec.js b/Specs/Scene/PerInstanceColorAppearanceSpec.js index db0352c87045..4c87261aa69d 100644 --- a/Specs/Scene/PerInstanceColorAppearanceSpec.js +++ b/Specs/Scene/PerInstanceColorAppearanceSpec.js @@ -5,7 +5,6 @@ defineSuite([ 'Core/GeometryInstance', 'Core/Rectangle', 'Core/RectangleGeometry', - 'Renderer/ClearCommand', 'Scene/Appearance', 'Scene/Primitive', 'Specs/createScene' @@ -15,7 +14,6 @@ defineSuite([ GeometryInstance, Rectangle, RectangleGeometry, - ClearCommand, Appearance, Primitive, createScene) { diff --git a/Specs/Scene/PickSpec.js b/Specs/Scene/PickSpec.js index ee2e62e6d99f..4f462a08243f 100644 --- a/Specs/Scene/PickSpec.js +++ b/Specs/Scene/PickSpec.js @@ -1,34 +1,26 @@ /*global defineSuite*/ defineSuite([ 'Core/Cartesian2', - 'Core/Cartesian3', - 'Core/Ellipsoid', 'Core/FeatureDetection', 'Core/GeometryInstance', 'Core/Math', - 'Core/Matrix4', 'Core/Rectangle', 'Core/RectangleGeometry', 'Core/ShowGeometryInstanceAttribute', 'Scene/EllipsoidSurfaceAppearance', - 'Scene/OrthographicFrustum', 'Scene/PerspectiveFrustum', 'Scene/Primitive', 'Scene/SceneMode', 'Specs/createScene' ], 'Scene/Pick', function( Cartesian2, - Cartesian3, - Ellipsoid, FeatureDetection, GeometryInstance, CesiumMath, - Matrix4, Rectangle, RectangleGeometry, ShowGeometryInstanceAttribute, EllipsoidSurfaceAppearance, - OrthographicFrustum, PerspectiveFrustum, Primitive, SceneMode, diff --git a/Specs/Scene/PointPrimitiveCollectionSpec.js b/Specs/Scene/PointPrimitiveCollectionSpec.js index ef8f95a99aaa..521c33a6d4d4 100644 --- a/Specs/Scene/PointPrimitiveCollectionSpec.js +++ b/Specs/Scene/PointPrimitiveCollectionSpec.js @@ -10,7 +10,6 @@ defineSuite([ 'Core/Math', 'Core/NearFarScalar', 'Core/Rectangle', - 'Scene/OrthographicFrustum', 'Scene/PointPrimitive', 'Specs/createScene' ], function( @@ -24,7 +23,6 @@ defineSuite([ CesiumMath, NearFarScalar, Rectangle, - OrthographicFrustum, PointPrimitive, createScene) { 'use strict'; diff --git a/Specs/Scene/PrimitiveCollectionSpec.js b/Specs/Scene/PrimitiveCollectionSpec.js index 5f68ce96c6ee..d1495de85684 100644 --- a/Specs/Scene/PrimitiveCollectionSpec.js +++ b/Specs/Scene/PrimitiveCollectionSpec.js @@ -1,13 +1,10 @@ /*global defineSuite*/ defineSuite([ 'Scene/PrimitiveCollection', - 'Core/Cartesian3', 'Core/ColorGeometryInstanceAttribute', 'Core/defaultValue', 'Core/defined', 'Core/GeometryInstance', - 'Core/Math', - 'Core/Matrix4', 'Core/Rectangle', 'Core/RectangleGeometry', 'Scene/HorizontalOrigin', @@ -18,13 +15,10 @@ defineSuite([ 'Specs/createScene' ], function( PrimitiveCollection, - Cartesian3, ColorGeometryInstanceAttribute, defaultValue, defined, GeometryInstance, - CesiumMath, - Matrix4, Rectangle, RectangleGeometry, HorizontalOrigin, diff --git a/Specs/Scene/PrimitiveCullingSpec.js b/Specs/Scene/PrimitiveCullingSpec.js index f295209e315e..0adeeeaf5b9c 100644 --- a/Specs/Scene/PrimitiveCullingSpec.js +++ b/Specs/Scene/PrimitiveCullingSpec.js @@ -1,70 +1,44 @@ /*global defineSuite*/ defineSuite([ - 'Core/BoundingSphere', - 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Color', 'Core/ColorGeometryInstanceAttribute', 'Core/defaultValue', - 'Core/Ellipsoid', 'Core/GeometryInstance', 'Core/loadImage', - 'Core/Math', - 'Core/Occluder', - 'Core/PolygonGeometry', 'Core/Rectangle', 'Core/RectangleGeometry', 'Core/Transforms', - 'Renderer/Sampler', - 'Renderer/TextureMagnificationFilter', - 'Renderer/TextureMinificationFilter', 'Scene/BillboardCollection', - 'Scene/EllipsoidSurfaceAppearance', 'Scene/Globe', 'Scene/HorizontalOrigin', 'Scene/LabelCollection', 'Scene/Material', - 'Scene/OrthographicFrustum', 'Scene/PerInstanceColorAppearance', 'Scene/PolylineCollection', 'Scene/Primitive', - 'Scene/PrimitiveCollection', 'Scene/SceneMode', - 'Scene/TextureAtlas', 'Scene/VerticalOrigin', 'Specs/createScene' ], 'Scene/PrimitiveCulling', function( - BoundingSphere, - Cartesian2, Cartesian3, Color, ColorGeometryInstanceAttribute, defaultValue, - Ellipsoid, GeometryInstance, loadImage, - CesiumMath, - Occluder, - PolygonGeometry, Rectangle, RectangleGeometry, Transforms, - Sampler, - TextureMagnificationFilter, - TextureMinificationFilter, BillboardCollection, - EllipsoidSurfaceAppearance, Globe, HorizontalOrigin, LabelCollection, Material, - OrthographicFrustum, PerInstanceColorAppearance, PolylineCollection, Primitive, - PrimitiveCollection, SceneMode, - TextureAtlas, VerticalOrigin, createScene) { 'use strict'; diff --git a/Specs/Scene/PrimitiveSpec.js b/Specs/Scene/PrimitiveSpec.js index 6d491c2c00ea..10819409f2f6 100644 --- a/Specs/Scene/PrimitiveSpec.js +++ b/Specs/Scene/PrimitiveSpec.js @@ -21,12 +21,10 @@ defineSuite([ 'Core/PrimitiveType', 'Core/Rectangle', 'Core/RectangleGeometry', - 'Core/RuntimeError', 'Core/ShowGeometryInstanceAttribute', 'Core/Transforms', 'Scene/Camera', 'Scene/MaterialAppearance', - 'Scene/OrthographicFrustum', 'Scene/PerInstanceColorAppearance', 'Scene/SceneMode', 'Specs/BadGeometry', @@ -54,12 +52,10 @@ defineSuite([ PrimitiveType, Rectangle, RectangleGeometry, - RuntimeError, ShowGeometryInstanceAttribute, Transforms, Camera, MaterialAppearance, - OrthographicFrustum, PerInstanceColorAppearance, SceneMode, BadGeometry, diff --git a/Specs/Scene/ScreenSpaceCameraControllerSpec.js b/Specs/Scene/ScreenSpaceCameraControllerSpec.js index e1c42abae3fd..e5cca443b05d 100644 --- a/Specs/Scene/ScreenSpaceCameraControllerSpec.js +++ b/Specs/Scene/ScreenSpaceCameraControllerSpec.js @@ -4,7 +4,6 @@ defineSuite([ 'Core/Cartesian2', 'Core/Cartesian3', 'Core/combine', - 'Core/defined', 'Core/Ellipsoid', 'Core/FeatureDetection', 'Core/GeographicProjection', @@ -26,7 +25,6 @@ defineSuite([ Cartesian2, Cartesian3, combine, - defined, Ellipsoid, FeatureDetection, GeographicProjection, diff --git a/Specs/Scene/SkyAtmosphereSpec.js b/Specs/Scene/SkyAtmosphereSpec.js index d2b61728dc20..6e6121e261a8 100644 --- a/Specs/Scene/SkyAtmosphereSpec.js +++ b/Specs/Scene/SkyAtmosphereSpec.js @@ -4,7 +4,6 @@ defineSuite([ 'Core/Cartesian3', 'Core/Ellipsoid', 'Core/Math', - 'Renderer/ClearCommand', 'Scene/SceneMode', 'Specs/createScene' ], function( @@ -12,7 +11,6 @@ defineSuite([ Cartesian3, Ellipsoid, CesiumMath, - ClearCommand, SceneMode, createScene) { 'use strict'; diff --git a/Specs/Scene/SkyBoxSpec.js b/Specs/Scene/SkyBoxSpec.js index a109d5ed20d0..de55582f714f 100644 --- a/Specs/Scene/SkyBoxSpec.js +++ b/Specs/Scene/SkyBoxSpec.js @@ -1,16 +1,12 @@ /*global defineSuite*/ defineSuite([ 'Scene/SkyBox', - 'Core/Cartesian3', 'Core/loadImage', - 'Renderer/ClearCommand', 'Scene/SceneMode', 'Specs/createScene' ], function( SkyBox, - Cartesian3, loadImage, - ClearCommand, SceneMode, createScene) { 'use strict'; diff --git a/Specs/Scene/SunSpec.js b/Specs/Scene/SunSpec.js index 135e892f63dc..06b2a5693047 100644 --- a/Specs/Scene/SunSpec.js +++ b/Specs/Scene/SunSpec.js @@ -2,21 +2,15 @@ defineSuite([ 'Scene/Sun', 'Core/BoundingSphere', - 'Core/Cartesian3', 'Core/Color', - 'Core/Ellipsoid', 'Core/Math', - 'Core/Matrix4', 'Scene/SceneMode', 'Specs/createScene' ], function( Sun, BoundingSphere, - Cartesian3, Color, - Ellipsoid, CesiumMath, - Matrix4, SceneMode, createScene) { 'use strict'; diff --git a/Specs/Scene/TileCoordinatesImageryProviderSpec.js b/Specs/Scene/TileCoordinatesImageryProviderSpec.js index 82bfeea7559c..e6f4b954cf34 100644 --- a/Specs/Scene/TileCoordinatesImageryProviderSpec.js +++ b/Specs/Scene/TileCoordinatesImageryProviderSpec.js @@ -1,7 +1,6 @@ /*global defineSuite*/ defineSuite([ 'Scene/TileCoordinatesImageryProvider', - 'Core/defined', 'Core/Ellipsoid', 'Core/GeographicTilingScheme', 'Core/WebMercatorTilingScheme', @@ -10,7 +9,6 @@ defineSuite([ 'ThirdParty/when' ], function( TileCoordinatesImageryProvider, - defined, Ellipsoid, GeographicTilingScheme, WebMercatorTilingScheme, diff --git a/Specs/Scene/ViewportQuadSpec.js b/Specs/Scene/ViewportQuadSpec.js index ba5311e8fa3e..7184e72cf57f 100644 --- a/Specs/Scene/ViewportQuadSpec.js +++ b/Specs/Scene/ViewportQuadSpec.js @@ -4,7 +4,6 @@ defineSuite([ 'Core/BoundingRectangle', 'Core/Color', 'Core/loadImage', - 'Renderer/ClearCommand', 'Renderer/Texture', 'Scene/Material', 'Specs/createScene', @@ -14,7 +13,6 @@ defineSuite([ BoundingRectangle, Color, loadImage, - ClearCommand, Texture, Material, createScene, diff --git a/Specs/Scene/WebMapServiceImageryProviderSpec.js b/Specs/Scene/WebMapServiceImageryProviderSpec.js index b5f30a7ddb34..462499999dbc 100644 --- a/Specs/Scene/WebMapServiceImageryProviderSpec.js +++ b/Specs/Scene/WebMapServiceImageryProviderSpec.js @@ -3,7 +3,6 @@ defineSuite([ 'Scene/WebMapServiceImageryProvider', 'Core/Cartographic', 'Core/DefaultProxy', - 'Core/defined', 'Core/Ellipsoid', 'Core/GeographicTilingScheme', 'Core/loadImage', @@ -19,13 +18,11 @@ defineSuite([ 'Scene/ImageryProvider', 'Scene/ImageryState', 'Specs/pollToPromise', - 'ThirdParty/Uri', - 'ThirdParty/when' + 'ThirdParty/Uri' ], function( WebMapServiceImageryProvider, Cartographic, DefaultProxy, - defined, Ellipsoid, GeographicTilingScheme, loadImage, @@ -41,8 +38,7 @@ defineSuite([ ImageryProvider, ImageryState, pollToPromise, - Uri, - when) { + Uri) { 'use strict'; afterEach(function() { diff --git a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js index 8dea133eea30..078a18542a65 100644 --- a/Specs/Scene/WebMapTileServiceImageryProviderSpec.js +++ b/Specs/Scene/WebMapTileServiceImageryProviderSpec.js @@ -3,7 +3,6 @@ defineSuite([ 'Scene/WebMapTileServiceImageryProvider', 'Core/Credit', 'Core/DefaultProxy', - 'Core/defined', 'Core/GeographicTilingScheme', 'Core/loadImage', 'Core/queryToObject', @@ -18,7 +17,6 @@ defineSuite([ WebMapTileServiceImageryProvider, Credit, DefaultProxy, - defined, GeographicTilingScheme, loadImage, queryToObject, diff --git a/Specs/Scene/createOpenStreetMapImageryProviderSpec.js b/Specs/Scene/createOpenStreetMapImageryProviderSpec.js index 94c79e28f307..77800b4d2983 100644 --- a/Specs/Scene/createOpenStreetMapImageryProviderSpec.js +++ b/Specs/Scene/createOpenStreetMapImageryProviderSpec.js @@ -8,7 +8,6 @@ defineSuite([ 'Core/WebMercatorTilingScheme', 'Scene/Imagery', 'Scene/ImageryLayer', - 'Scene/ImageryProvider', 'Scene/ImageryState', 'Scene/UrlTemplateImageryProvider', 'Specs/pollToPromise' @@ -21,7 +20,6 @@ defineSuite([ WebMercatorTilingScheme, Imagery, ImageryLayer, - ImageryProvider, ImageryState, UrlTemplateImageryProvider, pollToPromise) { diff --git a/Specs/Widgets/CesiumInspector/CesiumInspectorViewModelSpec.js b/Specs/Widgets/CesiumInspector/CesiumInspectorViewModelSpec.js index b74b124d4166..943895de0fc1 100644 --- a/Specs/Widgets/CesiumInspector/CesiumInspectorViewModelSpec.js +++ b/Specs/Widgets/CesiumInspector/CesiumInspectorViewModelSpec.js @@ -10,7 +10,6 @@ defineSuite([ 'Scene/EllipsoidSurfaceAppearance', 'Scene/Globe', 'Scene/GlobeSurfaceTile', - 'Scene/Material', 'Scene/Primitive', 'Scene/QuadtreeTile', 'Specs/createScene' @@ -25,7 +24,6 @@ defineSuite([ EllipsoidSurfaceAppearance, Globe, GlobeSurfaceTile, - Material, Primitive, QuadtreeTile, createScene) { diff --git a/Specs/Widgets/InfoBox/InfoBoxViewModelSpec.js b/Specs/Widgets/InfoBox/InfoBoxViewModelSpec.js index 2b4add7e8474..e269a982f702 100644 --- a/Specs/Widgets/InfoBox/InfoBoxViewModelSpec.js +++ b/Specs/Widgets/InfoBox/InfoBoxViewModelSpec.js @@ -1,10 +1,8 @@ /*global defineSuite*/ defineSuite([ - 'Widgets/InfoBox/InfoBoxViewModel', - 'Specs/pollToPromise' + 'Widgets/InfoBox/InfoBoxViewModel' ], function( - InfoBoxViewModel, - pollToPromise) { + InfoBoxViewModel) { 'use strict'; it('constructor sets expected values', function() { diff --git a/Specs/Widgets/SvgPathBindingHandlerSpec.js b/Specs/Widgets/SvgPathBindingHandlerSpec.js index e84f49cb8367..b1014541e0c8 100644 --- a/Specs/Widgets/SvgPathBindingHandlerSpec.js +++ b/Specs/Widgets/SvgPathBindingHandlerSpec.js @@ -1,9 +1,7 @@ /*global defineSuite*/ defineSuite([ - 'Widgets/SvgPathBindingHandler', 'ThirdParty/knockout' ], function( - SvgPathBindingHandler, knockout) { 'use strict'; diff --git a/Specs/Widgets/Viewer/ViewerSpec.js b/Specs/Widgets/Viewer/ViewerSpec.js index 5fd773162693..a5fbed70cfa6 100644 --- a/Specs/Widgets/Viewer/ViewerSpec.js +++ b/Specs/Widgets/Viewer/ViewerSpec.js @@ -1,6 +1,5 @@ /*global defineSuite*/ defineSuite([ - 'Widgets/Viewer/Viewer', 'Core/Cartesian3', 'Core/ClockRange', 'Core/ClockStep', @@ -35,7 +34,6 @@ defineSuite([ 'Widgets/SelectionIndicator/SelectionIndicator', 'Widgets/Timeline/Timeline' ], function( - Viewer, Cartesian3, ClockRange, ClockStep, diff --git a/Specs/createPackableArraySpecs.js b/Specs/createPackableArraySpecs.js index 47cd53a4c88e..2ea31b3fedc9 100644 --- a/Specs/createPackableArraySpecs.js +++ b/Specs/createPackableArraySpecs.js @@ -1,10 +1,8 @@ /*global define*/ define([ - 'Core/defaultValue', - 'Core/defined' + 'Core/defaultValue' ], function( - defaultValue, - defined) { + defaultValue) { 'use strict'; function createPackableArraySpecs(packable, unpackedArray, packedArray, namePrefix) { diff --git a/Specs/createScene.js b/Specs/createScene.js index 09111123dfbf..bbb1d7e7009f 100644 --- a/Specs/createScene.js +++ b/Specs/createScene.js @@ -4,7 +4,6 @@ define([ 'Core/clone', 'Core/defaultValue', 'Core/defined', - 'Core/queryToObject', 'Scene/Scene', 'Specs/createCanvas', 'Specs/destroyCanvas' @@ -13,7 +12,6 @@ define([ clone, defaultValue, defined, - queryToObject, Scene, createCanvas, destroyCanvas) { diff --git a/Specs/render.js b/Specs/render.js index b769b1e485ec..ed2caf3d0346 100644 --- a/Specs/render.js +++ b/Specs/render.js @@ -1,12 +1,10 @@ /*global define*/ define([ - 'Core/defaultValue', 'Core/defined', 'Core/Intersect', 'Scene/Pass', 'Scene/SceneMode' ], function( - defaultValue, defined, Intersect, Pass, From 3550a1fa150dddd2e47040835f80e339efe27cd8 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Tue, 22 Nov 2016 12:07:56 -0500 Subject: [PATCH 39/49] Billboard halfsize must be computed after compressedAttributes. Compressed vertex attributes must be integers. Billboard halfSize is needed for computing the distance from the center of the billboard out to one of the corners. But the half-size can have a .5 fractional component, from the least significant bit of the original billboard size. So this 0.5 must be computed after the compressed vertex attribute has already been unpacked. --- Source/Scene/BillboardCollection.js | 4 ++-- Source/Shaders/BillboardCollectionVS.glsl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Scene/BillboardCollection.js b/Source/Scene/BillboardCollection.js index 78836da2f652..6a09335c9654 100644 --- a/Source/Scene/BillboardCollection.js +++ b/Source/Scene/BillboardCollection.js @@ -915,7 +915,7 @@ define([ } var textureWidth = billboardCollection._textureAtlas.texture.width; - var imageWidth = Math.ceil(defaultValue(billboard.width, textureWidth * width) * 0.5); + var imageWidth = Math.round(defaultValue(billboard.width, textureWidth * width)); billboardCollection._maxSize = Math.max(billboardCollection._maxSize, imageWidth); var compressed0 = CesiumMath.clamp(imageWidth, 0.0, LEFT_SHIFT16); @@ -970,7 +970,7 @@ define([ } var dimensions = billboardCollection._textureAtlas.texture.dimensions; - var imageHeight = Math.ceil(defaultValue(billboard.height, dimensions.y * height) * 0.5); + var imageHeight = Math.round(defaultValue(billboard.height, dimensions.y * height)); billboardCollection._maxSize = Math.max(billboardCollection._maxSize, imageHeight); var red = Color.floatToByte(color.red); diff --git a/Source/Shaders/BillboardCollectionVS.glsl b/Source/Shaders/BillboardCollectionVS.glsl index 232661ddb6eb..3469a2165be4 100644 --- a/Source/Shaders/BillboardCollectionVS.glsl +++ b/Source/Shaders/BillboardCollectionVS.glsl @@ -38,7 +38,7 @@ const float SHIFT_RIGHT1 = 1.0 / 2.0; vec4 computePositionWindowCoordinates(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters) { - vec2 halfSize = imageSize * scale * czm_resolutionScale; + vec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5; halfSize *= ((direction * 2.0) - 1.0); vec2 originTranslate = origin * abs(halfSize); From 79a196297c357520ecee6c8f791a10826f893af2 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Mon, 21 Nov 2016 13:09:00 -0500 Subject: [PATCH 40/49] Change Billboard depth function from LESS to LEQUAL. --- CHANGES.md | 1 + Source/Scene/BillboardCollection.js | 5 ++++- Source/Scene/PointPrimitiveCollection.js | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b6b5b82dd5a3..c7beedadb6b5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Change Log * Breaking changes * * Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. This results in a 25% reduction in load times in many cases. +* Billboard depth testing changed from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap. * Added support for saving html and css in Github Gists. [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125) * Fixed `Cartographic.fromCartesian` when the cartesian is not on the ellipsoid surface. [#4611](https://github.com/AnalyticalGraphicsInc/cesium/issues/4611) diff --git a/Source/Scene/BillboardCollection.js b/Source/Scene/BillboardCollection.js index 6a09335c9654..34370f8819de 100644 --- a/Source/Scene/BillboardCollection.js +++ b/Source/Scene/BillboardCollection.js @@ -22,6 +22,7 @@ define([ '../Renderer/ShaderProgram', '../Renderer/ShaderSource', '../Renderer/VertexArrayFacade', + '../Renderer/WebGLConstants', '../Shaders/BillboardCollectionFS', '../Shaders/BillboardCollectionVS', './Billboard', @@ -55,6 +56,7 @@ define([ ShaderProgram, ShaderSource, VertexArrayFacade, + WebGLConstants, BillboardCollectionFS, BillboardCollectionVS, Billboard, @@ -1424,7 +1426,8 @@ define([ if (!defined(this._rs)) { this._rs = RenderState.fromCache({ depthTest : { - enabled : true + enabled : true, + func : WebGLConstants.LEQUAL // Allows label glyphs and billboards to overlap. }, blending : BlendingState.ALPHA_BLEND }); diff --git a/Source/Scene/PointPrimitiveCollection.js b/Source/Scene/PointPrimitiveCollection.js index 1d4a241b7dc4..e241049c4b3c 100644 --- a/Source/Scene/PointPrimitiveCollection.js +++ b/Source/Scene/PointPrimitiveCollection.js @@ -21,6 +21,7 @@ define([ '../Renderer/ShaderProgram', '../Renderer/ShaderSource', '../Renderer/VertexArrayFacade', + '../Renderer/WebGLConstants', '../Shaders/PointPrimitiveCollectionFS', '../Shaders/PointPrimitiveCollectionVS', './BlendingState', @@ -49,6 +50,7 @@ define([ ShaderProgram, ShaderSource, VertexArrayFacade, + WebGLConstants, PointPrimitiveCollectionFS, PointPrimitiveCollectionVS, BlendingState, @@ -852,7 +854,8 @@ define([ if (!defined(this._rs)) { this._rs = RenderState.fromCache({ depthTest : { - enabled : true + enabled : true, + func : WebGLConstants.LEQUAL }, blending : BlendingState.ALPHA_BLEND }); From eeb284c149a81a7b80bde28117ca17a0328afde1 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Tue, 22 Nov 2016 12:11:15 -0500 Subject: [PATCH 41/49] Apply textureAtlas border to the outer edges of atlas. Previously, it was only applied between textures within the interior of the atlas, not on the lower and left sides. It was effectively applied on the upper and right sides, since each interior texture has its own border on the upper and right sides. --- Source/Scene/TextureAtlas.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Source/Scene/TextureAtlas.js b/Source/Scene/TextureAtlas.js index adf579f2c555..5fc494f86d91 100644 --- a/Source/Scene/TextureAtlas.js +++ b/Source/Scene/TextureAtlas.js @@ -171,18 +171,19 @@ define([ var context = textureAtlas._context; var numImages = textureAtlas.numberOfImages; var scalingFactor = 2.0; + var borderWidthInPixels = textureAtlas._borderWidthInPixels; if (numImages > 0) { var oldAtlasWidth = textureAtlas._texture.width; var oldAtlasHeight = textureAtlas._texture.height; - var atlasWidth = scalingFactor * (oldAtlasWidth + image.width + textureAtlas._borderWidthInPixels); - var atlasHeight = scalingFactor * (oldAtlasHeight + image.height + textureAtlas._borderWidthInPixels); + var atlasWidth = scalingFactor * (oldAtlasWidth + image.width + borderWidthInPixels); + var atlasHeight = scalingFactor * (oldAtlasHeight + image.height + borderWidthInPixels); var widthRatio = oldAtlasWidth / atlasWidth; var heightRatio = oldAtlasHeight / atlasHeight; // Create new node structure, putting the old root node in the bottom left. - var nodeBottomRight = new TextureAtlasNode(new Cartesian2(oldAtlasWidth + textureAtlas._borderWidthInPixels, 0.0), new Cartesian2(atlasWidth, oldAtlasHeight)); + var nodeBottomRight = new TextureAtlasNode(new Cartesian2(oldAtlasWidth + borderWidthInPixels, borderWidthInPixels), new Cartesian2(atlasWidth, oldAtlasHeight)); var nodeBottomHalf = new TextureAtlasNode(new Cartesian2(), new Cartesian2(atlasWidth, oldAtlasHeight), textureAtlas._root, nodeBottomRight); - var nodeTopHalf = new TextureAtlasNode(new Cartesian2(0.0, oldAtlasHeight + textureAtlas._borderWidthInPixels), new Cartesian2(atlasWidth, atlasHeight)); + var nodeTopHalf = new TextureAtlasNode(new Cartesian2(borderWidthInPixels, oldAtlasHeight + borderWidthInPixels), new Cartesian2(atlasWidth, atlasHeight)); var nodeMain = new TextureAtlasNode(new Cartesian2(), new Cartesian2(atlasWidth, atlasHeight), nodeBottomHalf, nodeTopHalf); // Resize texture coordinates. @@ -219,8 +220,8 @@ define([ textureAtlas._root = nodeMain; } else { // First image exceeds initialSize - var initialWidth = scalingFactor * (image.width + textureAtlas._borderWidthInPixels); - var initialHeight = scalingFactor * (image.height + textureAtlas._borderWidthInPixels); + var initialWidth = scalingFactor * (image.width + 2 * borderWidthInPixels); + var initialHeight = scalingFactor * (image.height + 2 * borderWidthInPixels); if(initialWidth < textureAtlas._initialSize.x) { initialWidth = textureAtlas._initialSize.x; } @@ -234,7 +235,8 @@ define([ height : initialHeight, pixelFormat : textureAtlas._pixelFormat }); - textureAtlas._root = new TextureAtlasNode(new Cartesian2(), new Cartesian2(initialWidth, initialHeight)); + textureAtlas._root = new TextureAtlasNode(new Cartesian2(borderWidthInPixels, borderWidthInPixels), + new Cartesian2(initialWidth, initialHeight)); } } @@ -457,7 +459,7 @@ define([ * * @example * atlas = atlas && atlas.destroy(); - * + * * @see TextureAtlas#isDestroyed */ TextureAtlas.prototype.destroy = function() { From 3703161da5421848e2c04a97ac864e35dce9150b Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Tue, 22 Nov 2016 14:47:39 -0500 Subject: [PATCH 42/49] Update tests to account for new padding in TextureAtlas. --- Specs/Data/Images/Blue2x2.png | Bin 0 -> 888 bytes Specs/Data/Images/Green2x2.png | Bin 0 -> 119 bytes Specs/Data/Images/White2x2.png | Bin 0 -> 119 bytes Specs/Scene/BillboardCollectionSpec.js | 18 +++++++------- Specs/Scene/TextureAtlasSpec.js | 32 ++++++++++++------------- 5 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 Specs/Data/Images/Blue2x2.png create mode 100644 Specs/Data/Images/Green2x2.png create mode 100644 Specs/Data/Images/White2x2.png diff --git a/Specs/Data/Images/Blue2x2.png b/Specs/Data/Images/Blue2x2.png new file mode 100644 index 0000000000000000000000000000000000000000..e604f8cbee004d7f9bd12deedd42c6c5a29bbc87 GIT binary patch literal 888 zcmeAS@N?(olHy`uVBq!ia0vp^Od!m`3?yAM{)#a$Ff#=Bgt#&={0EARg3%BdnIUl8 zI4cV1bIt;f$YKTtZeb8+WSBKa0w~B{;_2(k{(xIdm`%-zb-NN!h}+Y}F@)oKasmS* Y0|OfaW7?OKIY40sPgg&ebxsLQ0I|#$&j0`b literal 0 HcmV?d00001 diff --git a/Specs/Data/Images/Green2x2.png b/Specs/Data/Images/Green2x2.png new file mode 100644 index 0000000000000000000000000000000000000000..2247add0559e909a0711f09cbf954b4e68b6d161 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^Od!kwBL7~QRScv!3p^r$G`BDaGcwGYBLNg-FY)ws zWq-geCd_IvS^Z`cP)N+v#W95AdUDE-^9O+72#7eqz`!HN$n3fzW)n~agQu&X%Q~lo FCIHSE9_au8 literal 0 HcmV?d00001 diff --git a/Specs/Data/Images/White2x2.png b/Specs/Data/Images/White2x2.png new file mode 100644 index 0000000000000000000000000000000000000000..7ea0256ddd340f0b4e373d92a7fa9dabd0e5003f GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^Od!kwBL7~QRScv!3p^r$G`BDaGcwGYBLNg-FY)ws zWq-geCd|dXI)6ztP)N+v#W95Adh(zD|LvKXnT3HE2pCk@m>KuVJ>CUW!QkoY=d#Wz Gp$Pye#2ESj literal 0 HcmV?d00001 diff --git a/Specs/Scene/BillboardCollectionSpec.js b/Specs/Scene/BillboardCollectionSpec.js index c953eb6e1625..cf768ef2b629 100644 --- a/Specs/Scene/BillboardCollectionSpec.js +++ b/Specs/Scene/BillboardCollectionSpec.js @@ -73,13 +73,13 @@ defineSuite([ camera = scene.camera; return when.join( - loadImage('./Data/Images/Green.png').then(function(result) { + loadImage('./Data/Images/Green2x2.png').then(function(result) { greenImage = result; }), - loadImage('./Data/Images/Blue.png').then(function(result) { + loadImage('./Data/Images/Blue2x2.png').then(function(result) { blueImage = result; }), - loadImage('./Data/Images/White.png').then(function(result) { + loadImage('./Data/Images/White2x2.png').then(function(result) { whiteImage = result; }), loadImage('./Data/Images/Blue10x10.png').then(function(result) { @@ -1438,11 +1438,11 @@ defineSuite([ scene.renderForSpecs(); var one = billboards.add({ - image : './Data/Images/Green.png' + image : './Data/Images/Green2x2.png' }); expect(one.ready).toEqual(false); - expect(one.image).toEqual('./Data/Images/Green.png'); + expect(one.image).toEqual('./Data/Images/Green2x2.png'); return pollToPromise(function() { return one.ready; @@ -1501,18 +1501,18 @@ defineSuite([ scene.renderForSpecs(); var one = billboards.add({ - image : './Data/Images/Green.png' + image : './Data/Images/Green2x2.png' }); expect(one.ready).toEqual(false); - expect(one.image).toEqual('./Data/Images/Green.png'); + expect(one.image).toEqual('./Data/Images/Green2x2.png'); return pollToPromise(function() { return one.ready; }).then(function() { expect(scene.renderForSpecs()).toEqual([0, 255, 0, 255]); - one.image = './Data/Images/Green.png'; + one.image = './Data/Images/Green2x2.png'; expect(one.ready).toEqual(true); expect(scene.renderForSpecs()).toEqual([0, 255, 0, 255]); @@ -1571,7 +1571,7 @@ defineSuite([ var one = billboards.add({ image : './Data/Images/Red16x16.png', - imageSubRegion : new BoundingRectangle(0.0, 0.0, 1.0, 2.0) + imageSubRegion : new BoundingRectangle(0.0, 0.0, 2.0, 3.0) }); expect(one.ready).toEqual(false); diff --git a/Specs/Scene/TextureAtlasSpec.js b/Specs/Scene/TextureAtlasSpec.js index 2d2a81c164aa..d4bff44d253d 100644 --- a/Specs/Scene/TextureAtlasSpec.js +++ b/Specs/Scene/TextureAtlasSpec.js @@ -194,8 +194,8 @@ void main() {\n\ expect(texture.height).toEqual(atlasHeight); var coords = atlas.textureCoordinates[index]; - expect(coords.x).toEqual(0.0 / atlasWidth); - expect(coords.y).toEqual(0.0 / atlasHeight); + expect(coords.x).toEqual(1.0 / atlasWidth); + expect(coords.y).toEqual(1.0 / atlasHeight); expect(coords.width).toEqual(1.0 / atlasWidth); expect(coords.height).toEqual(1.0 / atlasHeight); }); @@ -383,23 +383,23 @@ void main() {\n\ expect(texture.width).toEqual(atlasWidth); expect(texture.height).toEqual(atlasHeight); - expect(c0.x).toEqualEpsilon(0.0 / atlasWidth, CesiumMath.EPSILON16); - expect(c0.y).toEqualEpsilon(0.0 / atlasHeight, CesiumMath.EPSILON16); + expect(c0.x).toEqualEpsilon(2.0 / atlasWidth, CesiumMath.EPSILON16); + expect(c0.y).toEqualEpsilon(2.0 / atlasHeight, CesiumMath.EPSILON16); expect(c0.width).toEqualEpsilon(greenImage.width / atlasWidth, CesiumMath.EPSILON16); expect(c0.height).toEqualEpsilon(greenImage.height / atlasHeight, CesiumMath.EPSILON16); - expect(c1.x).toEqualEpsilon((greenImage.width + atlas.borderWidthInPixels) / atlasWidth, CesiumMath.EPSILON16); - expect(c1.y).toEqualEpsilon(0.0 / atlasHeight, CesiumMath.EPSILON16); + expect(c1.x).toEqualEpsilon((greenImage.width + 2 * atlas.borderWidthInPixels) / atlasWidth, CesiumMath.EPSILON16); + expect(c1.y).toEqualEpsilon(2.0 / atlasHeight, CesiumMath.EPSILON16); expect(c1.width).toEqualEpsilon(blueImage.width / atlasWidth, CesiumMath.EPSILON16); expect(c1.height).toEqualEpsilon(blueImage.width / atlasHeight, CesiumMath.EPSILON16); - expect(c2.x).toEqualEpsilon((bigRedImage.width + atlas.borderWidthInPixels) / atlasWidth, CesiumMath.EPSILON16); - expect(c2.y).toEqualEpsilon(0.0 / atlasHeight, CesiumMath.EPSILON16); + expect(c2.x).toEqualEpsilon(2.0 / atlasWidth, CesiumMath.EPSILON16); + expect(c2.y).toEqualEpsilon((bigRedImage.height + atlas.borderWidthInPixels) / atlasHeight, CesiumMath.EPSILON16); expect(c2.width).toEqualEpsilon(bigRedImage.width / atlasWidth, CesiumMath.EPSILON16); expect(c2.height).toEqualEpsilon(bigRedImage.height / atlasHeight, CesiumMath.EPSILON16); - expect(c3.x).toEqualEpsilon(0.0 / atlasWidth, CesiumMath.EPSILON16); - expect(c3.y).toEqualEpsilon((greenImage.height + atlas.borderWidthInPixels) / atlasHeight, CesiumMath.EPSILON16); + expect(c3.x).toEqualEpsilon(2.0 / atlasWidth, CesiumMath.EPSILON16); + expect(c3.y).toEqualEpsilon((greenImage.height + 2 * atlas.borderWidthInPixels) / atlasHeight, CesiumMath.EPSILON16); expect(c3.width).toEqualEpsilon(bigBlueImage.width / atlasWidth, CesiumMath.EPSILON16); expect(c3.height).toEqualEpsilon(bigBlueImage.height / atlasHeight, CesiumMath.EPSILON16); }); @@ -577,20 +577,20 @@ void main() {\n\ var texture = atlas.texture; var coordinates = atlas.textureCoordinates; - var atlasWidth = 6.0; - var atlasHeight = 6.0; + var atlasWidth = 10.0; + var atlasHeight = 10.0; expect(atlas.borderWidthInPixels).toEqual(2); expect(atlas.numberOfImages).toEqual(2); expect(texture.width).toEqual(atlasWidth); expect(texture.height).toEqual(atlasHeight); - expect(coordinates[greenIndex].x).toEqual(0.0 / atlasWidth); - expect(coordinates[greenIndex].y).toEqual(0.0 / atlasHeight); + expect(coordinates[greenIndex].x).toEqual(atlas.borderWidthInPixels / atlasWidth); + expect(coordinates[greenIndex].y).toEqual(atlas.borderWidthInPixels / atlasHeight); expect(coordinates[greenIndex].width).toEqual(1.0 / atlasWidth); expect(coordinates[greenIndex].height).toEqual(1.0 / atlasHeight); - expect(coordinates[blueIndex].x).toEqual(3.0 / atlasWidth); - expect(coordinates[blueIndex].y).toEqual(0.0 / atlasHeight); + expect(coordinates[blueIndex].x).toEqual(5.0 / atlasWidth); + expect(coordinates[blueIndex].y).toEqual(2.0 / atlasHeight); expect(coordinates[blueIndex].width).toEqual(1.0 / atlasWidth); expect(coordinates[blueIndex].height).toEqual(1.0 / atlasHeight); }); From 0ac1c5ddc5b803a9ed4816f37fe3afdbf8236079 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Tue, 22 Nov 2016 15:06:37 -0500 Subject: [PATCH 43/49] CHANGES.md and a typo. --- CHANGES.md | 3 +++ Source/Core/writeTextToCanvas.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index c7beedadb6b5..74abd62cc376 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,9 @@ Change Log * * Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. This results in a 25% reduction in load times in many cases. * Billboard depth testing changed from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap. +* Billboard sizes were incorrectly rounded up from odd values to even values. This has been corrected, and as a result, odd-width and odd-height billboards will appear one pixel smaller than before. +* Label glyph positions have been adjusted and corrected. +* `TextureAtlas.borderWidthInPixels` has always been applied to the upper and right edges of each internal texture, but is now also applied to the bottom and left edges of the entire TextureAtlas, guaranteeing borders on all sides regardless of position within the atlas. * Added support for saving html and css in Github Gists. [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125) * Fixed `Cartographic.fromCartesian` when the cartesian is not on the ellipsoid surface. [#4611](https://github.com/AnalyticalGraphicsInc/cesium/issues/4611) diff --git a/Source/Core/writeTextToCanvas.js b/Source/Core/writeTextToCanvas.js index 581757904556..16645a18a30f 100644 --- a/Source/Core/writeTextToCanvas.js +++ b/Source/Core/writeTextToCanvas.js @@ -93,7 +93,7 @@ define([ canvas.style.visibility = ''; //Some characters, such as the letter j, have a non-zero starting position. - //This value is used for kering later, but we need to take it into account + //This value is used for kerning later, but we need to take it into account //now in order to draw the text completely on the canvas var x = -dimensions.bounds.minx; From 455a04dac0ded863c1201f4726821e7072bc1a51 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Tue, 22 Nov 2016 15:23:16 -0500 Subject: [PATCH 44/49] Fix missing padding caught by unit test. --- Source/Core/writeTextToCanvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/writeTextToCanvas.js b/Source/Core/writeTextToCanvas.js index 16645a18a30f..c54ee0feaf90 100644 --- a/Source/Core/writeTextToCanvas.js +++ b/Source/Core/writeTextToCanvas.js @@ -98,12 +98,12 @@ define([ var x = -dimensions.bounds.minx; //Expand the width to include the starting position. - var width = Math.ceil(dimensions.width) + x; + var width = Math.ceil(dimensions.width) + x + doublePadding; //While the height of the letter is correct, we need to adjust //where we start drawing it so that letters like j and y properly dip //below the line. - var height = dimensions.height + padding; + var height = dimensions.height + doublePadding; var baseline = height - dimensions.ascent + doublePadding; var y = height - baseline + doublePadding; From 8a8799cd138c0ff91f715c30ceab92614d6c6ff4 Mon Sep 17 00:00:00 2001 From: Ed Mackey Date: Wed, 23 Nov 2016 15:14:52 -0500 Subject: [PATCH 45/49] Changes per review. --- CHANGES.md | 2 +- Source/Shaders/BillboardCollectionVS.glsl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 74abd62cc376..4e0d169780ac 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,7 @@ Change Log * Breaking changes * * Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. This results in a 25% reduction in load times in many cases. -* Billboard depth testing changed from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap. +* Billboard, Label, and PointPrimitive depth testing changed from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap. * Billboard sizes were incorrectly rounded up from odd values to even values. This has been corrected, and as a result, odd-width and odd-height billboards will appear one pixel smaller than before. * Label glyph positions have been adjusted and corrected. * `TextureAtlas.borderWidthInPixels` has always been applied to the upper and right edges of each internal texture, but is now also applied to the bottom and left edges of the entire TextureAtlas, guaranteeing borders on all sides regardless of position within the atlas. diff --git a/Source/Shaders/BillboardCollectionVS.glsl b/Source/Shaders/BillboardCollectionVS.glsl index 3469a2165be4..c56ebd30516c 100644 --- a/Source/Shaders/BillboardCollectionVS.glsl +++ b/Source/Shaders/BillboardCollectionVS.glsl @@ -38,6 +38,8 @@ const float SHIFT_RIGHT1 = 1.0 / 2.0; vec4 computePositionWindowCoordinates(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters) { + // Note the halfSize cannot be computed in JavaScript because it is sent via + // compressed vertex attributes that coerce it to an integer. vec2 halfSize = imageSize * scale * czm_resolutionScale * 0.5; halfSize *= ((direction * 2.0) - 1.0); From b6334df02d51fa20c9fea486e3d8639bd7c30d7c Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Wed, 23 Nov 2016 18:55:00 -0500 Subject: [PATCH 46/49] chore(package): update electron to version 1.4.9 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c6c0e004d41..be529e18447b 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2", - "electron": "1.4.7", + "electron": "1.4.9", "event-stream": "3.3.4", "express": "4.14.0", "globby": "6.1.0", From 5433a259564c041b367e8c3aa79d8bc2ccd5d5f9 Mon Sep 17 00:00:00 2001 From: hpinkos Date: Mon, 28 Nov 2016 15:29:37 -0500 Subject: [PATCH 47/49] remove trailing commas --- Source/DataSources/PolylineVolumeGeometryUpdater.js | 4 ++-- Source/DataSources/WallGeometryUpdater.js | 2 +- Specs/Scene/PolylineCollectionSpec.js | 4 ++-- Specs/Scene/PrimitiveSpec.js | 2 +- Specs/Scene/createTileMapServiceImageryProviderSpec.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/DataSources/PolylineVolumeGeometryUpdater.js b/Source/DataSources/PolylineVolumeGeometryUpdater.js index 0bff5eeba316..0de042792313 100644 --- a/Source/DataSources/PolylineVolumeGeometryUpdater.js +++ b/Source/DataSources/PolylineVolumeGeometryUpdater.js @@ -234,7 +234,7 @@ define([ * Gets the property specifying whether the geometry * casts or receives shadows from each light source. * @memberof PolylineVolumeGeometryUpdater.prototype - * + * * @type {Property} * @readonly */ @@ -359,7 +359,7 @@ define([ } else { attributes = { show : show, - distanceDisplayCondition : distanceDisplayConditionAttribute, + distanceDisplayCondition : distanceDisplayConditionAttribute }; } diff --git a/Source/DataSources/WallGeometryUpdater.js b/Source/DataSources/WallGeometryUpdater.js index f42c9d84282e..c0b9c0c8c560 100644 --- a/Source/DataSources/WallGeometryUpdater.js +++ b/Source/DataSources/WallGeometryUpdater.js @@ -361,7 +361,7 @@ define([ } else { attributes = { show : show, - distanceDisplayCondition : distanceDisplayConditionAttribute, + distanceDisplayCondition : distanceDisplayConditionAttribute }; } diff --git a/Specs/Scene/PolylineCollectionSpec.js b/Specs/Scene/PolylineCollectionSpec.js index 6a2cb9753638..6d388727df1a 100644 --- a/Specs/Scene/PolylineCollectionSpec.js +++ b/Specs/Scene/PolylineCollectionSpec.js @@ -373,11 +373,11 @@ defineSuite([ } polylines.add({ - positions : positions, + positions : positions }); polylines.add(); polylines.add({ - positions: positions, + positions: positions }); expect(scene.renderForSpecs()).toEqual([0, 0, 0, 255]); diff --git a/Specs/Scene/PrimitiveSpec.js b/Specs/Scene/PrimitiveSpec.js index 10819409f2f6..01d76d630de6 100644 --- a/Specs/Scene/PrimitiveSpec.js +++ b/Specs/Scene/PrimitiveSpec.js @@ -1031,7 +1031,7 @@ defineSuite([ positions : [] }), attributes : { - color : new ColorGeometryInstanceAttribute(1.0, 0.0, 1.0, 1.0), + color : new ColorGeometryInstanceAttribute(1.0, 0.0, 1.0, 1.0) }, id : 'invalid' })); diff --git a/Specs/Scene/createTileMapServiceImageryProviderSpec.js b/Specs/Scene/createTileMapServiceImageryProviderSpec.js index 22b6e9243bc9..cacd63f62166 100644 --- a/Specs/Scene/createTileMapServiceImageryProviderSpec.js +++ b/Specs/Scene/createTileMapServiceImageryProviderSpec.js @@ -263,7 +263,7 @@ defineSuite([ }); var provider = createTileMapServiceImageryProvider({ - url : 'server.invalid?query=1', + url : 'server.invalid?query=1' }); return requestMetadata.promise.then(function(url) { From c6faf4670f04bbd0b28563d7127e5eb9cef6501b Mon Sep 17 00:00:00 2001 From: Patrick Cozzi Date: Wed, 30 Nov 2016 10:13:18 -0500 Subject: [PATCH 48/49] Tweak CHANGES.md for 1.28 --- CHANGES.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4e0d169780ac..ff5137ed239f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,16 +2,14 @@ Change Log ========== ### 1.28 - 2016-12-01 -* Deprecated - * -* Breaking changes - * -* Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and we add a new imagery layer. This results in a 25% reduction in load times in many cases. -* Billboard, Label, and PointPrimitive depth testing changed from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap. -* Billboard sizes were incorrectly rounded up from odd values to even values. This has been corrected, and as a result, odd-width and odd-height billboards will appear one pixel smaller than before. -* Label glyph positions have been adjusted and corrected. -* `TextureAtlas.borderWidthInPixels` has always been applied to the upper and right edges of each internal texture, but is now also applied to the bottom and left edges of the entire TextureAtlas, guaranteeing borders on all sides regardless of position within the atlas. -* Added support for saving html and css in Github Gists. [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125) + +* Improved terrain/imagery load ordering, especially when the terrain is already fully loaded and a new imagery layer is loaded. This results in a 25% reduction in load times in many cases. [#4616](https://github.com/AnalyticalGraphicsInc/cesium/pull/4616) +* Improved `Billboard`, `Label`, and `PointPrimitive` visual quality. [#4675](https://github.com/AnalyticalGraphicsInc/cesium/pull/4675) + * Corrected odd-width and odd-height billboard sizes from being incorrectly rounded up. + * Changed depth testing from `LESS` to `LEQUAL`, allowing label glyphs of equal depths to overlap. + * Label glyph positions have been adjusted and corrected. + * `TextureAtlas.borderWidthInPixels` has always been applied to the upper and right edges of each internal texture, but is now also applied to the bottom and left edges of the entire TextureAtlas, guaranteeing borders on all sides regardless of position within the atlas. +* Added support for saving html and css in GitHub Gists. [#4125](https://github.com/AnalyticalGraphicsInc/cesium/issues/4125) * Fixed `Cartographic.fromCartesian` when the cartesian is not on the ellipsoid surface. [#4611](https://github.com/AnalyticalGraphicsInc/cesium/issues/4611) ### 1.27 - 2016-11-01 From 145dce17e9b918d56e05fda68fab965fd0f4d12f Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Wed, 30 Nov 2016 14:25:49 -0500 Subject: [PATCH 49/49] chore(package): update aws-sdk to version 2.7.9 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c6c0e004d41..ba0ed8c007ae 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "devDependencies": { "almond": "0.3.3", - "aws-sdk": "2.7.6", + "aws-sdk": "2.7.9", "bluebird": "3.4.6", "compressible": "2.0.9", "compression": "1.6.2",
Enable Lighting
Enable fog