军标库 模型库
This commit is contained in:
@ -15,7 +15,6 @@ import { setSplitDirection, syncSplitData, setActiveId, getSdk } from '../../../
|
||||
import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../../../Global/global'
|
||||
|
||||
class Model extends BaseModel {
|
||||
#timeoutEventObject = null
|
||||
/**
|
||||
* @constructor
|
||||
* @description 加载模型
|
||||
@ -88,7 +87,8 @@ class Model extends BaseModel {
|
||||
console.warn("lat is required!")
|
||||
return
|
||||
}
|
||||
if(this.options.earth) {
|
||||
this._timeoutEventObject = null
|
||||
if (this.options.earth) {
|
||||
delete this.options.earth
|
||||
}
|
||||
this.picking = true
|
||||
@ -266,8 +266,8 @@ class Model extends BaseModel {
|
||||
}, this.entity)
|
||||
}
|
||||
this.entity.isMove = true
|
||||
clearTimeout(this.#timeoutEventObject)
|
||||
this.#timeoutEventObject = setTimeout(() => {
|
||||
clearTimeout(this._timeoutEventObject)
|
||||
this._timeoutEventObject = setTimeout(() => {
|
||||
this.entity && (this.entity.isMove = false)
|
||||
}, 500);
|
||||
})
|
||||
@ -304,8 +304,8 @@ class Model extends BaseModel {
|
||||
}, this.entity)
|
||||
}
|
||||
this.entity.isMove = true
|
||||
clearTimeout(this.#timeoutEventObject)
|
||||
this.#timeoutEventObject = setTimeout(() => {
|
||||
clearTimeout(this._timeoutEventObject)
|
||||
this._timeoutEventObject = setTimeout(() => {
|
||||
this.entity && (this.entity.isMove = false)
|
||||
}, 500);
|
||||
|
||||
@ -321,7 +321,7 @@ class Model extends BaseModel {
|
||||
this.modelAnimations = this.entity.loader.components.animations
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
syncSplitData(this.sdk, this.options.id)
|
||||
}
|
||||
|
||||
@ -462,6 +462,16 @@ class Model extends BaseModel {
|
||||
this.options.url = this.options.url || ""
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.options.name
|
||||
}
|
||||
set name(v) {
|
||||
console.log(v, 'vvvvvvvvv')
|
||||
this.options.name = v
|
||||
this.options.label.text = v
|
||||
this.label && (this.label.text = v)
|
||||
}
|
||||
|
||||
get color() {
|
||||
return this.options.color
|
||||
}
|
||||
@ -1659,8 +1669,8 @@ class Model extends BaseModel {
|
||||
this.entity.minimumPixelSize = this.scaleByDistance ? undefined : this.options.minimumPixelSize
|
||||
this.editObj && this.editObj.update()
|
||||
this.entity.isMove = true
|
||||
clearTimeout(this.#timeoutEventObject)
|
||||
this.#timeoutEventObject = setTimeout(() => {
|
||||
clearTimeout(this._timeoutEventObject)
|
||||
this._timeoutEventObject = setTimeout(() => {
|
||||
this.entity && (this.entity.isMove = false)
|
||||
}, 500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user