Skip to content

Commit 01c49d6

Browse files
authored
Merge pull request #6393 from likangning93/texcoordsOnTerrain
Materials on Ground Primitives
2 parents e047cb8 + 4f580be commit 01c49d6

File tree

67 files changed

+5494
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5494
-268
lines changed

Apps/Sandcastle/gallery/Ground Clamping.html

+24
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,30 @@
121121
viewer.zoomTo(e);
122122
}
123123
}, {
124+
text : 'Draw Textured Polygon',
125+
onselect : function() {
126+
if (!Cesium.Entity.supportsMaterialsforEntitiesOnTerrain(viewer.scene)) {
127+
window.alert('Terrain Entity materials are not supported on this platform');
128+
return;
129+
}
130+
131+
var e = viewer.entities.add({
132+
polygon : {
133+
hierarchy : {
134+
positions : [new Cesium.Cartesian3(-2358138.847340281, -3744072.459541374, 4581158.5714175375),
135+
new Cesium.Cartesian3(-2357231.4925370603, -3745103.7886602185, 4580702.9757762635),
136+
new Cesium.Cartesian3(-2355912.902205431, -3744249.029778454, 4582402.154378103),
137+
new Cesium.Cartesian3(-2357208.0209552636, -3743553.4420488174, 4581961.863286629)]
138+
},
139+
material : '../images/Cesium_Logo_Color.jpg',
140+
classificationType : Cesium.ClassificationType.TERRAIN,
141+
stRotation : Cesium.Math.toRadians(45)
142+
}
143+
});
144+
145+
viewer.zoomTo(e);
146+
}
147+
}, {
124148
text : 'Draw Rectangle',
125149
onselect : function() {
126150
var e = viewer.entities.add({

0 commit comments

Comments
 (0)