| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /**
- * @Author : Caven Chen
- */
-
- 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 = Cesium.Property.getValueOrUndefined(this._speed, time)
- 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
|