cesium流动管线
时间: 2024-05-08 12:12:30 浏览: 142
Cesium Navigation
以下是两种实现cesium流动管线的方式:
1. 使用entity方式[^1]:
```javascript
// 创建entity
var entity = viewer.entities.add({
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray([
-75, 35,
-125, 35
]),
width: 10,
material: new Cesium.PolylineFlowMaterialProperty({
color: Cesium.Color.RED,
duration: 3000
})
}
});
```
2. 使用内置材质类型:
```javascript
// 创建primitive
var primitive = viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: new Cesium.PolylineGeometry({
positions: Cesium.Cartesian3.fromDegreesArray([
-75, 35,
-125, 35
]),
width: 10
})
}),
appearance: new Cesium.FlowAppearance({
color: Cesium.Color.RED,
duration: 3000
})
}));
```
阅读全文