Sfoglia il codice sorgente

improve code

tags/3.0.0
Caven Chen 2 anni fa
parent
commit
4f50d99460

+ 0
- 1
examples/index.css Vedi File

@@ -104,7 +104,6 @@ body {
}

.sz-container{
background-image: url("../images/bg/bg_xk.jpg");
}

.dg.ac{

+ 0
- 1
src/modules/animation/type/AroundView.js Vedi File

@@ -20,7 +20,6 @@ class AroundView extends Animation {

set aroundAmount(aroundAmount) {
this._aroundAmount = aroundAmount
return this
}

/**

+ 0
- 2
src/modules/animation/type/Flying.js Vedi File

@@ -24,7 +24,6 @@ class Flying extends Animation {

set positions(positions) {
this._positions = Parse.parsePositions(positions)
return this
}

get positions() {
@@ -33,7 +32,6 @@ class Flying extends Animation {

set durations(durations) {
this._durations = durations
return this
}

get durations() {

+ 2
- 2
src/modules/chart/GLMapView.js Vedi File

@@ -13,13 +13,13 @@ extendComponentView({
let viewer = api.getZr().viewer
viewer.scene.postRender.addEventListener(this.moveHandler, this)
},
moveHandler: function (t, e) {
moveHandler: function () {
this.api.dispatchAction({
type: 'GLMapRoam',
})
},
render: function (t, e, i) {},
dispose: function (t) {
dispose: function () {
let viewer = this.api.getZr().viewer
viewer.scene.postRender.removeEventListener(this.moveHandler, this)
},

+ 0
- 3
src/modules/effect/type/Silhouette.js Vedi File

@@ -41,7 +41,6 @@ class Silhouette {
set color(color) {
this._color = color
this._delegate && (this._delegate.uniforms.color = color)
return this
}

get color() {
@@ -51,7 +50,6 @@ class Silhouette {
set length(length) {
this._length = length
this._delegate && (this._delegate.uniforms.length = length)
return this
}

get length() {
@@ -61,7 +59,6 @@ class Silhouette {
set selected(selected) {
this._selected = selected
this._delegate && (this._delegate.selected = selected)
return this
}

get selected() {

+ 0
- 1
src/modules/event/type/OverlayEvent.js Vedi File

@@ -2,7 +2,6 @@
* @Author : Caven Chen
*/

import { Cesium } from '../../../namespace'
import { OverlayEventType } from '../EventType'
import Event from '../Event'


+ 0
- 1
src/modules/event/type/PathEvent.js Vedi File

@@ -2,7 +2,6 @@
* @Author : Caven Chen
*/

import { Cesium } from '../../../namespace'
import { PathEventType } from '../EventType'
import Event from '../Event'


+ 0
- 1
src/modules/layer/type/FeatureGridLayer.js Vedi File

@@ -58,7 +58,6 @@ class FeatureGridLayer extends Layer {
Object.keys(this._levelLayers).forEach((key) => {
this._levelLayers[key].show = show
})
return this
}

get show() {

+ 1
- 1
src/modules/measure/Measure.js Vedi File

@@ -2,7 +2,7 @@
* @Author : Caven Chen
*/

import { Cesium } from '../../../namespace'
import { Cesium } from '../../namespace'
import Angle from './type/Angle'
import Area from './type/Area'
import AreaHeight from './type/AreaHeight'

+ 0
- 3
src/modules/overlay/vector/Billboard.js Vedi File

@@ -28,7 +28,6 @@ class Billboard extends Overlay {
this._delegate.position = Transform.transformWGS84ToCartesian(
this._position
)
return this
}

get position() {
@@ -38,7 +37,6 @@ class Billboard extends Overlay {
set icon(icon) {
this._icon = icon
this._delegate.billboard.image = this._icon
return this
}

get icon() {
@@ -52,7 +50,6 @@ class Billboard extends Overlay {
this._size = size
this._delegate.billboard.width = this._size[0] || 32
this._delegate.billboard.height = this._size[1] || 32
return this
}

get size() {

+ 0
- 4
src/modules/overlay/vector/Box.js Vedi File

@@ -50,7 +50,6 @@ class Box extends Overlay {
Cesium.Math.toRadians(this._position.roll)
)
)
return this
}

get position() {
@@ -60,7 +59,6 @@ class Box extends Overlay {
set length(length) {
this._length = length || 0
this._delegate.box.dimensions.x = +this._length
return this
}

get length() {
@@ -70,7 +68,6 @@ class Box extends Overlay {
set width(width) {
this._width = width || 0
this._delegate.box.dimensions.y = +this._width
return this
}

get width() {
@@ -80,7 +77,6 @@ class Box extends Overlay {
set height(height) {
this._height = height || 0
this._delegate.box.dimensions.z = +this._height
return this
}

get height() {

+ 0
- 3
src/modules/overlay/vector/Circle.js Vedi File

@@ -27,7 +27,6 @@ class Circle extends Overlay {
set center(center) {
this._center = Parse.parsePosition(center)
this._delegate.polygon.hierarchy = this._computeHierarchy()
return this
}

get center() {
@@ -37,7 +36,6 @@ class Circle extends Overlay {
set radius(radius) {
this._radius = +radius
this._delegate.polygon.hierarchy = this._computeHierarchy()
return this
}

get radius() {
@@ -53,7 +51,6 @@ class Circle extends Overlay {
}
return Cesium.Math.toRadians(this._stRotation)
}, false)
return this
}

get rotateAmount() {

+ 0
- 1
src/modules/overlay/vector/Corridor.js Vedi File

@@ -25,7 +25,6 @@ class Corridor extends Overlay {
this._positions = Parse.parsePositions(positions)
this._delegate.corridor.positions =
Transform.transformWGS84ArrayToCartesianArray(this._positions)
return this
}

get positions() {

+ 0
- 4
src/modules/overlay/vector/Cylinder.js Vedi File

@@ -37,7 +37,6 @@ class Cylinder extends Overlay {
Cesium.Math.toRadians(this._position.roll)
)
)
return this
}

get position() {
@@ -47,7 +46,6 @@ class Cylinder extends Overlay {
set length(length) {
this._length = +length || 0
this._delegate.cylinder.length = this._length
return this
}

get length() {
@@ -57,7 +55,6 @@ class Cylinder extends Overlay {
set topRadius(topRadius) {
this._topRadius = +topRadius || 0
this._delegate.cylinder.topRadius = this._topRadius
return this
}

get topRadius() {
@@ -67,7 +64,6 @@ class Cylinder extends Overlay {
set bottomRadius(bottomRadius) {
this._bottomRadius = +bottomRadius || 0
this._delegate.cylinder.bottomRadius = this._bottomRadius
return this
}

get bottomRadius() {

+ 0
- 3
src/modules/overlay/vector/Ellipse.js Vedi File

@@ -36,7 +36,6 @@ class Ellipse extends Overlay {
Cesium.Math.toRadians(this._position.roll)
)
)
return this
}

get position() {
@@ -46,7 +45,6 @@ class Ellipse extends Overlay {
set semiMajorAxis(semiMajorAxis) {
this._semiMajorAxis = +semiMajorAxis || 0
this._delegate.ellipse.semiMajorAxis = this._semiMajorAxis
return this
}

get semiMajorAxis() {
@@ -56,7 +54,6 @@ class Ellipse extends Overlay {
set semiMinorAxis(semiMinorAxis) {
this._semiMinorAxis = +semiMinorAxis || 0
this._delegate.ellipse.semiMinorAxis = this._semiMinorAxis
return this
}

get semiMinorAxis() {

+ 0
- 2
src/modules/overlay/vector/Ellipsoid.js Vedi File

@@ -35,7 +35,6 @@ class Ellipsoid extends Overlay {
Cesium.Math.toRadians(this._position.roll)
)
)
return this
}

get position() {
@@ -45,7 +44,6 @@ class Ellipsoid extends Overlay {
set radius(radius) {
this._radius = radius || { x: 10, y: 10, z: 10 }
this._delegate.ellipsoid.radii = this._radius
return this
}

get radius() {

+ 0
- 2
src/modules/overlay/vector/Label.js Vedi File

@@ -27,7 +27,6 @@ class Label extends Overlay {
this._delegate.position = Transform.transformWGS84ToCartesian(
this._position
)
return this
}

get position() {
@@ -37,7 +36,6 @@ class Label extends Overlay {
set text(text) {
this._text = text
this._delegate.label.text = this._text
return this
}

get text() {

+ 0
- 4
src/modules/overlay/vector/Plane.js Vedi File

@@ -57,7 +57,6 @@ class Plane extends Overlay {
Cesium.Math.toRadians(this._position.roll)
)
)
return this
}

get position() {
@@ -67,7 +66,6 @@ class Plane extends Overlay {
set width(width) {
this._width = +width || 0
this._delegate.plan.dimensions.x = this._width
return this
}

get width() {
@@ -77,7 +75,6 @@ class Plane extends Overlay {
set height(height) {
this._height = +height || 0
this._delegate.plan.dimensions.y = this._height
return this
}

get height() {
@@ -87,7 +84,6 @@ class Plane extends Overlay {
set distance(distance) {
this._distance = distance
this._delegate.plane.plane.distance = distance
return this
}

get distance() {

+ 0
- 1
src/modules/overlay/vector/Point.js Vedi File

@@ -32,7 +32,6 @@ class Point extends Overlay {
this._delegate.position = Transform.transformWGS84ToCartesian(
this._position
)
return this
}

get position() {

+ 0
- 2
src/modules/overlay/vector/Polygon.js Vedi File

@@ -26,7 +26,6 @@ class Polygon extends Overlay {
set positions(positions) {
this._positions = Parse.parsePositions(positions)
this._delegate.polygon.hierarchy = this._computeHierarchy()
return this
}

get positions() {
@@ -38,7 +37,6 @@ class Polygon extends Overlay {
this._holes = holes.map((item) => Parse.parsePositions(item))
this._delegate.polygon.hierarchy = this._computeHierarchy()
}
return this
}

get holes() {

+ 0
- 1
src/modules/overlay/vector/Polyline.js Vedi File

@@ -26,7 +26,6 @@ class Polyline extends Overlay {
this._positions = Parse.parsePositions(positions)
this._delegate.polyline.positions =
Transform.transformWGS84ArrayToCartesianArray(this._positions)
return this
}

get positions() {

+ 0
- 2
src/modules/overlay/vector/PolylineVolume.js Vedi File

@@ -26,7 +26,6 @@ class PolylineVolume extends Overlay {
this._positions = Parse.parsePositions(positions)
this._delegate.polylineVolume.positions =
Transform.transformWGS84ArrayToCartesianArray(this._positions)
return this
}

get positions() {
@@ -36,7 +35,6 @@ class PolylineVolume extends Overlay {
set shape(shape) {
this._shape = shape || []
this._delegate.polylineVolume.shape = this._shape
return this
}

get shape() {

+ 0
- 1
src/modules/overlay/vector/Rectangle.js Vedi File

@@ -26,7 +26,6 @@ class Rectangle extends Overlay {
this._delegate.rectangle.coordinates = Cesium.Rectangle.fromCartesianArray(
Transform.transformWGS84ArrayToCartesianArray(this._positions)
)
return this
}

get positions() {

+ 0
- 1
src/modules/overlay/vector/Wall.js Vedi File

@@ -25,7 +25,6 @@ class Wall extends Overlay {
this._positions = Parse.parsePositions(positions)
this._delegate.wall.positions =
Transform.transformWGS84ArrayToCartesianArray(this._positions)
return this
}

get positions() {

+ 2
- 5
src/modules/roaming/KeyboardRoaming.js Vedi File

@@ -24,14 +24,13 @@ class KeyboardRoaming {

set enable(enable) {
if (this._enable === enable) {
return this
return
}
if (this._viewer.scene.mode !== Cesium.SceneMode.SCENE3D) {
return this
return
}
this._enable = enable
this._enable ? this._bindEvent() : this._unbindEvent()
return this
}

get enable() {
@@ -40,7 +39,6 @@ class KeyboardRoaming {

set moveRate(moveRate) {
this._moveRate = moveRate
return this
}

get moveRate() {
@@ -49,7 +47,6 @@ class KeyboardRoaming {

set rotateRate(rotateRate) {
this._rotateRate = rotateRate
return this
}

get rotateRate() {

+ 5
- 5
src/modules/terrain/TerrainFactory.js Vedi File

@@ -9,7 +9,7 @@ class TerrainFactory {
/**
*
* @param options
* @returns {module:@cesium/engine.EllipsoidTerrainProvider}
* @returns {TerrainProvider}
*/
static createEllipsoidTerrain(options) {
return new Cesium.EllipsoidTerrainProvider(options)
@@ -18,7 +18,7 @@ class TerrainFactory {
/**
* Create url terrain
* @param options
* @returns {module:cesium.CesiumTerrainProvider}
* @returns {TerrainProvider}
*/
static createUrlTerrain(options) {
return new Cesium.CesiumTerrainProvider(options)
@@ -27,7 +27,7 @@ class TerrainFactory {
/**
* Create google terrain
* @param options
* @returns {module:cesium.GoogleEarthEnterpriseTerrainProvider}
* @returns {TerrainProvider}
*/
static createGoogleTerrain(options) {
return new Cesium.GoogleEarthEnterpriseTerrainProvider(options)
@@ -36,7 +36,7 @@ class TerrainFactory {
/**
* Create arcgis terrain
* @param options
* @returns {module:cesium.ArcGISTiledElevationTerrainProvider}
* @returns {TerrainProvider}
*/
static createArcgisTerrain(options) {
return new Cesium.ArcGISTiledElevationTerrainProvider(options)
@@ -45,7 +45,7 @@ class TerrainFactory {
/**
* Create vr terrain
* @param options
* @returns {module:cesium.VRTheWorldTerrainProvider}
* @returns {TerrainProvider}
*/
static createVRTerrain(options) {
return new Cesium.VRTheWorldTerrainProvider(options)

+ 1
- 1
src/modules/weather/type/Snow.js Vedi File

@@ -8,7 +8,7 @@ import { Util } from '../../utils'
import SnowShader from '../../material/shader/weather/SnowShader.glsl'

class Snow {
constructor() {
constructor(viewer) {
this._id = Util.uuid()
this._viewer = viewer
this._delegate = undefined

Loading…
Annulla
Salva