Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rahwang committed Aug 10, 2017
1 parent a172ec1 commit 2cad37c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions Source/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// Add Bing imagery
viewer.imageryLayers.addImageryProvider(new Cesium.BingMapsImageryProvider({
url : 'https://dev.virtualearth.net',
mapStyle: Cesium.BingMapsStyle.ROADS // Can also use Cesium.BingMapsStyle.ROADS
mapStyle: Cesium.BingMapsStyle.ROADS // Can also use Cesium.BingMapsStyle.AERIAL
}));

//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -201,7 +201,7 @@

// Load the NYC buildings tileset
var city = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://cesiumjs.org/NewYork/3DTilesGml',
url: 'https://beta.cesium.com/api/assets/1461?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYWJmM2MzNS02OWM5LTQ3OWItYjEyYS0xZmNlODM5ZDNkMTYiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjFdLCJpYXQiOjE0OTkyNjQ3NDN9.vuR75SqPDKcggvUrG_vpx0Av02jdiAxnnB1fNf-9f7s',
maximumScreenSpaceError: 16 // default value
}));

Expand All @@ -221,20 +221,22 @@
// Style 3D Tileset
//////////////////////////////////////////////////////////////////////////

// Define a white, opaque building style
var defaultStyle = new Cesium.Cesium3DTileStyle({
color : "color('white')",
show : true
});

city.readyPromise.then(function(tileset) {
tileset.style = defaultStyle;
});
// Set the tileset style to default
city.style = defaultStyle;

// Define a white, transparent building style
var transparentStyle = new Cesium.Cesium3DTileStyle({
color : "color('white', 0.3)",
show : true
});

// Define a style in which buildings are colored by height
var heightStyle = new Cesium.Cesium3DTileStyle({
color : {
conditions : [
Expand Down Expand Up @@ -272,7 +274,7 @@
var handler = viewer.screenSpaceEventHandler;
handler.setInputAction(function (movement) {
var pickedPrimitive = viewer.scene.pick(movement.endPosition);
var pickedEntity = (Cesium.defined(pickedPrimitive)) ? pickedPrimitive.id : undefined;
var pickedEntity = Cesium.defined(pickedPrimitive) ? pickedPrimitive.id : undefined;
// Unhighlight the previously picked entity
if (Cesium.defined(previousPickedEntity)) {
previousPickedEntity.billboard.scale = 1.0;
Expand All @@ -295,7 +297,7 @@

// Create a follow camera by tracking the drone entity
function setViewMode() {
if(droneModeElement.checked) {
if (droneModeElement.checked) {
viewer.trackedEntity = drone;
} else {
viewer.trackedEntity = undefined;
Expand Down
16 changes: 9 additions & 7 deletions Source/AppSkeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// Add Bing imagery
// viewer.imageryLayers.addImageryProvider(new Cesium.BingMapsImageryProvider({
// url : 'https://dev.virtualearth.net',
// mapStyle: Cesium.BingMapsStyle.ROADS // Can also use Cesium.BingMapsStyle.ROADS
// mapStyle: Cesium.BingMapsStyle.ROADS // Can also use Cesium.BingMapsStyle.AERIAL
// }));

//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -203,7 +203,7 @@

// // Load the NYC buildings tileset
// var city = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
// url: 'https://cesiumjs.org/NewYork/3DTilesGml',
// url: 'https://beta.cesium.com/api/assets/1461?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYWJmM2MzNS02OWM5LTQ3OWItYjEyYS0xZmNlODM5ZDNkMTYiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjFdLCJpYXQiOjE0OTkyNjQ3NDN9.vuR75SqPDKcggvUrG_vpx0Av02jdiAxnnB1fNf-9f7s',
// maximumScreenSpaceError: 16 // default value
// }));
//
Expand All @@ -223,20 +223,22 @@
// Style 3D Tileset
//////////////////////////////////////////////////////////////////////////

// // Define a white, opaque building style
// var defaultStyle = new Cesium.Cesium3DTileStyle({
// color : "color('white')",
// show : true
// });
//
// city.readyPromise.then(function(tileset) {
// tileset.style = defaultStyle;
// });
// // Set the tileset style to default
// city.style = defaultStyle;
//
// // Define a white, transparent building style
// var transparentStyle = new Cesium.Cesium3DTileStyle({
// color : "color('white', 0.3)",
// show : true
// });
//
// // Define a style in which buildings are colored by height
// var heightStyle = new Cesium.Cesium3DTileStyle({
// color : {
// conditions : [
Expand Down Expand Up @@ -274,7 +276,7 @@
// var handler = viewer.screenSpaceEventHandler;
// handler.setInputAction(function (movement) {
// var pickedPrimitive = viewer.scene.pick(movement.endPosition);
// var pickedEntity = (Cesium.defined(pickedPrimitive)) ? pickedPrimitive.id : undefined;
// var pickedEntity = Cesium.defined(pickedPrimitive) ? pickedPrimitive.id : undefined;
// // Unhighlight the previously picked entity
// if (Cesium.defined(previousPickedEntity)) {
// previousPickedEntity.billboard.scale = 1.0;
Expand All @@ -297,7 +299,7 @@
//
// // Create a follow camera by tracking the drone entity
// function setViewMode() {
// if(droneModeElement.checked) {
// if (droneModeElement.checked) {
// viewer.trackedEntity = drone;
// } else {
// viewer.trackedEntity = undefined;
Expand Down

0 comments on commit 2cad37c

Please sign in to comment.