修改飞线和光照bug

This commit is contained in:
2025-07-14 11:31:10 +08:00
parent ff60cc4f65
commit 51f7ef9864
3 changed files with 15 additions and 3 deletions

View File

@ -40,6 +40,7 @@ class FlowLine extends Base {
this.options.duration = options.duration || 10.0
this.options.color = options.color || "rgba(255,255,255,1)"
this.options.lineBackAlpha = options.lineBackAlpha || 0.05
this.options.positions = options.positions || []
this.options.show = (options.show || options.show === false) ? options.show : true
this.Dialog = _Dialog
this._EventBinding = new EventBinding()
@ -47,7 +48,8 @@ class FlowLine extends Base {
this.positionArea = []
this.positions = []
this.sdk.addIncetance(this.options.id, this)
FlowLine.create(this)
// FlowLine.create(this)
FlowLine.drawLine(this)
}
// 创建水面
@ -68,6 +70,13 @@ class FlowLine extends Base {
that.edit(true)
})
}
static drawLine(that) {
that.positionArea = that.options.positions
let posis = that.getRandomPointsInCesiumPolygon(that.options.positions, that.options.pointNumber)
that.positions = posis
that.getLine(that, posis)
// that.edit(true)
}
getRandomPointsInCesiumPolygon(positions, count) {
let lons = [], lats = [], posi = []
positions.forEach(item => {