PolylineVolumeGeometry
A description of a polyline with a volume (a 2D shape extruded along a polyline).
function computeCircle(radius) {
const positions = [];
for (let i = 0; i < 360; i++) {
const radians = Math.toRadians(i);
positions.push(new Cartesian2(radius * Math.cos(radians), radius * Math.sin(radians)));
}
return positions;
}
const volume = new PolylineVolumeGeometry({
vertexFormat : VertexFormat.POSITION_ONLY,
polylinePositions : Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0
]),
shapePositions : computeCircle(100000.0)
});
Content copied to clipboard