合并
This commit is contained in:
@ -31,6 +31,8 @@ import YJColorPicker from "../Obj/Element/yj-color-picker";
|
||||
|
||||
class YJEarth {
|
||||
#_requestAnimationFrameEventId = undefined
|
||||
#_BillboardCollection
|
||||
#_LabelCollection
|
||||
/**
|
||||
* @constructor
|
||||
* @param div_id {string} 地球所在的dom id
|
||||
@ -272,6 +274,34 @@ class YJEarth {
|
||||
this.viewer.scene.fxaa = true
|
||||
this.viewer.scene.postProcessStages.fxaa.enabled = true
|
||||
this.viewer.scene.screenSpaceCameraController.enableCollisionDetection = true //true 禁止 false 允许
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const BillboardCollection = this.viewer.scene.primitives.add(new Cesium.BillboardCollection({
|
||||
scene: this.viewer.scene,
|
||||
}));
|
||||
const labelCollection = this.viewer.scene.primitives.add(new Cesium.LabelCollection({
|
||||
scene: this.viewer.scene,
|
||||
}));
|
||||
|
||||
this.#_BillboardCollection = BillboardCollection
|
||||
this.#_LabelCollection = labelCollection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
createCluster(this.viewer)
|
||||
keyboardMapRoamingInit(this.viewer)
|
||||
let a = Cesium.viewerCesiumNavigationMixin(this.viewer, {
|
||||
@ -522,6 +552,13 @@ class YJEarth {
|
||||
|
||||
}
|
||||
|
||||
get collection() {
|
||||
return {
|
||||
billboard: this.#_BillboardCollection,
|
||||
label: this.#_LabelCollection
|
||||
}
|
||||
}
|
||||
|
||||
destroy() {
|
||||
cancelAnimationFrame(this.#_requestAnimationFrameEventId)
|
||||
for (let [id, obj] of this.entityMap) {
|
||||
|
||||
Reference in New Issue
Block a user