没有合适的资源?快使用搜索试试~ 我知道了~
Cesium 动态Polyline绘制
1星 45 下载量 31 浏览量
2021-01-20
13:27:42
上传
评论 1
收藏 21KB PDF 举报
温馨提示
试读
1页
Cesium 用Entity绘制polyline,如果使用CallbackProperty方法进行动态绘制,depthFailMaterial属性将失效。 从官方github上的issue找了替代的方法。 动态Primitive线的绘制 // 绘制方法 this._candidateLinePrimitive = this.scene.primitives.add( new Cesium.Primitive({ geometryInstances: new Cesium.GeometryInstance({ geometry: new Cesium.PolylineGe
资源推荐
资源详情
资源评论
Cesium 动态动态Polyline绘制绘制
Cesium 用Entity绘制polyline,如果使用CallbackProperty方法进行动态绘制,depthFailMaterial属性将失效。
从官方github上的issue找了替代的方法。
动态Primitive线的绘制
// 绘制方法
this._candidateLinePrimitive = this.scene.primitives.add(
new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: new Cesium.PolylineGeometry({
positions: this._candidateLinePositions,
width: this.defaultLineWidth,
vertexFormat: Cesium.PolylineMaterialAppearance.VERTEX_FORMAT
})
}),
appearance: new Cesium.PolylineMaterialAppearance({
material: new Cesium.Material({
fabric: {
type: "PolylineDash",
uniforms: {
color: (() => {
let c = this.lineMaterial.color.getValue();
return new Cesium.Color(c.red, c.green, c.blue, 1.0);
})()
}
}
}),
renderState: {
depthTest: {
enabled: false // shut off depth test
}
}
}),
asynchronous: false // block or not
})
);
// 动态刷新,remove 再 add
if (!_.isEmpty(this._candidateLinePrimitive)) {
this.scene.primitives.remove(this._candidateLinePrimitive);
}
作者:crazy智障大师mad
资源评论
- Hoogle39682021-10-11什么垃圾?
- scdli2021-07-30骗分,够烂
weixin_38705723
- 粉丝: 5
- 资源: 917
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功