-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into texture-compression
- Loading branch information
Showing
169 changed files
with
5,172 additions
and
2,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<meta name="description" content="Cluster labels, billboards and points."> | ||
<meta name="cesium-sandcastle-labels" content="Tutorials,Showcases"> | ||
<title>Cesium Demo</title> | ||
<script type="text/javascript" src="../Sandcastle-header.js"></script> | ||
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script> | ||
<script type="text/javascript"> | ||
require.config({ | ||
baseUrl : '../../../Source', | ||
waitSeconds : 60 | ||
}); | ||
</script> | ||
</head> | ||
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html"> | ||
<style> | ||
@import url(../templates/bucket.css); | ||
#toolbar { | ||
background: rgba(42, 42, 42, 0.8); | ||
padding: 4px; | ||
border-radius: 4px; | ||
} | ||
#toolbar input { | ||
vertical-align: middle; | ||
padding-top: 2px; | ||
padding-bottom: 2px; | ||
} | ||
</style> | ||
<div id="cesiumContainer" class="fullSize"></div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<script id="cesium_sandcastle_script"> | ||
function startup(Cesium) { | ||
'use strict'; | ||
//Sandcastle_Begin | ||
|
||
/** | ||
* This class is an example of a custom geocoder. It provides geocoding through the OpenStreetMap Nominatim service. | ||
* @alias OpenStreetMapNominatimGeocoder | ||
* @constructor | ||
*/ | ||
function OpenStreetMapNominatimGeocoder() { | ||
} | ||
|
||
/** | ||
* The function called to geocode using this geocoder service. | ||
* | ||
* @param {String} input The query to be sent to the geocoder service | ||
* @returns {Promise<GeocoderResult[]>} | ||
*/ | ||
OpenStreetMapNominatimGeocoder.prototype.geocode = function (input) { | ||
var endpoint = 'http://nominatim.openstreetmap.org/search?'; | ||
var query = 'format=json&q=' + input; | ||
var requestString = endpoint + query; | ||
return Cesium.loadJson(requestString) | ||
.then(function (results) { | ||
var bboxDegrees; | ||
return results.map(function (resultObject) { | ||
bboxDegrees = resultObject.boundingbox; | ||
return { | ||
displayName: resultObject.display_name, | ||
destination: Cesium.Rectangle.fromDegrees( | ||
bboxDegrees[2], | ||
bboxDegrees[0], | ||
bboxDegrees[3], | ||
bboxDegrees[1] | ||
) | ||
}; | ||
}); | ||
}); | ||
}; | ||
|
||
var viewer = new Cesium.Viewer('cesiumContainer', { | ||
geocoder: new OpenStreetMapNominatimGeocoder() | ||
}); | ||
|
||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<meta name="description" content="Use the split property to only show layers on one side of a slider."> | ||
<meta name="cesium-sandcastle-labels" content="Beginner, Tutorials, Showcases"> | ||
<title>Cesium Demo</title> | ||
<script type="text/javascript" src="../Sandcastle-header.js"></script> | ||
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script> | ||
<script type="text/javascript"> | ||
require.config({ | ||
baseUrl : '../../../Source', | ||
waitSeconds : 60 | ||
}); | ||
</script> | ||
</head> | ||
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html"> | ||
|
||
<style> | ||
@import url(../templates/bucket.css); | ||
|
||
#slider { | ||
position: absolute; | ||
left: 50%; | ||
top: 0px; | ||
background-color: #D3D3D3; | ||
width: 2px; | ||
height: 100%; | ||
z-index: 9999; | ||
} | ||
|
||
#slider:hover { | ||
cursor: ew-resize; | ||
} | ||
|
||
</style> | ||
|
||
<div id="cesiumContainer" class="fullSize"> | ||
<div id="slider"></div> | ||
</div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<div id="toolbar"></div> | ||
|
||
<script id="cesium_sandcastle_script"> | ||
|
||
|
||
function startup(Cesium) { | ||
'use strict'; | ||
//Sandcastle_Begin | ||
var viewer = new Cesium.Viewer('cesiumContainer', { | ||
imageryProvider : new Cesium.ArcGisMapServerImageryProvider({ | ||
url : 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer' | ||
}), | ||
baseLayerPicker : false | ||
}); | ||
|
||
var layers = viewer.imageryLayers; | ||
var blackMarble = layers.addImageryProvider(Cesium.createTileMapServiceImageryProvider({ | ||
url : 'https://cesiumjs.org/blackmarble', | ||
credit : 'Black Marble imagery courtesy NASA Earth Observatory', | ||
flipXY : true // Only old gdal2tile.py generated tilesets need this flag. | ||
})); | ||
blackMarble.splitDirection = Cesium.ImagerySplitDirection.LEFT; // Only show to the left of the slider. | ||
|
||
// Sync the position of the slider with the split position | ||
var slider = document.getElementById('slider'); | ||
viewer.scene.imagerySplitPosition = (slider.offsetLeft) / slider.parentElement.offsetWidth; | ||
|
||
var dragStartX = 0; | ||
|
||
document.getElementById('slider').addEventListener('mousedown', mouseDown, false); | ||
window.addEventListener('mouseup', mouseUp, false); | ||
|
||
function mouseUp() { | ||
window.removeEventListener('mousemove', sliderMove, true); | ||
} | ||
|
||
function mouseDown(e) { | ||
var slider = document.getElementById('slider'); | ||
dragStartX = e.clientX - slider.offsetLeft; | ||
window.addEventListener('mousemove', sliderMove, true); | ||
} | ||
|
||
function sliderMove(e) { | ||
var slider = document.getElementById('slider'); | ||
var splitPosition = (e.clientX - dragStartX) / slider.parentElement.offsetWidth; | ||
slider.style.left = 100.0 * splitPosition + "%"; | ||
viewer.scene.imagerySplitPosition = splitPosition; | ||
} | ||
|
||
|
||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.