Skip to content

Commit

Permalink
Merge pull request #6393 from likangning93/texcoordsOnTerrain
Browse files Browse the repository at this point in the history
Materials on Ground Primitives
  • Loading branch information
bagnell authored May 15, 2018
2 parents e047cb8 + 4f580be commit 01c49d6
Show file tree
Hide file tree
Showing 67 changed files with 5,494 additions and 268 deletions.
24 changes: 24 additions & 0 deletions Apps/Sandcastle/gallery/Ground Clamping.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,30 @@
viewer.zoomTo(e);
}
}, {
text : 'Draw Textured Polygon',
onselect : function() {
if (!Cesium.Entity.supportsMaterialsforEntitiesOnTerrain(viewer.scene)) {
window.alert('Terrain Entity materials are not supported on this platform');
return;
}

var e = viewer.entities.add({
polygon : {
hierarchy : {
positions : [new Cesium.Cartesian3(-2358138.847340281, -3744072.459541374, 4581158.5714175375),
new Cesium.Cartesian3(-2357231.4925370603, -3745103.7886602185, 4580702.9757762635),
new Cesium.Cartesian3(-2355912.902205431, -3744249.029778454, 4582402.154378103),
new Cesium.Cartesian3(-2357208.0209552636, -3743553.4420488174, 4581961.863286629)]
},
material : '../images/Cesium_Logo_Color.jpg',
classificationType : Cesium.ClassificationType.TERRAIN,
stRotation : Cesium.Math.toRadians(45)
}
});

viewer.zoomTo(e);
}
}, {
text : 'Draw Rectangle',
onselect : function() {
var e = viewer.entities.add({
Expand Down
Loading

0 comments on commit 01c49d6

Please sign in to comment.