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.

Style3D.js 1.9KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. const { Cesium } = DC.Namespace
  2. function Style3D() {
  3. this._fillForeColor = new Cesium.Color()
  4. this._lineColor = new Cesium.Color()
  5. this._lineWidth = 1.0
  6. this._bottomAltitude = 0
  7. this._pointSize = 1.0
  8. this._pointColor = new Cesium.Color()
  9. }
  10. Object.defineProperties(Style3D.prototype, {
  11. fillForeColor: {
  12. get: function() {
  13. return this._fillForeColor
  14. },
  15. set: function(value) {
  16. Cesium.Check.typeOf.object('fillForeColor value', value)
  17. Cesium.Color.clone(value, this._fillForeColor)
  18. }
  19. },
  20. bottomAltitude: {
  21. get: function() {
  22. return this._bottomAltitude
  23. },
  24. set: function(value) {
  25. Cesium.Check.typeOf.number('bottomAltitude value', value)
  26. if (this._bottomAltitude !== value) {
  27. this._bottomAltitude = value
  28. this._dirty = true
  29. }
  30. }
  31. },
  32. altitudeMode: {
  33. get: function() {
  34. return this._altitudeMode
  35. },
  36. set: function(value) {
  37. Cesium.Check.typeOf.number('altitudeMode value', value)
  38. this._altitudeMode = value
  39. }
  40. },
  41. lineColor: {
  42. get: function() {
  43. return this._lineColor
  44. },
  45. set: function(value) {
  46. Cesium.Check.typeOf.object('line color', value)
  47. Cesium.Color.clone(value, this._lineColor)
  48. }
  49. },
  50. lineWidth: {
  51. get: function() {
  52. return this._lineWidth
  53. },
  54. set: function(value) {
  55. Cesium.Check.typeOf.number('line width', value)
  56. this._lineWidth = value
  57. }
  58. },
  59. pointSize: {
  60. get: function() {
  61. return this._pointSize
  62. },
  63. set: function(value) {
  64. Cesium.Check.typeOf.number('point size', value)
  65. this._pointSize = value
  66. }
  67. },
  68. pointColor: {
  69. get: function() {
  70. return this._pointColor
  71. },
  72. set: function(value) {
  73. Cesium.Check.typeOf.object('point color', value)
  74. Cesium.Color.clone(value, this._pointColor)
  75. }
  76. }
  77. })
  78. export default Style3D