【Mars3d】targetPosition支持动态属性坐标
通过一个方法给ConeTrack实体中的targetPosition属性动态添加目标点位置
示例地址:
http://mars3d.cn/editor-vue.html?key=ex_6_3_7&id=graphic/entity/coneTrack
相关代码:
targetPosition支持动态属性坐标
//初始化属性
const property = new Cesium.SampledPositionProperty()
property.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD
// 支持targetPosition: propertyQC动态属性坐标
const coneTrack = new mars3d.graphic.ConeTrack({
position: propertyFJ,
targetPosition: propertyQC,
})
graphicLayer.addGraphic(coneTrack)
//后续按需加坐标
const time = Cesium.JulianDate.addSeconds(start, i * 20, new Cesium.JulianDate())
const position = positions[i]
property.addSample(time, position)