Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

EllipsoidElectricMaterialProperty.js 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * @Author: Caven
  3. * @Date: 2021-03-04 22:10:18
  4. */
  5. import { Cesium } from '@dc-modules/namespace'
  6. import MaterialProperty from '../../MaterialProperty'
  7. class EllipsoidElectricMaterialProperty extends MaterialProperty {
  8. constructor(options = {}) {
  9. super(options)
  10. }
  11. getType(time) {
  12. return Cesium.Material.EllipsoidElectricType
  13. }
  14. getValue(time, result) {
  15. result = Cesium.defaultValue(result, {})
  16. result.color = Cesium.Property.getValueOrUndefined(this._color, time)
  17. result.speed = this._speed
  18. return result
  19. }
  20. equals(other) {
  21. return (
  22. this === other ||
  23. (other instanceof EllipsoidElectricMaterialProperty &&
  24. Cesium.Property.equals(this._color, other._color) &&
  25. Cesium.Property.equals(this._speed, other._speed))
  26. )
  27. }
  28. }
  29. Object.defineProperties(EllipsoidElectricMaterialProperty.prototype, {
  30. color: Cesium.createPropertyDescriptor('color'),
  31. speed: Cesium.createPropertyDescriptor('speed')
  32. })
  33. export default EllipsoidElectricMaterialProperty