| @@ -0,0 +1,8 @@ | |||
| /** | |||
| * @Author: Caven | |||
| * @Date: 2021-08-01 00:12:06 | |||
| */ | |||
| let AnimationType = {} | |||
| export default AnimationType | |||
| @@ -4,6 +4,7 @@ | |||
| */ | |||
| export { default as Animation } from './Animation' | |||
| export { default as AnimationType } from './AnimationType' | |||
| /** | |||
| * types | |||
| @@ -6,6 +6,7 @@ | |||
| import { Cesium } from '@dc-modules/namespace' | |||
| import { Transform } from '@dc-modules/transform' | |||
| import Parse from '@dc-modules/parse/Parse' | |||
| import AnimationType from '../AnimationType' | |||
| import Animation from '../Animation' | |||
| @@ -16,7 +17,10 @@ class AroundPoint extends Animation { | |||
| this._options = options | |||
| this._heading = viewer.camera.heading | |||
| this._aroundAmount = 0.2 | |||
| this.type = 'around_point' | |||
| } | |||
| get type() { | |||
| return AnimationType.AROUND_POINT | |||
| } | |||
| set position(position) { | |||
| @@ -68,4 +72,6 @@ class AroundPoint extends Animation { | |||
| } | |||
| } | |||
| AnimationType.AROUND_POINT = 'around_point' | |||
| export default AroundPoint | |||
| @@ -5,6 +5,7 @@ | |||
| import { Cesium } from '@dc-modules/namespace' | |||
| import Animation from '../Animation' | |||
| import AnimationType from '../AnimationType' | |||
| class AroundView extends Animation { | |||
| constructor(viewer, options = {}) { | |||
| @@ -12,7 +13,10 @@ class AroundView extends Animation { | |||
| this._options = options | |||
| this._heading = viewer.camera.heading | |||
| this._aroundAmount = 0.2 | |||
| this.type = 'around_view' | |||
| } | |||
| get type() { | |||
| return AnimationType.AROUND_VIEW | |||
| } | |||
| set aroundAmount(aroundAmount) { | |||
| @@ -56,4 +60,6 @@ class AroundView extends Animation { | |||
| } | |||
| } | |||
| AnimationType.AROUND_VIEW = 'around_view' | |||
| export default AroundView | |||
| @@ -8,6 +8,7 @@ import Parse from '@dc-modules/parse/Parse' | |||
| import { Util } from '@dc-modules/utils' | |||
| import { Transform } from '@dc-modules/transform' | |||
| import Animation from '../Animation' | |||
| import AnimationType from '../AnimationType' | |||
| const CircleScanShader = require('@dc-modules/material/shader/circle/CircleScanShader.glsl') | |||
| @@ -19,7 +20,10 @@ class CircleScan extends Animation { | |||
| this._radius = radius || 100 | |||
| this._color = options.color || Cesium.Color.RED | |||
| this._speed = options.speed || 2 | |||
| this.type = 'circle_scan' | |||
| } | |||
| get type() { | |||
| return AnimationType.CIRCLE_SCAN | |||
| } | |||
| /** | |||
| @@ -78,4 +82,6 @@ class CircleScan extends Animation { | |||
| } | |||
| } | |||
| AnimationType.CIRCLE_SCAN = 'circle_scan' | |||
| export default CircleScan | |||
| @@ -7,6 +7,7 @@ import { Cesium } from '@dc-modules/namespace' | |||
| import Parse from '@dc-modules/parse/Parse' | |||
| import { Transform } from '@dc-modules/transform' | |||
| import Animation from '../Animation' | |||
| import AnimationType from '../AnimationType' | |||
| class Flying extends Animation { | |||
| constructor(viewer, options = {}) { | |||
| @@ -18,6 +19,10 @@ class Flying extends Animation { | |||
| this._timer = undefined | |||
| } | |||
| get type() { | |||
| return AnimationType.FLYING | |||
| } | |||
| set positions(positions) { | |||
| this._positions = Parse.parsePositions(positions) | |||
| return this | |||
| @@ -112,4 +117,6 @@ class Flying extends Animation { | |||
| } | |||
| } | |||
| AnimationType.FLYING = 'flying' | |||
| export default Flying | |||
| @@ -5,12 +5,16 @@ | |||
| import { Cesium } from '@dc-modules/namespace' | |||
| import Animation from '../Animation' | |||
| import AnimationType from '../AnimationType' | |||
| class GlobeRotate extends Animation { | |||
| constructor(viewer, options = {}) { | |||
| super(viewer) | |||
| this._options = options | |||
| this.type = 'globe_rotate' | |||
| } | |||
| get type() { | |||
| return AnimationType.GLOBE_ROTATE | |||
| } | |||
| /** | |||
| @@ -53,4 +57,6 @@ class GlobeRotate extends Animation { | |||
| } | |||
| } | |||
| AnimationType.GLOBE_ROTATE = 'globe_rotate' | |||
| export default GlobeRotate | |||
| @@ -8,6 +8,7 @@ import Parse from '@dc-modules/parse/Parse' | |||
| import { Util } from '@dc-modules/utils' | |||
| import { Transform } from '@dc-modules/transform' | |||
| import Animation from '../Animation' | |||
| import AnimationType from '../AnimationType' | |||
| const RadarScanShader = require('@dc-modules/material/shader/radar/RadarScanShader.glsl') | |||
| @@ -19,7 +20,10 @@ class RadarScan extends Animation { | |||
| this._color = options.color || Cesium.Color.BLUE | |||
| this._speed = options.speed || 3 | |||
| this._delegate = undefined | |||
| this.type = 'radar_scan' | |||
| } | |||
| get type() { | |||
| return AnimationType.RADAR_SCAN | |||
| } | |||
| /** | |||
| @@ -92,4 +96,6 @@ class RadarScan extends Animation { | |||
| } | |||
| } | |||
| AnimationType.RADAR_SCAN = 'radar_scan' | |||
| export default RadarScan | |||
| @@ -147,6 +147,7 @@ import Effect from '@dc-modules/effect/Effect' | |||
| * animation | |||
| */ | |||
| import { | |||
| AnimationType, | |||
| AroundView, | |||
| AroundPoint, | |||
| CircleScan, | |||
| @@ -346,6 +347,7 @@ const components = { | |||
| /** | |||
| * animation | |||
| */ | |||
| AnimationType, | |||
| AroundView, | |||
| AroundPoint, | |||
| CircleScan, | |||