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.

MaterialProperty.js 789B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * @Author: Caven
  3. * @Date: 2021-02-27 22:33:50
  4. */
  5. import { Cesium } from '@dc-modules/namespace'
  6. class MaterialProperty {
  7. constructor(options = {}) {
  8. this._definitionChanged = new Cesium.Event()
  9. this._color = undefined
  10. this._colorSubscription = undefined
  11. this._speed = undefined
  12. this._speedSubscription = undefined
  13. this.color = options.color || Cesium.Color.fromBytes(0, 255, 255, 255)
  14. this.speed = options.speed || 1
  15. }
  16. get isConstant() {
  17. return false
  18. }
  19. get definitionChanged() {
  20. return this._definitionChanged
  21. }
  22. getType(time) {
  23. return null
  24. }
  25. getValue(time, result) {
  26. result = Cesium.defaultValue(result, {})
  27. return result
  28. }
  29. equals(other) {
  30. return this === other
  31. }
  32. }
  33. export default MaterialProperty