This file contains hidden or 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
//Create's a 1x1 transparent base layer so that the globe has no imagery | |
var transparentBaseLayer = new Cesium.SingleTileImageryProvider({ | |
url : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=" | |
}); | |
//Create the viewer, must specify alpha :true in order for the globe and | |
//background to be transparent | |
var viewer = new Cesium.Viewer('cesiumContainer', { | |
skyBox : false, | |
skyAtmosphere : false, |
This file contains hidden or 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
var viewer = new Cesium.Viewer('cesiumContainer'); | |
//Normally you would define the default styles | |
//in CSS, but for the example it's easier to | |
//just do it here. | |
var geoOverlay = document.createElement('div'); | |
viewer.container.appendChild(geoOverlay); | |
geoOverlay.style.display = 'none'; | |
geoOverlay.style['background-color'] = 'white'; | |
geoOverlay.style.position = 'absolute'; |
This file contains hidden or 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
var viewer = new Cesium.Viewer('cesiumContainer'); | |
var scene = viewer.scene; | |
var ellipsoid = scene.globe.ellipsoid; | |
var entity = viewer.entities.add({ | |
label : { | |
show : true, | |
outlineColor: Cesium.Color.BLACK, | |
verticalOrigin : Cesium.VerticalOrigin.BOTTOM, |
This file contains hidden or 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
var viewer = new Cesium.Viewer('cesiumContainer', { | |
infoBox : false, | |
selectionIndicator : false | |
}); | |
var entity = viewer.entities.add({ | |
position : Cesium.Cartesian3.fromDegrees(-123, 44, 10), | |
model : { | |
uri : '../../../Specs/Data/Models/Box-Textured/CesiumTexturedBoxTest.gltf', | |
minimumPixelSize : 128 |
This file contains hidden or 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
var viewer = new Cesium.Viewer('cesiumContainer', { | |
infoBox : false, | |
selectionIndicator : false | |
}); | |
var entity = viewer.entities.add({ | |
position : Cesium.Cartesian3.fromDegrees(-123, 44, 10), | |
model : { | |
uri : '../../../Specs/Data/Models/Box/CesiumBoxTest.gltf', | |
minimumPixelSize : 128 |
This file contains hidden or 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
//Call this once at application startup | |
Cesium.Material._materialCache.addMaterial('Wallpaper', { | |
fabric : { | |
type : 'Wallpaper', | |
uniforms : { | |
image : Cesium.Material.DefaultImageId, | |
anchor : new Cesium.Cartesian2(0, 0) | |
}, | |
components : { | |
diffuse : 'texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).rgb', |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |
<!-- Use Chrome Frame in IE --> | |
<meta name="viewport" | |
content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | |
<meta name="description" | |
content="Construct and apply materials to rectangular and custom sensors."> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE --> | |
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | |
<meta name="description" content="Use the Viewer Widget to start building new applications or easily embed Cesium into existing applications."> | |
<meta name="cesium-sandcastle-labels" content="Beginner"> | |
<title>Cesium Demo</title> | |
<script type="text/javascript" src="../Sandcastle-header.js"></script> |