You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PolylineEmissionMaterialProperty.js 876B

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