Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into terrain
Browse files Browse the repository at this point in the history
  • Loading branch information
shunter committed Nov 9, 2012
2 parents 5d56c64 + 1b1c52a commit 312b0e7
Show file tree
Hide file tree
Showing 79 changed files with 579 additions and 327 deletions.
3 changes: 1 addition & 2 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ define([
enableDragDrop : true
});
widget.placeAt(dom.byId('cesiumContainer'));
widget.startWidget();
widget.startRenderLoop();
widget.startup();
});
});
1 change: 0 additions & 1 deletion Apps/CesiumViewer/CesiumViewer.profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var profile = {
'dojo-sync-loader' : 0,
'dojo-xhr-factory' : 0,
'dojo-test-sniff' : 0,
'dom-addeventlistener' : 1,
'dojo-firebug' : 0
},

Expand Down
15 changes: 9 additions & 6 deletions Apps/CesiumViewer/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ require({
}, {
name : 'dijit',
location : 'ThirdParty/dojo-release-1.7.2-src/dijit'
}, {
name : 'Assets',
location : 'Source/Assets'
}, {
name : 'Core',
location : 'Source/Core'
}, {
name : 'Widgets',
location : 'Source/Widgets'
}, {
name : 'Workers',
location : 'Source/Workers'
}, {
name : 'DynamicScene',
location : 'Source/DynamicScene'
Expand All @@ -31,6 +28,12 @@ require({
}, {
name : 'ThirdParty',
location : 'Source/ThirdParty'
}, {
name : 'Widgets',
location : 'Source/Widgets'
}, {
name : 'Workers',
location : 'Source/Workers'
}, {
name : 'CesiumViewer',
location : 'Apps/CesiumViewer'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Apps/CesiumViewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">

<title>Cesium Viewer</title>
<link rel="shortcut icon" href="../../Images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="CesiumViewer.css" media="screen">

<script data-dojo-config="async: 1, tlmSiblingOfDojo: 0" src="../../ThirdParty/dojo-release-1.7.2-src/dojo/dojo.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/CesiumSandcastle.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ require({
undef : true,
unused : false,
strict : true,
trailing : false,
trailing : true,
asi : false,
boss : false,
debug : false,
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/Animations.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{ name: 'dojo', location: 'ThirdParty/dojo-release-1.7.2-src/dojo' },
{ name: 'dijit', location: 'ThirdParty/dojo-release-1.7.2-src/dijit' },
{ name: 'dojox', location: 'ThirdParty/dojo-release-1.7.2-src/dojox' },
{ name: 'Assets', location: 'Source/Assets' },
{ name: 'Core', location: 'Source/Core' },
{ name: 'DynamicScene', location: 'Source/DynamicScene' },
{ name: 'Renderer', location: 'Source/Renderer' },
Expand Down Expand Up @@ -176,12 +177,11 @@

var widget = new CesiumWidget();
widget.placeAt(dom.byId('cesiumContainer'));
widget.startWidget();
widget.startup();
dom.byId('toolbar').innerHTML = '';

createPrimitives(widget);
createButtons(widget.scene);
widget.startRenderLoop();
});
</script>
</body>
Expand Down
34 changes: 17 additions & 17 deletions Apps/Sandcastle/gallery/Billboards.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{ name: 'dojo', location: 'ThirdParty/dojo-release-1.7.2-src/dojo' },
{ name: 'dijit', location: 'ThirdParty/dojo-release-1.7.2-src/dijit' },
{ name: 'dojox', location: 'ThirdParty/dojo-release-1.7.2-src/dojox' },
{ name: 'Assets', location: 'Source/Assets' },
{ name: 'Core', location: 'Source/Core' },
{ name: 'DynamicScene', location: 'Source/DynamicScene' },
{ name: 'Renderer', location: 'Source/Renderer' },
Expand Down Expand Up @@ -84,7 +85,7 @@
});
scene.getPrimitives().add(billboards);
};
image.src = '../../../Images/Cesium_Logo_overlay.png';
image.src = '../images/Cesium_Logo_overlay.png';
}

function setBillboardPropertiesAtCreation(scene, ellipsoid) {
Expand All @@ -107,7 +108,7 @@
});
scene.getPrimitives().add(billboards);
};
image.src = '../../../Images/Cesium_Logo_overlay.png';
image.src = '../images/Cesium_Logo_overlay.png';
}

function setBillboardProperties(scene, ellipsoid) {
Expand All @@ -130,14 +131,14 @@

scene.getPrimitives().add(billboards);
};
image.src = '../../../Images/Cesium_Logo_overlay.png';
image.src = '../images/Cesium_Logo_overlay.png';
}

function addMultipleBillboards(scene, ellipsoid) {
Sandcastle.declare(addMultipleBillboards); // For highlighting in Sandcastle.
Cesium.when.all([
Cesium.loadImage('../../../Images/Cesium_Logo_overlay.png'),
Cesium.loadImage('../../../Images/facility.gif')
Cesium.loadImage('../images/Cesium_Logo_overlay.png'),
Cesium.loadImage('../images/facility.gif')
])
.then(function(images) {
// Once both images are downloaded, they are combined into one image,
Expand Down Expand Up @@ -306,7 +307,7 @@
});
scene.getPrimitives().add(billboards);
};
image.src = '../../../Images/whiteShapes.png';
image.src = '../images/whiteShapes.png';
}

function addBillboardsInReferenceframe(scene, ellipsoid) {
Expand All @@ -326,7 +327,7 @@
billboards.add({ imageIndex : 0, position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0) }); // up
scene.getPrimitives().add(billboards);
};
image.src = '../../../Images/facility.gif';
image.src = '../images/facility.gif';
}

function createButtons(widget) {
Expand All @@ -338,7 +339,7 @@
label: 'Add billboard',
onClick: function() {
primitives.removeAll();
addBillboard(scene, ellipsoid);
addBillboard(scene, ellipsoid);
Sandcastle.highlight(addBillboard);
}
}).placeAt('toolbar');
Expand All @@ -347,7 +348,7 @@
label: 'Set billboard properties at creation',
onClick: function() {
primitives.removeAll();
setBillboardPropertiesAtCreation(scene, ellipsoid);
setBillboardPropertiesAtCreation(scene, ellipsoid);
Sandcastle.highlight(setBillboardPropertiesAtCreation);
}
}).placeAt('toolbar');
Expand All @@ -356,7 +357,7 @@
label: 'Change billboard properties',
onClick: function() {
primitives.removeAll();
setBillboardProperties(scene, ellipsoid);
setBillboardProperties(scene, ellipsoid);
Sandcastle.highlight(setBillboardProperties);
}
}).placeAt('toolbar');
Expand All @@ -365,7 +366,7 @@
label: 'Add multiple billboards',
onClick: function() {
primitives.removeAll();
addMultipleBillboards(scene, ellipsoid);
addMultipleBillboards(scene, ellipsoid);
Sandcastle.highlight(addMultipleBillboards);
}
}).placeAt('toolbar');
Expand All @@ -374,7 +375,7 @@
label: 'Add point billboards',
onClick: function() {
primitives.removeAll();
addPointBillboards(scene, ellipsoid);
addPointBillboards(scene, ellipsoid);
Sandcastle.highlight(addPointBillboards);
}
}).placeAt('toolbar');
Expand All @@ -383,7 +384,7 @@
label: 'Add marker billboards',
onClick: function() {
primitives.removeAll();
addMarkerBillboards(scene, ellipsoid);
addMarkerBillboards(scene, ellipsoid);
Sandcastle.highlight(addMarkerBillboards);
}
}).placeAt('toolbar');
Expand All @@ -392,20 +393,19 @@
label: 'Add billboards in reference frame',
onClick: function() {
primitives.removeAll();
addBillboardsInReferenceframe(scene, ellipsoid);
addBillboardsInReferenceframe(scene, ellipsoid);
Sandcastle.highlight(addBillboardsInReferenceframe);
}
}).placeAt('toolbar');
}).placeAt('toolbar');
}

var widget = new CesiumWidget();
widget.placeAt(dom.byId('cesiumContainer'));
widget.startWidget();
widget.startup();
dom.byId('toolbar').innerHTML = '';

createButtons(widget);
addBillboard(widget.scene, widget.ellipsoid);
widget.startRenderLoop();
});
</script>
</body>
Expand Down
14 changes: 7 additions & 7 deletions Apps/Sandcastle/gallery/Camera Reference Frames.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{ name: 'dojo', location: 'ThirdParty/dojo-release-1.7.2-src/dojo' },
{ name: 'dijit', location: 'ThirdParty/dojo-release-1.7.2-src/dijit' },
{ name: 'dojox', location: 'ThirdParty/dojo-release-1.7.2-src/dojox' },
{ name: 'Assets', location: 'Source/Assets' },
{ name: 'Core', location: 'Source/Core' },
{ name: 'DynamicScene', location: 'Source/DynamicScene' },
{ name: 'Renderer', location: 'Source/Renderer' },
Expand Down Expand Up @@ -97,7 +98,7 @@
var xAxis = {
color : new Cesium.Color(1.0, 0.0, 0.0, 1.0),
positions : [
Cesium.Cartesian3.ZERO,
Cesium.Cartesian3.ZERO,
new Cesium.Cartesian3(100000.0, 0.0, 0.0)
]
};
Expand All @@ -106,7 +107,7 @@
var yAxis = {
color : new Cesium.Color(0.0, 1.0, 0.0, 1.0),
positions : [
Cesium.Cartesian3.ZERO,
Cesium.Cartesian3.ZERO,
new Cesium.Cartesian3(0.0, 100000.0, 0.0)
]
};
Expand All @@ -115,22 +116,21 @@
var zAxis = {
color : new Cesium.Color(0.0, 0.0, 1.0, 1.0),
positions : [
Cesium.Cartesian3.ZERO,
Cesium.Cartesian3.ZERO,
new Cesium.Cartesian3(0.0, 0.0, 100000.0)
]
]
};
polylines.add(zAxis);

primitives.add(polylines);
primitives.add(polylines);
}

var widget = new CesiumWidget();
widget.placeAt(dom.byId('cesiumContainer'));
widget.startWidget();
widget.startup();
dom.byId('toolbar').innerHTML = '';

eastNorthUp(widget.scene);
widget.startRenderLoop();
});
</script>
</body>
Expand Down
24 changes: 12 additions & 12 deletions Apps/Sandcastle/gallery/Camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{ name: 'dojo', location: 'ThirdParty/dojo-release-1.7.2-src/dojo' },
{ name: 'dijit', location: 'ThirdParty/dojo-release-1.7.2-src/dijit' },
{ name: 'dojox', location: 'ThirdParty/dojo-release-1.7.2-src/dojox' },
{ name: 'Assets', location: 'Source/Assets' },
{ name: 'Core', location: 'Source/Core' },
{ name: 'DynamicScene', location: 'Source/DynamicScene' },
{ name: 'Renderer', location: 'Source/Renderer' },
Expand Down Expand Up @@ -77,7 +78,7 @@
destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(
Cesium.Cartographic.fromDegrees(-117.16, 32.71, 15000.0)),
duration: 3.0
});
});
}

function flyToMyLocation(scene) {
Expand All @@ -87,7 +88,7 @@
destination: Cesium.Ellipsoid.WGS84.cartographicToCartesian(
Cesium.Cartographic.fromDegrees(position.coords.longitude, position.coords.latitude, 10000.0)),
duration: 3.0
});
});
}

navigator.geolocation.getCurrentPosition(fly);
Expand All @@ -107,35 +108,35 @@
var polylines = new Cesium.PolylineCollection();
polylines.add({
positions: Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray([
new Cesium.Cartographic(west, south),
new Cesium.Cartographic(west, north),
new Cesium.Cartographic(east, north),
new Cesium.Cartographic(east, south),
new Cesium.Cartographic(west, south),
new Cesium.Cartographic(west, north),
new Cesium.Cartographic(east, north),
new Cesium.Cartographic(east, south),
new Cesium.Cartographic(west, south)])
});
scene.getPrimitives().add(polylines);
scene.getPrimitives().add(polylines);
}

function createButtons(scene) {
new ToggleButton({
label: "Fly to San Diego",
onClick: function() {
onClick: function() {
flyToSanDiego(scene);
Sandcastle.highlight(flyToSanDiego);
}
}).placeAt('toolbar');

new ToggleButton({
label: "Fly to My Location",
onClick: function() {
onClick: function() {
flyToMyLocation(scene);
Sandcastle.highlight(flyToMyLocation);
}
}).placeAt('toolbar');

new ToggleButton({
label: "View an Extent",
onClick: function() {
onClick: function() {
viewAnExtent(scene);
Sandcastle.highlight(viewAnExtent);
}
Expand All @@ -144,11 +145,10 @@

var widget = new CesiumWidget();
widget.placeAt(dom.byId('cesiumContainer'));
widget.startWidget();
widget.startup();
dom.byId('toolbar').innerHTML = '';

createButtons(widget.scene);
widget.startRenderLoop();
});
</script>
</body>
Expand Down
5 changes: 2 additions & 3 deletions Apps/Sandcastle/gallery/Cesium Viewer Widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
{ name: 'dojo', location: 'ThirdParty/dojo-release-1.7.2-src/dojo' },
{ name: 'dijit', location: 'ThirdParty/dojo-release-1.7.2-src/dijit' },
{ name: 'dojox', location: 'ThirdParty/dojo-release-1.7.2-src/dojox' },
{ name: 'Assets', location: 'Source/Assets' },
{ name: 'Core', location: 'Source/Core' },
{ name: 'DynamicScene', location: 'Source/DynamicScene' },
{ name: 'Renderer', location: 'Source/Renderer' },
Expand Down Expand Up @@ -84,10 +85,8 @@
enableDragDrop : true
});
widget.placeAt(dom.byId('cesiumContainer'));
widget.startWidget();
widget.startup();
dom.byId('toolbar').innerHTML = '';

widget.startRenderLoop();
});
</script>
</body>
Expand Down
Loading

0 comments on commit 312b0e7

Please sign in to comment.