| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /**
- * @Author: Caven
- * @Date: 2020-06-22 16:46:14
- */
-
- import { Cesium } from '../../../../namespace'
- import MaterialProperty from '../../MaterialProperty'
- import IMG from '../../../images/fence.png'
-
- class WallTrailMaterialProperty extends MaterialProperty {
- constructor(options = {}) {
- super(options)
- this._image = undefined
- this._imageSubscription = undefined
- this.image = IMG
- }
-
- getType(time) {
- return Cesium.Material.WallTrailType
- }
-
- getValue(time, result) {
- if (!result) {
- result = {}
- }
- result.color = Cesium.Property.getValueOrUndefined(this._color, time)
- result.image = Cesium.Property.getValueOrUndefined(this._image, time)
- result.speed = this._speed
- return result
- }
-
- equals(other) {
- return (
- this === other ||
- (other instanceof WallTrailMaterialProperty &&
- Cesium.Property.equals(this._color, other._color) &&
- Cesium.Property.equals(this._speed, other._speed))
- )
- }
- }
-
- Object.defineProperties(WallTrailMaterialProperty.prototype, {
- color: Cesium.createPropertyDescriptor('color'),
- speed: Cesium.createPropertyDescriptor('speed'),
- image: Cesium.createPropertyDescriptor('image'),
- })
-
- export default WallTrailMaterialProperty
|