Hello,
I'm very new to Cesium development. I'm trying to understand Materials in regards to Polygons. I see there is the default type of assigning color. But I would like to change the look of polygons using the code syntax in the polygon demo. To help with debugging I erased all other polygons and created my own. What I would like is to customize the look of a polygon. I know there is a tutorial on this but I was hoping to customize the stripe effect without the use of buttons first. Also, the tutorial that does the striping effect seems to just do default values if I am not mistaken. My example below is after looking at the API for Material and the fabric wiki. Can anyone help me understand why this only produces a polygon that is white and not the desired effect of blue and yellow stripes? Thank you so much for any help.
My current code looks like such:
var viewer = new Cesium.Viewer('cesiumContainer');
var blankPolygon = new Cesium.Polygon();
var stripe = new Cesium.Material({
fabric : {
type : 'Stripe',
uniforms : {
horizontal : true,
evenColor : Cesium.Color.YELLOW,
oddColor : Cesium.Color.BLUE,
offset : 0.0,
number : 30
}
}
});
blankPolygon = viewer.entities.add({
name : 'Testable polygon',
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray([-119.0, 40.0,
-110.0, 44.0,
-107.0, 55.0,
-119.0, 55.0]),
fabric : stripe
}
});
viewer.zoomTo(viewer.entitites);