二三维

This commit is contained in:
zh
2025-08-14 15:55:52 +08:00
parent e022aa5ef1
commit 22f9693957
2 changed files with 8 additions and 1 deletions

View File

@ -231,7 +231,11 @@ async function syncData2(sdk, id, entityId) {
if (obj.showView == 3) {
options.show = false
}
let target = await new obj.constructor(sdk2D, options)
let target = await sdk2D.entityMap.get(options.id)
if(target) {
await target.remove()
}
target = await new obj.constructor(sdk2D, options)
target.onClick = obj.onClick
target.onRightClick = obj.onRightClick
target.onMouseMove = obj.onMouseMove

View File

@ -1526,6 +1526,9 @@ class GroundSvg extends Base {
controlPoints[9] = turf.destination(point, wh, 0 + angle, options).geometry.coordinates
this.controlPoints = controlPoints
if(!this.sdk || !this.sdk.viewer) {
return
}
for (let i = 0; i < this.controlPoints.length; i++) {
let color = '#00ff0a'
if (i === 5) {