Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

PolylineTrailMaterialProperty.js 1004B

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