When I set imageMaterial to the PolylineVolumeGraphics, the top face of mesh is broken. How to set texture to the top face ?
textture(LuZhuang.jpg):
Result:
computeRectangle(width: number, height: number) {
var positions = [];
width *= 0.5;
height *= 0.5;
positions.push(new Cesium.Cartesian2(-width, height));
positions.push(new Cesium.Cartesian2(width, height));
positions.push(new Cesium.Cartesian2(width, -height));
positions.push(new Cesium.Cartesian2(-width, -height));
return positions;
}
createEntity() {
if (this.data.positions.length > 1) {
let polylineVolume = new Cesium.PolylineVolumeGraphics({
positions: this.data.positions,
shape: this.computeRectangle(2, 0.2),
material: new Cesium.ImageMaterialProperty({
image: "assets/material/LuZhuang.jpg"
})
})
this.entity = new Cesium.Entity({
position: this.data.positions[0],
polyline: lineData,
polylineVolume: polylineVolume,
})
PathTool.instance.viewer.entities.add(this.entity);
}
}