-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 issue3170
Conflicts: CHANGES.md
- Loading branch information
Showing
460 changed files
with
3,193 additions
and
2,134 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.12" | ||
sudo: false | ||
script: | ||
- npm run jsHint && npm run release |
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,4 @@ | ||
{ | ||
"extends": "../.jshintrc", | ||
"jasmine": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "../.jshintrc", | ||
"jasmine": false, | ||
"unused": false, | ||
"predef": [ | ||
"JSON", | ||
"require", | ||
"console", | ||
"Sandcastle", | ||
"Cesium" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<!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="Exaggerate terrain."> | ||
<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); | ||
</style> | ||
<div id="cesiumContainer" class="fullSize"></div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<div id="toolbar"> | ||
<div id="zoomButtons"></div> | ||
</div> | ||
<script id="cesium_sandcastle_script"> | ||
function startup(Cesium) { | ||
"use strict"; | ||
//Sandcastle_Begin | ||
var viewer = new Cesium.Viewer('cesiumContainer', { | ||
terrainExaggeration : 2.0 | ||
}); | ||
|
||
var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({ | ||
url : '//assets.agi.com/stk-terrain/world', | ||
requestWaterMask : true, | ||
requestVertexNormals : true | ||
}); | ||
viewer.terrainProvider = cesiumTerrainProviderMeshes; | ||
|
||
|
||
Sandcastle.addDefaultToolbarMenu([{ | ||
text : 'Mount Everest', | ||
onselect : function() { | ||
viewer.camera.setView({ | ||
destination : new Cesium.Cartesian3(277096.634865404, 5647834.481964232, 2985563.7039122293), | ||
orientation : { | ||
heading : 4.731089976107251, | ||
pitch : -0.32003481981370063 | ||
} | ||
}); | ||
} | ||
}, { | ||
text : 'Half Dome', | ||
onselect : function() { | ||
viewer.camera.setView({ | ||
destination : new Cesium.Cartesian3(-2497565.707296549, -4393815.215148996, 3886033.5140598584), | ||
orientation : { | ||
heading : 1.6690385899673323, | ||
pitch : -0.32086751043096884 | ||
} | ||
}); | ||
} | ||
}, { | ||
text : 'San Francisco Bay', | ||
onselect : function() { | ||
viewer.camera.setView({ | ||
destination : new Cesium.Cartesian3(-2696570.092794883, -4276051.411224011, 3887257.288168422), | ||
orientation : { | ||
heading : 5.193128432412409, | ||
pitch : -0.3996479673257727 | ||
} | ||
}); | ||
var target = new Cesium.Cartesian3(-2708814.85583248, -4254159.450845907, 3891403.9457429945); | ||
var offset = new Cesium.Cartesian3(70642.66030209465, -31661.517948317807, 35505.179997143336); | ||
viewer.camera.lookAt(target, offset); | ||
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); | ||
} | ||
}], 'zoomButtons'); | ||
//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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,4 +203,4 @@ | |
} | ||
</script> | ||
</body> | ||
</html> | ||
</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,129 @@ | ||
<!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 a video element as a material"> | ||
<meta name="cesium-sandcastle-labels" content="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); | ||
|
||
#trailer { | ||
position: absolute; | ||
bottom: 75px; | ||
right: 0; | ||
width: 320px; | ||
height: 180px; | ||
} | ||
</style> | ||
|
||
<div id="cesiumContainer" class="fullSize"></div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<div id="toolbar"></div> | ||
|
||
<video id="trailer" autoplay loop crossorigin controls> | ||
<source src="http://cesiumjs.org/videos/Sandcastle/big-buck-bunny_trailer.webm" type="video/webm"> | ||
<source src="http://cesiumjs.org/videos/Sandcastle/big-buck-bunny_trailer.mp4" type="video/mp4"> | ||
<source src="http://cesiumjs.org/videos/Sandcastle/big-buck-bunny_trailer.mov" type="video/quicktime"> | ||
Your browser does not support the <code>video</code> element. | ||
</video> | ||
<script id="cesium_sandcastle_script"> | ||
function startup(Cesium) { | ||
"use strict"; | ||
//Sandcastle_Begin | ||
var viewer = new Cesium.Viewer('cesiumContainer', {showRenderLoopErrors : false}); | ||
|
||
var videoElement = document.getElementById('trailer'); | ||
|
||
var sphere = viewer.entities.add({ | ||
position : Cesium.Cartesian3.fromDegrees(-79, 39, 1000), | ||
ellipsoid : { | ||
radii : new Cesium.Cartesian3(1000, 1000, 1000), | ||
material : videoElement | ||
} | ||
}); | ||
|
||
viewer.trackedEntity = sphere; | ||
|
||
var synchronizer; | ||
Sandcastle.addToolbarButton('Toggle clock synchronization', function() { | ||
// By default, the video plays normally and simply shows | ||
// whatever frame the video is currently on. | ||
// We can synchronize the video with the scene clock | ||
// using a VideoSynchronizer. | ||
|
||
if (Cesium.defined(synchronizer)) { | ||
synchronizer = synchronizer.destroy(); | ||
videoElement.playbackRate = 1.0; | ||
return; | ||
} | ||
|
||
synchronizer = new Cesium.VideoSynchronizer({ | ||
clock : viewer.clock, | ||
element : videoElement | ||
}); | ||
}); | ||
|
||
// Since it's just an image material, we can modify the number | ||
// of times the video repeats in each direction.. | ||
var isRepeating = true; | ||
Sandcastle.addToolbarButton('Toggle Image Repeat', function() { | ||
isRepeating = !isRepeating; | ||
}); | ||
|
||
sphere.ellipsoid.material.repeat = new Cesium.CallbackProperty(function(time, result) { | ||
if (!Cesium.defined(result)) { | ||
result = new Cesium.Cartesian2(); | ||
} | ||
if (isRepeating) { | ||
result.x = 8; | ||
result.y = 8; | ||
} else { | ||
result.x = 1; | ||
result.y = 1; | ||
} | ||
return result; | ||
}, false); | ||
|
||
// Like Image, the video element doesn't have to be part of the DOM or | ||
// otherwise on the screen to be used as a texture. | ||
Sandcastle.addToolbarButton('Toggle Video Overlay', function() { | ||
if(videoElement.style.display === 'none'){ | ||
videoElement.style.display = ''; | ||
return; | ||
} | ||
videoElement.style.display = 'none'; | ||
}); | ||
|
||
// Older browsers do not support WebGL video textures, | ||
// put up a friendly error message indicating such. | ||
viewer.scene.renderError.addEventListener(function() { | ||
if(!videoElement.paused){ | ||
videoElement.pause(); | ||
} | ||
viewer.cesiumWidget.showErrorPanel('This browser does not support cross-origin WebGL video textures.', '', ''); | ||
}); | ||
|
||
//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.
Oops, something went wrong.