Pārlūkot izejas kodu

merge the origin

tags/3.0.0
Caven Chen pirms 2 gadiem
vecāks
revīzija
f4d02fe099

+ 5
- 6
modules/exts/GroundSkyBox.js Parādīt failu

@@ -3,9 +3,7 @@
* @Date: 2021-02-21 17:50:31
*/

import { Cesium } from '@dc-modules/namespace'

const {
import {
BoxGeometry,
Cartesian3,
defined,
@@ -23,8 +21,9 @@ const {
BlendingState,
SceneMode,
ShaderProgram,
ShaderSource
} = Cesium
ShaderSource,
SkyBox
} from '@cesium/engine'

const SkyBoxFS = `
uniform samplerCube u_cubeMap;
@@ -48,7 +47,7 @@ const SkyBoxVS = `
}
`

class GroundSkyBox extends Cesium.SkyBox {
class GroundSkyBox extends SkyBox {
constructor(options = {}) {
super(options)
this.offsetAngle = options?.offsetAngle || 0

+ 8
- 0
modules/heat/HeatLayer.js Parādīt failu

@@ -266,6 +266,14 @@ class HeatLayer extends Layer {
}
return this
}

/**
*
* @return {HeatLayer}
*/
clear() {
return this
}
}

Layer.registerType('heat')

+ 1
- 15
modules/option/ViewerOption.js Parādīt failu

@@ -9,22 +9,8 @@ import { Util } from '@dc-modules/utils'
class ViewerOption {
constructor(viewer) {
this._viewer = viewer
this._options = {}
this._init()
}

/**
* Init viewer
* @private
*/
_init() {
this._viewer.delegate.cesiumWidget.creditContainer.style.display = 'none'
this._viewer.delegate.cesiumWidget.screenSpaceEventHandler.removeInputAction(
Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
)
this._viewer.scene.screenSpaceCameraController.maximumZoomDistance = 40489014.0
this._viewer.scene.backgroundColor = Cesium.Color.TRANSPARENT
this._viewer.delegate.imageryLayers.removeAll()
this._options = {}
}

/**

+ 2
- 3
modules/plot/edit/EditPolygon.js Parādīt failu

@@ -34,10 +34,9 @@ class EditPolygon extends Edit {
* @private
*/
_mountAnchor() {
let positions = [].concat(
this._overlay.delegate.polygon.hierarchy.getValue(Cesium.JulianDate.now())
this._positions = []
let positions = this._overlay.delegate.polygon.hierarchy.getValue(Cesium.JulianDate.now())
.positions
)
positions.push(positions[0])
for (let i = 0; i < positions.length - 1; i++) {
let mid = midCartesian(positions[i], positions[i + 1])

+ 2
- 5
modules/plot/edit/EditPolyline.js Parādīt failu

@@ -33,11 +33,8 @@ class EditPolyline extends Edit {
* @private
*/
_mountAnchor() {
let positions = [].concat(
this._overlay.delegate.polyline.positions.getValue(
Cesium.JulianDate.now()
)
)
this._positions = []
let positions = this._overlay.delegate.polyline.positions.getValue(Cesium.JulianDate.now())
for (let i = 0; i < positions.length - 1; i++) {
let mid = midCartesian(positions[i], positions[i + 1])
this._positions.push(positions[i])

+ 2
- 0
modules/tools/EditTool.js Parādīt failu

@@ -240,6 +240,8 @@ class EditTool {
* @returns {EditTool}
*/
activate(options = {}) {
this._anchorLayer.entities.removeAll()
this._anchors = []
this._viewer.tooltip.enable = true
this._options = { ...DEF_OPTS, ...options }
this._unbindEvent()

+ 0
- 13
modules/viewer/Viewer.js Parādīt failu

@@ -2,7 +2,6 @@
* @Author: Caven
* @Date: 2019-12-27 17:13:24
*/

import { Cesium } from '@dc-modules/namespace'
import Parse from '@dc-modules/parse/Parse'
import {
@@ -19,18 +18,6 @@ import createWidgets from '@dc-modules/widget'
import createTools from '@dc-modules/tools'

const DEF_OPTS = {
animation: false, //Whether to create animated widgets, lower left corner of the meter
baseLayerPicker: false, //Whether to display the layer selector
imageryProvider: false, // Whether to display the default imagery
fullscreenButton: false, //Whether to display the full-screen button
geocoder: false, //To display the geocoder widget, query the button in the upper right corner
homeButton: false, //Whether to display the Home button
infoBox: false, //Whether to display the information box
sceneModePicker: false, //Whether to display 3D/2D selector
selectionIndicator: false, //Whether to display the selection indicator component
timeline: false, //Whether to display the timeline
navigationHelpButton: false, //Whether to display the help button in the upper right corner
navigationInstructionsInitiallyVisible: false,
creditContainer: undefined,
shouldAnimate: true
}

Notiek ielāde…
Atcelt
Saglabāt