@ino-cesium/material 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,153 +1,6 @@
1
1
  import * as Cesium from 'cesium';
2
2
  import { BaseMaterialProperty } from '@ino-cesium/common';
3
3
 
4
- interface IPolylineTrailMaterialOptions {
5
- name?: string;
6
- color?: string;
7
- speed?: number;
8
- image: string;
9
- }
10
- interface IPolylineFlowMaterialOptions {
11
- /**
12
- * 颜色
13
- */
14
- color?: string;
15
- speed?: number;
16
- image: string;
17
- repeatCount?: number;
18
- blendColor?: boolean;
19
- }
20
- interface ICircleWaveMaterialOptions {
21
- name?: string;
22
- color?: string;
23
- speed?: number;
24
- count?: number;
25
- gradient?: number;
26
- }
27
- interface ICircleRaderWaveMaterialOptions {
28
- name?: string;
29
- color?: string;
30
- speed?: number;
31
- }
32
- interface ICircleRaderFanMaterialOptions {
33
- name?: string;
34
- color?: string;
35
- speed?: number;
36
- }
37
- interface ICircleApertureMaterialOptions {
38
- color?: string;
39
- /**
40
- * 速度
41
- */
42
- speed?: number;
43
- }
44
- interface ILightWallMaterialOptions {
45
- image: string;
46
- color?: string;
47
- count?: number;
48
- /**
49
- * 时间 单位为秒
50
- */
51
- duration?: number;
52
- /**
53
- * 0为水平 1为垂直 默认为1
54
- */
55
- vertical?: number;
56
- /**
57
- * 1由下到上 0由上到下 默认为0
58
- */
59
- direction?: number;
60
- }
61
- /**
62
- * 电弧球体
63
- */
64
- interface IEllipsoidElectricMaterialOptions {
65
- color?: string;
66
- /**
67
- * 速度
68
- */
69
- speed?: number;
70
- }
71
- /**
72
- * 扫描球体 垂直方向
73
- */
74
- interface IEllipsoidVScanMaterialPropertyOptions {
75
- name?: string;
76
- color?: string;
77
- /**
78
- * 速度
79
- */
80
- speed?: number;
81
- }
82
- /**
83
- * 扫描球体 水平方向
84
- */
85
- interface IEllipsoidHScanMaterialPropertyOptions {
86
- name?: string;
87
- color?: string;
88
- /**
89
- * 速度
90
- */
91
- speed?: number;
92
- }
93
- /**
94
- * 雷达扫描材质
95
- * @param selectColor 选中颜色
96
- * @param bgColor 背景颜色
97
- * @param width 宽度
98
- * @param count 光圈个数
99
- * @param offset 光晕偏移量
100
- */
101
- interface IRadarScanMaterialOptions {
102
- /**
103
- * 扇区颜色
104
- */
105
- sectorColor?: string;
106
- /**
107
- * 扇区宽度
108
- */
109
- width?: number;
110
- /**
111
- * 背景颜色
112
- */
113
- bgColor?: string;
114
- /**
115
- * 光圈个数
116
- */
117
- count?: number;
118
- /**
119
- * 光晕偏移量
120
- */
121
- offset?: number;
122
- }
123
- interface ICorridorMaterialOptions {
124
- }
125
- /**
126
- * 闪电材质,
127
- * https://www.shadertoy.com/view/XXyGzh
128
- */
129
- interface IZapsMaterialOptions {
130
- color?: string;
131
- speed: number;
132
- }
133
-
134
- type types_ICircleApertureMaterialOptions = ICircleApertureMaterialOptions;
135
- type types_ICircleRaderFanMaterialOptions = ICircleRaderFanMaterialOptions;
136
- type types_ICircleRaderWaveMaterialOptions = ICircleRaderWaveMaterialOptions;
137
- type types_ICircleWaveMaterialOptions = ICircleWaveMaterialOptions;
138
- type types_ICorridorMaterialOptions = ICorridorMaterialOptions;
139
- type types_IEllipsoidElectricMaterialOptions = IEllipsoidElectricMaterialOptions;
140
- type types_IEllipsoidHScanMaterialPropertyOptions = IEllipsoidHScanMaterialPropertyOptions;
141
- type types_IEllipsoidVScanMaterialPropertyOptions = IEllipsoidVScanMaterialPropertyOptions;
142
- type types_ILightWallMaterialOptions = ILightWallMaterialOptions;
143
- type types_IPolylineFlowMaterialOptions = IPolylineFlowMaterialOptions;
144
- type types_IPolylineTrailMaterialOptions = IPolylineTrailMaterialOptions;
145
- type types_IRadarScanMaterialOptions = IRadarScanMaterialOptions;
146
- type types_IZapsMaterialOptions = IZapsMaterialOptions;
147
- declare namespace types {
148
- export type { types_ICircleApertureMaterialOptions as ICircleApertureMaterialOptions, types_ICircleRaderFanMaterialOptions as ICircleRaderFanMaterialOptions, types_ICircleRaderWaveMaterialOptions as ICircleRaderWaveMaterialOptions, types_ICircleWaveMaterialOptions as ICircleWaveMaterialOptions, types_ICorridorMaterialOptions as ICorridorMaterialOptions, types_IEllipsoidElectricMaterialOptions as IEllipsoidElectricMaterialOptions, types_IEllipsoidHScanMaterialPropertyOptions as IEllipsoidHScanMaterialPropertyOptions, types_IEllipsoidVScanMaterialPropertyOptions as IEllipsoidVScanMaterialPropertyOptions, types_ILightWallMaterialOptions as ILightWallMaterialOptions, types_IPolylineFlowMaterialOptions as IPolylineFlowMaterialOptions, types_IPolylineTrailMaterialOptions as IPolylineTrailMaterialOptions, types_IRadarScanMaterialOptions as IRadarScanMaterialOptions, types_IZapsMaterialOptions as IZapsMaterialOptions };
149
- }
150
-
151
4
  /**
152
5
  * 尾迹线材质类
153
6
  */
@@ -166,10 +19,15 @@ declare class PolylineTrailMaterialProperty extends BaseMaterialProperty {
166
19
  createPropertyDescriptors(): void;
167
20
  }
168
21
  declare const createTrailMaterial: (options: IPolylineTrailMaterialOptions) => Cesium.Material;
22
+ interface IPolylineTrailMaterialOptions {
23
+ name?: string;
24
+ color?: string;
25
+ speed?: number;
26
+ image: string;
27
+ }
169
28
 
170
29
  /**
171
30
  * 线流动材质
172
- * @classdesc 线流动材质
173
31
  * @param {IPolylineFlowMaterialOptions} options - 线流动材质参数
174
32
  */
175
33
  declare class PolylineFlowMaterialProperty extends BaseMaterialProperty {
@@ -189,6 +47,16 @@ declare class PolylineFlowMaterialProperty extends BaseMaterialProperty {
189
47
  createPropertyDescriptors(): void;
190
48
  }
191
49
  declare const createPoylineFlowMaterial: (options: IPolylineFlowMaterialOptions) => Cesium.Material;
50
+ interface IPolylineFlowMaterialOptions {
51
+ /**
52
+ * 颜色
53
+ */
54
+ color?: string;
55
+ speed?: number;
56
+ image: string;
57
+ repeatCount?: number;
58
+ blendColor?: boolean;
59
+ }
192
60
 
193
61
  /**
194
62
  * 波浪圆
@@ -210,6 +78,13 @@ declare class CircleWaveMaterialProperty extends BaseMaterialProperty {
210
78
  declare const createCircleWaveMaterial: (options?: ICircleWaveMaterialOptions) => {
211
79
  material: Cesium.Material;
212
80
  };
81
+ interface ICircleWaveMaterialOptions {
82
+ name?: string;
83
+ color?: string;
84
+ speed?: number;
85
+ count?: number;
86
+ gradient?: number;
87
+ }
213
88
 
214
89
  /**
215
90
  *雷达波纹圆
@@ -229,6 +104,11 @@ declare class CircleRaderWaveMaterialProperty extends BaseMaterialProperty {
229
104
  declare const createRaderWaveMaterial: (options: ICircleRaderWaveMaterialOptions) => {
230
105
  material: Cesium.Material;
231
106
  };
107
+ interface ICircleRaderWaveMaterialOptions {
108
+ name?: string;
109
+ color?: string;
110
+ speed?: number;
111
+ }
232
112
 
233
113
  /**
234
114
  * 雷达扇形扫描
@@ -248,6 +128,11 @@ declare class CircleRaderFanMaterialProperty extends BaseMaterialProperty {
248
128
  declare const createCircleRaderFanMaterial: (options: ICircleRaderFanMaterialOptions) => {
249
129
  material: Cesium.Material;
250
130
  };
131
+ interface ICircleRaderFanMaterialOptions {
132
+ name?: string;
133
+ color?: string;
134
+ speed?: number;
135
+ }
251
136
 
252
137
  /**
253
138
  * 波浪圆
@@ -264,9 +149,50 @@ declare class CircleApertureMaterialProperty extends BaseMaterialProperty {
264
149
  equals(other: CircleApertureMaterialProperty): any;
265
150
  init(): void;
266
151
  }
152
+ /**
153
+ * 创建圆形扩散材质
154
+ * @param options
155
+ */
267
156
  declare const createCircleApertureMaterial: (options?: ICircleApertureMaterialOptions) => Cesium.Material;
157
+ interface ICircleApertureMaterialOptions {
158
+ color?: string;
159
+ /**
160
+ * 速度
161
+ */
162
+ speed?: number;
163
+ }
268
164
 
269
165
  declare const createScanRadarMaterial: (options?: IRadarScanMaterialOptions) => Cesium.Material;
166
+ /**
167
+ * 雷达扫描材质
168
+ * @param selectColor 选中颜色
169
+ * @param bgColor 背景颜色
170
+ * @param width 宽度
171
+ * @param count 光圈个数
172
+ * @param offset 光晕偏移量
173
+ */
174
+ interface IRadarScanMaterialOptions {
175
+ /**
176
+ * 扇区颜色
177
+ */
178
+ sectorColor?: string;
179
+ /**
180
+ * 扇区宽度
181
+ */
182
+ width?: number;
183
+ /**
184
+ * 背景颜色
185
+ */
186
+ bgColor?: string;
187
+ /**
188
+ * 光圈个数
189
+ */
190
+ count?: number;
191
+ /**
192
+ * 光晕偏移量
193
+ */
194
+ offset?: number;
195
+ }
270
196
 
271
197
  /**
272
198
  * 光墙材质
@@ -291,6 +217,23 @@ declare class LightWallMaterialProperty extends BaseMaterialProperty {
291
217
  declare const createLightWallMaterial: (options: ILightWallMaterialOptions) => {
292
218
  material: Cesium.Material;
293
219
  };
220
+ interface ILightWallMaterialOptions {
221
+ image: string;
222
+ color?: string;
223
+ count?: number;
224
+ /**
225
+ * 时间 单位为秒
226
+ */
227
+ duration?: number;
228
+ /**
229
+ * 0为水平 1为垂直 默认为1
230
+ */
231
+ vertical?: number;
232
+ /**
233
+ * 1由下到上 0由上到下 默认为0
234
+ */
235
+ direction?: number;
236
+ }
294
237
 
295
238
  /**
296
239
  * 雷达扇形扫描
@@ -310,6 +253,16 @@ declare class EllipsoidElectricMaterialProperty extends BaseMaterialProperty {
310
253
  declare const createEllipsoidElectricMaterial: (options: IEllipsoidElectricMaterialOptions) => {
311
254
  material: Cesium.Material;
312
255
  };
256
+ /**
257
+ * 电弧球体
258
+ */
259
+ interface IEllipsoidElectricMaterialOptions {
260
+ color?: string;
261
+ /**
262
+ * 速度
263
+ */
264
+ speed?: number;
265
+ }
313
266
 
314
267
  /**
315
268
  * 球形扫描 垂直
@@ -329,6 +282,17 @@ declare class EllipsoidVScanMaterialProperty extends BaseMaterialProperty {
329
282
  declare const createEllipsoidVScanMaterial: (options: IEllipsoidVScanMaterialPropertyOptions) => {
330
283
  material: Cesium.Material;
331
284
  };
285
+ /**
286
+ * 扫描球体 垂直方向
287
+ */
288
+ interface IEllipsoidVScanMaterialPropertyOptions {
289
+ name?: string;
290
+ color?: string;
291
+ /**
292
+ * 速度
293
+ */
294
+ speed?: number;
295
+ }
332
296
 
333
297
  /**
334
298
  * 球形扫描 水平
@@ -348,6 +312,17 @@ declare class EllipsoidHScanMaterialProperty extends BaseMaterialProperty {
348
312
  declare const createEllipsoidHScanMaterial: (options: IEllipsoidHScanMaterialPropertyOptions) => {
349
313
  material: Cesium.Material;
350
314
  };
315
+ /**
316
+ * 扫描球体 水平方向
317
+ */
318
+ interface IEllipsoidHScanMaterialPropertyOptions {
319
+ name?: string;
320
+ color?: string;
321
+ /**
322
+ * 速度
323
+ */
324
+ speed?: number;
325
+ }
351
326
 
352
327
  /**
353
328
  * 闪电迁移shadertoy
@@ -368,6 +343,14 @@ declare class ZapsMaterialProperty extends BaseMaterialProperty {
368
343
  declare const createZapsMaterial: (options: IZapsMaterialOptions) => {
369
344
  material: Cesium.Material;
370
345
  };
346
+ /**
347
+ * 闪电材质,
348
+ * - https://www.shadertoy.com/view/XXyGzh
349
+ */
350
+ interface IZapsMaterialOptions {
351
+ color?: string;
352
+ speed: number;
353
+ }
371
354
 
372
- export { CircleApertureMaterialProperty, CircleRaderFanMaterialProperty, CircleRaderWaveMaterialProperty, CircleWaveMaterialProperty, EllipsoidElectricMaterialProperty, EllipsoidHScanMaterialProperty, EllipsoidVScanMaterialProperty, LightWallMaterialProperty, types as Material, PolylineFlowMaterialProperty, PolylineTrailMaterialProperty, ZapsMaterialProperty, createCircleApertureMaterial, createCircleRaderFanMaterial, createCircleWaveMaterial, createEllipsoidElectricMaterial, createEllipsoidHScanMaterial, createEllipsoidVScanMaterial, createLightWallMaterial, createPoylineFlowMaterial, createRaderWaveMaterial, createScanRadarMaterial, createTrailMaterial, createZapsMaterial };
373
- export type { ICircleApertureMaterialOptions, ICircleRaderFanMaterialOptions, ICircleRaderWaveMaterialOptions, ICircleWaveMaterialOptions, ICorridorMaterialOptions, IEllipsoidElectricMaterialOptions, IEllipsoidHScanMaterialPropertyOptions, IEllipsoidVScanMaterialPropertyOptions, ILightWallMaterialOptions, IPolylineFlowMaterialOptions, IPolylineTrailMaterialOptions, IRadarScanMaterialOptions, IZapsMaterialOptions };
355
+ export { CircleApertureMaterialProperty, CircleRaderFanMaterialProperty, CircleRaderWaveMaterialProperty, CircleWaveMaterialProperty, EllipsoidElectricMaterialProperty, EllipsoidHScanMaterialProperty, EllipsoidVScanMaterialProperty, LightWallMaterialProperty, PolylineFlowMaterialProperty, PolylineTrailMaterialProperty, ZapsMaterialProperty, createCircleApertureMaterial, createCircleRaderFanMaterial, createCircleWaveMaterial, createEllipsoidElectricMaterial, createEllipsoidHScanMaterial, createEllipsoidVScanMaterial, createLightWallMaterial, createPoylineFlowMaterial, createRaderWaveMaterial, createScanRadarMaterial, createTrailMaterial, createZapsMaterial };
356
+ export type { ICircleApertureMaterialOptions, ICircleRaderFanMaterialOptions, ICircleRaderWaveMaterialOptions, ICircleWaveMaterialOptions, IEllipsoidElectricMaterialOptions, IEllipsoidHScanMaterialPropertyOptions, IEllipsoidVScanMaterialPropertyOptions, ILightWallMaterialOptions, IPolylineFlowMaterialOptions, IPolylineTrailMaterialOptions, IRadarScanMaterialOptions, IZapsMaterialOptions };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import*as e from"cesium";import{BaseMaterialProperty as t,numberId as r}from"@ino-cesium/common";var a=Object.freeze({__proto__:null});const n={PolylineFlow:"PolylineFlow",PolylineTrail:"PolylineTrail",CircleWave:"CircleWave",CircleRaderWave:"CircleRaderWave",CircleRaderFan:"CircleRaderFan",LightWall:"LightWall",CircleAperture:"CircleAperture",RadarScanCircle:"RadarScanCircle",EllipsoidElectric:"EllipsoidElectric",EllipsoidVScan:"EllipsoidVScan",EllipsoidHScan:"EllipsoidHScan",Corridor:"Corridor",Zaps:"Zaps"};(()=>{console.log("初始化材质");for(const t in n)e.Material[t]=n[t]})();const i={color:"rgba(255,255,255,1)",speed:6*Math.random()};class o extends t{speed;color;name="";image="";constructor(t){console.log("dsjfkldsjflkdsf"),super(),this.createPropertyDescriptors();const a={...i,...t};this.image=a.image,this.name=`${n.PolylineTrail}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=e.Property.getValueOrClonedDefault(this.color,t,e.Color.WHITE,r.color),r.speed=this.speed,r.image=this.image,r}equals(t){return this===t||t instanceof o&&this.speed===t.speed&&e.Property.equals(this.color,t.color)&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{image:this.image,color:e.Color.fromCssColorString("#ff0000"),speed:this.speed},source:l},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:e.createPropertyDescriptor("color")})}}const s=t=>{const a={...i,...t};return new e.Material({fabric:{type:`${n.PolylineTrail}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),image:a.image,speed:a.speed},source:l},translucent:!0})},l="\n uniform sampler2D image;\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec4 colorImage = texture(image,st);\n vec3 fragColor = color.rgb;\n if(st.t > 0.45 && st.t < 0.55 ) {\n fragColor = vec3(1.0);\n }\n if(color.a == 0.0){\n material.alpha = colorImage.a * 1.5 * fract(st.s - time);\n material.diffuse = colorImage.rgb;\n }else{\n material.alpha = colorImage.a * color.a * 1.5 * smoothstep(.0,1., fract(st.s - time));\n material.diffuse = max(fragColor.rgb * material.alpha , fragColor.rgb);\n }\n return material;\n }\n\n",c={color:"rgba(255,255,255,1)",speed:6,repeatCount:4,blendColor:!0};class m extends t{repeatCount;image;speed;color;blend;name="";constructor(t){super(),this.createPropertyDescriptors();const a={...c,...t};this.name=`${n.PolylineFlow}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.image=a.image,this.repeatCount=a.repeatCount,this.blend=a.blendColor?1:0,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=e.Property.getValueOrClonedDefault(this.color,t,e.Color.WHITE,r.color),r.image=this.image,r.blend=this.blend,r.speed=this.speed,r.repeatCount=this.repeatCount,r}equals(e){return this===e||e instanceof m&&this.speed===e.speed&&this.repeatCount===e.repeatCount&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:e.Color.fromCssColorString("#ffffff"),image:"",speed:this.speed,count:this.repeatCount,blend:this.blend},source:p},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:e.createPropertyDescriptor("color")})}}const u=t=>{const a={...c,...t};return new e.Material({fabric:{type:n.PolylineFlow+r(),uniforms:{color:e.Color.fromCssColorString(a.color),image:a.image,speed:a.speed,count:a.repeatCount,blend:a.blendColor?1:0},source:p},translucent:!0})},p="\n uniform vec4 color;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image, vec2(fract( count * st.s - time),fract(st.t)));\n material.alpha = colorImage.a * color.a;\n if(blend > 0.5) {\n material.diffuse = (colorImage.rgb + color.rgb) * 2.0;\n } else {\n material.diffuse = color.rgb * 2.0 ;\n }\n return material;\n }\n",d={color:"rgba(255,255,0,0.3)",speed:8,count:5,gradient:.3};class f extends t{count;speed;gradient;color;name="";constructor(t){super(),t||(t={});const a={...d,...t};this.name=`${n.CircleWave}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.count=a.count,this.gradient=a.gradient,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r.speed=this.speed,r.repeatCount=this.count||d.count,r}equals(t){return this===t||t instanceof f&&e.Property.equals(this.color,t.color)&&this.speed===t.speed&&this.count===t.count&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new e.Color(1,0,0,.5),speed:this.speed,count:this.count,gradient:this.gradient},source:g},translucent:()=>!0})}}const h=t=>{const a={...d,...t};return{material:new e.Material({fabric:{type:`${n.CircleWave}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed,count:a.count,gradient:a.gradient},source:g},translucent:!0})}},g="\n uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n if(count == 1.0){\n if(dis > per * 0.5){\n discard;\n }else {\n material.alpha = color.a * dis / per / 2.0;\n }\n } else {\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 999; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n }\n else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n }\n return material;\n }\n",C={color:"rgba(255,255,255,1)",speed:8};class v extends t{speed;color;name="";constructor(t){super();const a={...C,...t};this.name=`${n.CircleRaderWave}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof v&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:_},translucent:()=>!0})}}const b=t=>{const a={...C,...t};return{material:new e.Material({fabric:{type:`${n.CircleRaderWave}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed},source:_},translucent:!0})}},_="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n float rand(vec2 co){\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 pos = st - vec2(0.5);\n float time = czm_frameNumber * speed / 1000.0 ;\n float r = length(pos);\n float t = atan(pos.y, pos.x) - time * 2.5;\n float a = (atan(sin(t), cos(t)) + PI)/(2.0*PI);\n float ta = 0.5;\n float v = smoothstep(ta-0.05,ta+0.05,a) * smoothstep(ta+0.05,ta-0.05,a);\n vec3 flagColor = color.rgb * v;\n float blink = pow(sin(time*1.5)*0.5+0.5, 0.8);\n flagColor = color.rgb * pow(a, 4.0*(.2+blink))*(sin(r*500.0)*.5+.5) ;\n flagColor = flagColor * pow(r, 0.4);\n material.alpha = length(flagColor) * 1.3;\n material.diffuse = flagColor * 3.0;\n return material;\n }\n",y={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class z extends t{speed;color;name="";constructor(t){super();const a={...y,...t};this.name=`${n.CircleRaderFan}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof z&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:x},translucent:()=>!0})}}const I=t=>{const a={...y,...t};return{material:new e.Material({fabric:{type:`${n.CircleRaderFan}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed},source:x},translucent:!0})}},x="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // 绘制边线\n float dis = distance(materialInput.st, vec2(0.5));\n float alpha = step((0.5- 0.01), dis);\n\n material.alpha = alpha;\n material.diffuse = color.rgb;\n\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n float per = czm_frameNumber * speed / PI * 3.0 / 200.0;\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + per;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = (alpha + color.a) * dis;\n material.diffuse = color.rgb;\n }\n return material;\n }\n",M={color:"rgba(255,255,0,0.3)",speed:8};class $ extends t{speed;color;name="";constructor(t){super(),t||(t={});const a={...M,...t};this.name=`${n.CircleAperture}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r.speed=this.speed,r}equals(t){return this===t||t instanceof $&&e.Property.equals(this.color,t.color)&&this.speed===t.speed&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new e.Color(1,0,0,.5),speed:this.speed},source:S},translucent:()=>!0})}}const w=t=>{const a={...M,...t};return new e.Material({fabric:{type:`${n.CircleAperture}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed},source:S},translucent:!0})},S="\n uniform vec4 color;\n uniform float speed;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float d = distance(st, vec2(0.5, 0.5));\n float alpha = step(.15, d) * step(d, .17) + step(.49, d) * step(d, 0.5) + d * d * step(d, 0.5);\n float movingCircleD = fract(czm_frameNumber * speed / 1000.0);\n alpha += step(movingCircleD, d) * step(d, movingCircleD + .015);\n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n }\n",D=t=>{t||(t={});return new e.Material({fabric:{type:`${n.RadarScanCircle}-${r()}`,uniforms:{radians:3*Math.PI/8,bgColor:e.Color.fromCssColorString(t.bgColor||"rgba(0,255,0,0.2)"),sectorColor:e.Color.fromCssColorString(t.sectorColor||"rgba(152,18,8,.1)"),width:t.width||.003,offset:t.offset||0,count:t.count||3},source:P},translucent:!0})},P="\n uniform vec4 bgColor;\n uniform vec4 sectorColor;\n uniform float count;\n uniform float radians;\n uniform float width;\n uniform float offset;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5));\n\n float alpha;\n vec3 diffuse;\n // 绘制圆圈\n float sp = 1.0 / count / 2.0;\n float m = mod(dis, sp);\n alpha = step(sp * (1.0 - width * 10.0), m);\n // alpha = clamp(alpha, 0.2, 1.0);\n if (alpha < bgColor.a){\n alpha = bgColor.a;\n diffuse = bgColor.rgb;\n } else {\n diffuse = bgColor.rgb;\n }\n material.alpha = alpha;\n material.diffuse = diffuse;\n // 绘制十字线\n if ((st.s > 0.5 - width / 2.0 && st.s < 0.5 + width / 2.0) || (st.t > 0.5 - width / 2.0 && st.t < 0.5 + width / 2.0)) {\n material.alpha = 0.8;\n material.diffuse = bgColor.rgb;\n return material;\n }\n // 绘制光晕\n float ma = mod(dis + offset, 0.5);\n if (ma < 0.25){\n alpha = ma * 3.0 + alpha;\n } else{\n alpha = 3.0 * (0.5 - ma) + alpha;\n }\n material.alpha = alpha;\n material.diffuse = bgColor.rgb;\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + radians;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = alpha + sectorColor.a;\n material.diffuse = sectorColor.rgb;\n }\n return material;\n }\n",N={color:"rgba(255,255,255,1)",count:3,duration:1500};class T extends t{duration;count;vertical;direction;color;_time;image;name="";constructor(t){super();const a={...N,...t};Object.prototype.hasOwnProperty.call(a,"vertical")||(a.vertical=1),this.name=`LightWall-${r()}`,this._time=(new Date).getTime(),this.color=e.Color.fromCssColorString(a.color),this.duration=a.duration,this.count=a.count,this.vertical=a.vertical,this.image=a.image,this.direction=a.direction,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r.image=this.image,r.vertical=this.vertical,r.direction=this.direction,r.count=this.count,r.duration=this.duration,this.duration&&(r.time=((new Date).getTime()-this._time)%this.duration/this.duration),r}equals(t){return this===t||t instanceof T&&e.Property.equals(this.color,t.color)&&this.name===t.name&&this.image===t.image&&this.vertical===t.vertical&&this.direction===t.direction&&this.count===t.count&&this.duration===t.duration}init(){const t=E({count:this.count,vertical:this.vertical,direction:this.direction});e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,duration:this.duration,vertical:this.vertical,image:this.image,count:this.count,time:-20},source:t},translucent:()=>!0})}}const q=t=>{const a={...N,...t};return{material:new e.Material({fabric:{type:`LightWall${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),duration:a.duration,vertical:a.vertical,image:a.image,count:a.count,time:-20},source:E({count:a.count,vertical:a.vertical,direction:a.direction})}})}},E=e=>{const t=e.vertical?"vertical":"standard",r=e.direction?"+":"-";let a="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;";return a+="vertical"===t?`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.t ${r} time)),fract(st.s));\n `:`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.s ${r} time), fract(st.t)));\n `,a+="vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a * color.a;\n material.emission = fragColor.rgb;\n return material;\n }",a},R={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class V extends t{speed;color;name="";constructor(t){super();const a={...R,...t};this.name=`${n.EllipsoidElectric}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof V&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:F},translucent:()=>!0})}}const W=t=>{const a={...R,...t};return{material:new e.Material({fabric:{type:`${n.EllipsoidElectric}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed},source:F},translucent:!0})}},F="\n uniform vec4 color;\n uniform float speed;\n #define pi 3.1415926535\n #define PI2RAD 0.01745329252\n #define TWO_PI (2. * PI)\n\n float rands(float p){\n return fract(sin(p) * 10000.0);\n }\n\n float noise(vec2 p){\n float time = fract( czm_frameNumber * speed / 1000.0);\n float t = time / 20000.0;\n\n if(t > 1.0) t -= floor(t);\n return rands(p.x * 14. + p.y * sin(t) * 0.5);\n }\n\n vec2 sw(vec2 p){\n return vec2(floor(p.x), floor(p.y));\n }\n\n vec2 se(vec2 p){\n return vec2(ceil(p.x), floor(p.y));\n }\n\n vec2 nw(vec2 p){\n return vec2(floor(p.x), ceil(p.y));\n }\n\n vec2 ne(vec2 p){\n return vec2(ceil(p.x), ceil(p.y));\n }\n\n float smoothNoise(vec2 p){\n vec2 inter = smoothstep(0.0, 1.0, fract(p));\n float s = mix(noise(sw(p)), noise(se(p)), inter.x);\n float n = mix(noise(nw(p)), noise(ne(p)), inter.x);\n return mix(s, n, inter.y);\n }\n\n float fbm(vec2 p){\n float z = 2.0;\n float rz = 0.0;\n vec2 bp = p;\n for(float i = 1.0; i < 6.0; i++){\n rz += abs((smoothNoise(p) - 0.5)* 2.0) / z;\n z *= 2.0;\n p *= 2.0;\n }\n return rz;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 st2 = materialInput.st;\n float time = fract( czm_frameNumber * speed / 1000.0);\n if (st.t < 0.5) {\n discard;\n }\n st *= 4.;\n float rz = fbm(st);\n st /= exp(mod( time * 2.0, pi));\n rz *= pow(15., 0.9);\n vec4 temp = vec4(0);\n temp = mix( color / rz, vec4(color.rgb, 0.1), 0.2);\n if (st2.s < 0.05) {\n temp = mix(vec4(color.rgb, 0.1), temp, st2.s / 0.05);\n }\n if (st2.s > 0.95){\n temp = mix(temp, vec4(color.rgb, 0.1), (st2.s - 0.95) / 0.05);\n }\n material.diffuse = temp.rgb;\n material.alpha = temp.a * 2.0;\n return material;\n }\n",O={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class j extends t{speed;color;name="";constructor(t){super();const a={...O,...t};this.name=`${n.EllipsoidVScan}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof j&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:Z},translucent:()=>!0})}}const H=t=>{const a={...O,...t};return{material:new e.Material({fabric:{type:`${n.EllipsoidVScan}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed},source:Z},translucent:!0})}},Z="\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n float alpha = abs(smoothstep(0.5,1.,fract( -st.t - time)));\n alpha += .1;\n material.alpha = alpha;\n material.diffuse = color.rgb;\n return material;\n }\n",k={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class A extends t{speed;color;name="";constructor(t){super();const a={...k,...t};this.name=`${n.EllipsoidHScan}-${r()}`,this.color=e.Color.fromCssColorString(a.color),this.speed=a.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof A&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:B},translucent:()=>!0})}}const L=t=>{const a={...k,...t};return{material:new e.Material({fabric:{type:`${n.EllipsoidHScan}-${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),speed:a.speed},source:B},translucent:!0})}},B="\nuniform vec4 color; \nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n float t = fract( czm_frameNumber * speed / 1000.0);; \n t *= 1.03;\n float alpha = smoothstep(t- 0.03, t, st.s) * step(-t, -st.s); \n alpha += 0.1;\n alpha *= step(-0.5, -abs(0.5-st.t)); \n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n}\n",G={color:"rgba(255,255,255,1)",speed:1};class J extends t{color;speed;name="";constructor(t){super();const r={...G,...t};this.name=n.Zaps,this.color=e.Color.fromCssColorString(r.color),this.speed=r.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r}equals(t){return this===t||t instanceof J&&e.Property.equals(this.color,t.color)&&this.speed===t.speed&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(n.Zaps,{fabric:{type:n.Zaps,uniforms:{uColor:this.color,speed:this.speed,uResolution:new e.Cartesian2(1024,1024)},source:Q},translucent:()=>!0})}}const K=t=>{const r={...G,...t};return{material:new e.Material({fabric:{type:n.Zaps,uniforms:{uColor:e.Color.fromCssColorString(r.color),uSpeed:r.speed,uResolution:new e.Cartesian2(1024,1024)},source:Q}})}},Q="\n uniform float uSpeed;\n uniform vec4 uColor;\n uniform vec2 uResolution;\n\n void mainImage(out vec4 o, vec2 u, float time)\n {\n vec2 v = uResolution.xy;\n u = .2*(u+u-v)/v.y;\n\n vec4 z = o = vec4(1,2,3,0);\n for (float a = .5, t = time, i;\n ++i < 19.;\n o += (1. + cos(z+t))\n / length((1.+i*dot(v,v))\n * sin(1.5*u/(.5-dot(u,u)) - 9.*u.yx + t))\n )\n v = cos(++t - 7.*u*pow(a += .03, i)) - 5.*u,\n // use stanh here if shader has black artifacts\n // vvvv\n u += tanh(40. * dot(u *= mat2(cos(i + .02*t - vec4(0,11,33,0)))\n ,u)\n * cos(1e2*u.yx + t)) / 2e2\n + .2 * a * u\n + cos(4./exp(dot(o,o)/1e2) + t) / 3e2;\n\n o = 25.6 / (min(o, 13.) + 164. / o)\n - dot(u, u) / 250.;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput) {\n float time = fract(czm_frameNumber * speed / 1000.0);\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec4 color = vec4(0.0,0.0,0.0,1.0);\n mainImage(color,materialInput.st * uResolution,time);\n\n material.diffuse = color.rgb * uColor.rgb;\n material.alpha = 0.33 + (sin(time * 0.3) + 1.0) / 3.0;\n return material;\n }\n ";export{$ as CircleApertureMaterialProperty,z as CircleRaderFanMaterialProperty,v as CircleRaderWaveMaterialProperty,f as CircleWaveMaterialProperty,V as EllipsoidElectricMaterialProperty,A as EllipsoidHScanMaterialProperty,j as EllipsoidVScanMaterialProperty,T as LightWallMaterialProperty,a as Material,m as PolylineFlowMaterialProperty,o as PolylineTrailMaterialProperty,J as ZapsMaterialProperty,w as createCircleApertureMaterial,I as createCircleRaderFanMaterial,h as createCircleWaveMaterial,W as createEllipsoidElectricMaterial,L as createEllipsoidHScanMaterial,H as createEllipsoidVScanMaterial,q as createLightWallMaterial,u as createPoylineFlowMaterial,b as createRaderWaveMaterial,D as createScanRadarMaterial,s as createTrailMaterial,K as createZapsMaterial};
1
+ import*as e from"cesium";import{BaseMaterialProperty as t,numberId as r}from"@ino-cesium/common";const a={PolylineFlow:"PolylineFlow",PolylineTrail:"PolylineTrail",CircleWave:"CircleWave",CircleRaderWave:"CircleRaderWave",CircleRaderFan:"CircleRaderFan",LightWall:"LightWall",CircleAperture:"CircleAperture",RadarScanCircle:"RadarScanCircle",EllipsoidElectric:"EllipsoidElectric",EllipsoidVScan:"EllipsoidVScan",EllipsoidHScan:"EllipsoidHScan",Corridor:"Corridor",Zaps:"Zaps"};(()=>{console.log("初始化材质");for(const t in a)e.Material[t]=a[t]})();const n={color:"rgba(255,255,255,1)",speed:6*Math.random()};class i extends t{speed;color;name="";image="";constructor(t){console.log("dsjfkldsjflkdsf"),super(),this.createPropertyDescriptors();const i={...n,...t};this.image=i.image,this.name=`${a.PolylineTrail}-${r()}`,this.color=e.Color.fromCssColorString(i.color),this.speed=i.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=e.Property.getValueOrClonedDefault(this.color,t,e.Color.WHITE,r.color),r.speed=this.speed,r.image=this.image,r}equals(t){return this===t||t instanceof i&&this.speed===t.speed&&e.Property.equals(this.color,t.color)&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{image:this.image,color:e.Color.fromCssColorString("#ff0000"),speed:this.speed},source:s},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:e.createPropertyDescriptor("color")})}}const o=t=>{const i={...n,...t};return new e.Material({fabric:{type:`${a.PolylineTrail}-${r()}`,uniforms:{color:e.Color.fromCssColorString(i.color),image:i.image,speed:i.speed},source:s},translucent:!0})},s="\n uniform sampler2D image;\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec4 colorImage = texture(image,st);\n vec3 fragColor = color.rgb;\n if(st.t > 0.45 && st.t < 0.55 ) {\n fragColor = vec3(1.0);\n }\n if(color.a == 0.0){\n material.alpha = colorImage.a * 1.5 * fract(st.s - time);\n material.diffuse = colorImage.rgb;\n }else{\n material.alpha = colorImage.a * color.a * 1.5 * smoothstep(.0,1., fract(st.s - time));\n material.diffuse = max(fragColor.rgb * material.alpha , fragColor.rgb);\n }\n return material;\n }\n\n",l={color:"rgba(255,255,255,1)",speed:6,repeatCount:4,blendColor:!0};class c extends t{repeatCount;image;speed;color;blend;name="";constructor(t){super(),this.createPropertyDescriptors();const n={...l,...t};this.name=`${a.PolylineFlow}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.image=n.image,this.repeatCount=n.repeatCount,this.blend=n.blendColor?1:0,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=e.Property.getValueOrClonedDefault(this.color,t,e.Color.WHITE,r.color),r.image=this.image,r.blend=this.blend,r.speed=this.speed,r.repeatCount=this.repeatCount,r}equals(e){return this===e||e instanceof c&&this.speed===e.speed&&this.repeatCount===e.repeatCount&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:e.Color.fromCssColorString("#ffffff"),image:"",speed:this.speed,count:this.repeatCount,blend:this.blend},source:u},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:e.createPropertyDescriptor("color")})}}const m=t=>{const n={...l,...t};return new e.Material({fabric:{type:a.PolylineFlow+r(),uniforms:{color:e.Color.fromCssColorString(n.color),image:n.image,speed:n.speed,count:n.repeatCount,blend:n.blendColor?1:0},source:u},translucent:!0})},u="\n uniform vec4 color;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image, vec2(fract( count * st.s - time),fract(st.t)));\n material.alpha = colorImage.a * color.a;\n if(blend > 0.5) {\n material.diffuse = (colorImage.rgb + color.rgb) * 2.0;\n } else {\n material.diffuse = color.rgb * 2.0 ;\n }\n return material;\n }\n",p={color:"rgba(255,255,0,0.3)",speed:8,count:5,gradient:.3};class d extends t{count;speed;gradient;color;name="";constructor(t){super(),t||(t={});const n={...p,...t};this.name=`${a.CircleWave}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.count=n.count,this.gradient=n.gradient,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r.speed=this.speed,r.repeatCount=this.count||p.count,r}equals(t){return this===t||t instanceof d&&e.Property.equals(this.color,t.color)&&this.speed===t.speed&&this.count===t.count&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new e.Color(1,0,0,.5),speed:this.speed,count:this.count,gradient:this.gradient},source:h},translucent:()=>!0})}}const f=t=>{const n={...p,...t};return{material:new e.Material({fabric:{type:`${a.CircleWave}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed,count:n.count,gradient:n.gradient},source:h},translucent:!0})}},h="\n uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n if(count == 1.0){\n if(dis > per * 0.5){\n discard;\n }else {\n material.alpha = color.a * dis / per / 2.0;\n }\n } else {\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 999; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n }\n else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n }\n return material;\n }\n",g={color:"rgba(255,255,255,1)",speed:8};class C extends t{speed;color;name="";constructor(t){super();const n={...g,...t};this.name=`${a.CircleRaderWave}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof C&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:b},translucent:()=>!0})}}const v=t=>{const n={...g,...t};return{material:new e.Material({fabric:{type:`${a.CircleRaderWave}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed},source:b},translucent:!0})}},b="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n float rand(vec2 co){\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 pos = st - vec2(0.5);\n float time = czm_frameNumber * speed / 1000.0 ;\n float r = length(pos);\n float t = atan(pos.y, pos.x) - time * 2.5;\n float a = (atan(sin(t), cos(t)) + PI)/(2.0*PI);\n float ta = 0.5;\n float v = smoothstep(ta-0.05,ta+0.05,a) * smoothstep(ta+0.05,ta-0.05,a);\n vec3 flagColor = color.rgb * v;\n float blink = pow(sin(time*1.5)*0.5+0.5, 0.8);\n flagColor = color.rgb * pow(a, 4.0*(.2+blink))*(sin(r*500.0)*.5+.5) ;\n flagColor = flagColor * pow(r, 0.4);\n material.alpha = length(flagColor) * 1.3;\n material.diffuse = flagColor * 3.0;\n return material;\n }\n",y={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class _ extends t{speed;color;name="";constructor(t){super();const n={...y,...t};this.name=`${a.CircleRaderFan}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof _&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:I},translucent:()=>!0})}}const z=t=>{const n={...y,...t};return{material:new e.Material({fabric:{type:`${a.CircleRaderFan}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed},source:I},translucent:!0})}},I="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // 绘制边线\n float dis = distance(materialInput.st, vec2(0.5));\n float alpha = step((0.5- 0.01), dis);\n\n material.alpha = alpha;\n material.diffuse = color.rgb;\n\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n float per = czm_frameNumber * speed / PI * 3.0 / 200.0;\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + per;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = (alpha + color.a) * dis;\n material.diffuse = color.rgb;\n }\n return material;\n }\n",x={color:"rgba(255,255,0,0.3)",speed:8};class M extends t{speed;color;name="";constructor(t){super(),t||(t={});const n={...x,...t};this.name=`${a.CircleAperture}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r.speed=this.speed,r}equals(t){return this===t||t instanceof M&&e.Property.equals(this.color,t.color)&&this.speed===t.speed&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new e.Color(1,0,0,.5),speed:this.speed},source:w},translucent:()=>!0})}}const $=t=>{const n={...x,...t};return new e.Material({fabric:{type:`${a.CircleAperture}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed},source:w},translucent:!0})},w="\n uniform vec4 color;\n uniform float speed;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float d = distance(st, vec2(0.5, 0.5));\n float alpha = step(.15, d) * step(d, .17) + step(.49, d) * step(d, 0.5) + d * d * step(d, 0.5);\n float movingCircleD = fract(czm_frameNumber * speed / 1000.0);\n alpha += step(movingCircleD, d) * step(d, movingCircleD + .015);\n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n }\n",S=t=>{t||(t={});return new e.Material({fabric:{type:`${a.RadarScanCircle}-${r()}`,uniforms:{radians:3*Math.PI/8,bgColor:e.Color.fromCssColorString(t.bgColor||"rgba(0,255,0,0.2)"),sectorColor:e.Color.fromCssColorString(t.sectorColor||"rgba(152,18,8,.1)"),width:t.width||.003,offset:t.offset||0,count:t.count||3},source:D},translucent:!0})},D="\n uniform vec4 bgColor;\n uniform vec4 sectorColor;\n uniform float count;\n uniform float radians;\n uniform float width;\n uniform float offset;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5));\n\n float alpha;\n vec3 diffuse;\n // 绘制圆圈\n float sp = 1.0 / count / 2.0;\n float m = mod(dis, sp);\n alpha = step(sp * (1.0 - width * 10.0), m);\n // alpha = clamp(alpha, 0.2, 1.0);\n if (alpha < bgColor.a){\n alpha = bgColor.a;\n diffuse = bgColor.rgb;\n } else {\n diffuse = bgColor.rgb;\n }\n material.alpha = alpha;\n material.diffuse = diffuse;\n // 绘制十字线\n if ((st.s > 0.5 - width / 2.0 && st.s < 0.5 + width / 2.0) || (st.t > 0.5 - width / 2.0 && st.t < 0.5 + width / 2.0)) {\n material.alpha = 0.8;\n material.diffuse = bgColor.rgb;\n return material;\n }\n // 绘制光晕\n float ma = mod(dis + offset, 0.5);\n if (ma < 0.25){\n alpha = ma * 3.0 + alpha;\n } else{\n alpha = 3.0 * (0.5 - ma) + alpha;\n }\n material.alpha = alpha;\n material.diffuse = bgColor.rgb;\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + radians;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = alpha + sectorColor.a;\n material.diffuse = sectorColor.rgb;\n }\n return material;\n }\n",P={color:"rgba(255,255,255,1)",count:3,duration:1500};class N extends t{duration;count;vertical;direction;color;_time;image;name="";constructor(t){super();const a={...P,...t};Object.prototype.hasOwnProperty.call(a,"vertical")||(a.vertical=1),this.name=`LightWall-${r()}`,this._time=(new Date).getTime(),this.color=e.Color.fromCssColorString(a.color),this.duration=a.duration,this.count=a.count,this.vertical=a.vertical,this.image=a.image,this.direction=a.direction,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r.image=this.image,r.vertical=this.vertical,r.direction=this.direction,r.count=this.count,r.duration=this.duration,this.duration&&(r.time=((new Date).getTime()-this._time)%this.duration/this.duration),r}equals(t){return this===t||t instanceof N&&e.Property.equals(this.color,t.color)&&this.name===t.name&&this.image===t.image&&this.vertical===t.vertical&&this.direction===t.direction&&this.count===t.count&&this.duration===t.duration}init(){const t=q({count:this.count,vertical:this.vertical,direction:this.direction});e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,duration:this.duration,vertical:this.vertical,image:this.image,count:this.count,time:-20},source:t},translucent:()=>!0})}}const T=t=>{const a={...P,...t};return{material:new e.Material({fabric:{type:`LightWall${r()}`,uniforms:{color:e.Color.fromCssColorString(a.color),duration:a.duration,vertical:a.vertical,image:a.image,count:a.count,time:-20},source:q({count:a.count,vertical:a.vertical,direction:a.direction})}})}},q=e=>{const t=e.vertical?"vertical":"standard",r=e.direction?"+":"-";let a="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;";return a+="vertical"===t?`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.t ${r} time)),fract(st.s));\n `:`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.s ${r} time), fract(st.t)));\n `,a+="vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a * color.a;\n material.emission = fragColor.rgb;\n return material;\n }",a},E={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class R extends t{speed;color;name="";constructor(t){super();const n={...E,...t};this.name=`${a.EllipsoidElectric}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof R&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:W},translucent:()=>!0})}}const V=t=>{const n={...E,...t};return{material:new e.Material({fabric:{type:`${a.EllipsoidElectric}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed},source:W},translucent:!0})}},W="\n uniform vec4 color;\n uniform float speed;\n #define pi 3.1415926535\n #define PI2RAD 0.01745329252\n #define TWO_PI (2. * PI)\n\n float rands(float p){\n return fract(sin(p) * 10000.0);\n }\n\n float noise(vec2 p){\n float time = fract( czm_frameNumber * speed / 1000.0);\n float t = time / 20000.0;\n\n if(t > 1.0) t -= floor(t);\n return rands(p.x * 14. + p.y * sin(t) * 0.5);\n }\n\n vec2 sw(vec2 p){\n return vec2(floor(p.x), floor(p.y));\n }\n\n vec2 se(vec2 p){\n return vec2(ceil(p.x), floor(p.y));\n }\n\n vec2 nw(vec2 p){\n return vec2(floor(p.x), ceil(p.y));\n }\n\n vec2 ne(vec2 p){\n return vec2(ceil(p.x), ceil(p.y));\n }\n\n float smoothNoise(vec2 p){\n vec2 inter = smoothstep(0.0, 1.0, fract(p));\n float s = mix(noise(sw(p)), noise(se(p)), inter.x);\n float n = mix(noise(nw(p)), noise(ne(p)), inter.x);\n return mix(s, n, inter.y);\n }\n\n float fbm(vec2 p){\n float z = 2.0;\n float rz = 0.0;\n vec2 bp = p;\n for(float i = 1.0; i < 6.0; i++){\n rz += abs((smoothNoise(p) - 0.5)* 2.0) / z;\n z *= 2.0;\n p *= 2.0;\n }\n return rz;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 st2 = materialInput.st;\n float time = fract( czm_frameNumber * speed / 1000.0);\n if (st.t < 0.5) {\n discard;\n }\n st *= 4.;\n float rz = fbm(st);\n st /= exp(mod( time * 2.0, pi));\n rz *= pow(15., 0.9);\n vec4 temp = vec4(0);\n temp = mix( color / rz, vec4(color.rgb, 0.1), 0.2);\n if (st2.s < 0.05) {\n temp = mix(vec4(color.rgb, 0.1), temp, st2.s / 0.05);\n }\n if (st2.s > 0.95){\n temp = mix(temp, vec4(color.rgb, 0.1), (st2.s - 0.95) / 0.05);\n }\n material.diffuse = temp.rgb;\n material.alpha = temp.a * 2.0;\n return material;\n }\n",F={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class O extends t{speed;color;name="";constructor(t){super();const n={...F,...t};this.name=`${a.EllipsoidVScan}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof O&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:Z},translucent:()=>!0})}}const H=t=>{const n={...F,...t};return{material:new e.Material({fabric:{type:`${a.EllipsoidVScan}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed},source:Z},translucent:!0})}},Z="\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n float alpha = abs(smoothstep(0.5,1.,fract( -st.t - time)));\n alpha += .1;\n material.alpha = alpha;\n material.diffuse = color.rgb;\n return material;\n }\n",j={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class k extends t{speed;color;name="";constructor(t){super();const n={...j,...t};this.name=`${a.EllipsoidHScan}-${r()}`,this.color=e.Color.fromCssColorString(n.color),this.speed=n.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(t,r){return e.defined(r)||(r={}),r.speed=this.speed,r}equals(e){return this===e||e instanceof k&&this.speed===e.speed&&this.name===e.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:L},translucent:()=>!0})}}const A=t=>{const n={...j,...t};return{material:new e.Material({fabric:{type:`${a.EllipsoidHScan}-${r()}`,uniforms:{color:e.Color.fromCssColorString(n.color),speed:n.speed},source:L},translucent:!0})}},L="\nuniform vec4 color; \nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n float t = fract( czm_frameNumber * speed / 1000.0);; \n t *= 1.03;\n float alpha = smoothstep(t- 0.03, t, st.s) * step(-t, -st.s); \n alpha += 0.1;\n alpha *= step(-0.5, -abs(0.5-st.t)); \n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n}\n",B={color:"rgba(255,255,255,1)",speed:1};class G extends t{color;speed;name="";constructor(t){super();const r={...B,...t};this.name=a.Zaps,this.color=e.Color.fromCssColorString(r.color),this.speed=r.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(t,r){return e.defined(r)||(r={}),r.color=this.color,r}equals(t){return this===t||t instanceof G&&e.Property.equals(this.color,t.color)&&this.speed===t.speed&&this.name===t.name}init(){e.Material[this.name]=this.name,e.Material._materialCache.addMaterial(a.Zaps,{fabric:{type:a.Zaps,uniforms:{uColor:this.color,speed:this.speed,uResolution:new e.Cartesian2(1024,1024)},source:K},translucent:()=>!0})}}const J=t=>{const r={...B,...t};return{material:new e.Material({fabric:{type:a.Zaps,uniforms:{uColor:e.Color.fromCssColorString(r.color),uSpeed:r.speed,uResolution:new e.Cartesian2(1024,1024)},source:K}})}},K="\n uniform float uSpeed;\n uniform vec4 uColor;\n uniform vec2 uResolution;\n\n void mainImage(out vec4 o, vec2 u, float time)\n {\n vec2 v = uResolution.xy;\n u = .2*(u+u-v)/v.y;\n\n vec4 z = o = vec4(1,2,3,0);\n for (float a = .5, t = time, i;\n ++i < 19.;\n o += (1. + cos(z+t))\n / length((1.+i*dot(v,v))\n * sin(1.5*u/(.5-dot(u,u)) - 9.*u.yx + t))\n )\n v = cos(++t - 7.*u*pow(a += .03, i)) - 5.*u,\n // use stanh here if shader has black artifacts\n // vvvv\n u += tanh(40. * dot(u *= mat2(cos(i + .02*t - vec4(0,11,33,0)))\n ,u)\n * cos(1e2*u.yx + t)) / 2e2\n + .2 * a * u\n + cos(4./exp(dot(o,o)/1e2) + t) / 3e2;\n\n o = 25.6 / (min(o, 13.) + 164. / o)\n - dot(u, u) / 250.;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput) {\n float time = fract(czm_frameNumber * speed / 1000.0);\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec4 color = vec4(0.0,0.0,0.0,1.0);\n mainImage(color,materialInput.st * uResolution,time);\n\n material.diffuse = color.rgb * uColor.rgb;\n material.alpha = 0.33 + (sin(time * 0.3) + 1.0) / 3.0;\n return material;\n }\n ";export{M as CircleApertureMaterialProperty,_ as CircleRaderFanMaterialProperty,C as CircleRaderWaveMaterialProperty,d as CircleWaveMaterialProperty,R as EllipsoidElectricMaterialProperty,k as EllipsoidHScanMaterialProperty,O as EllipsoidVScanMaterialProperty,N as LightWallMaterialProperty,c as PolylineFlowMaterialProperty,i as PolylineTrailMaterialProperty,G as ZapsMaterialProperty,$ as createCircleApertureMaterial,z as createCircleRaderFanMaterial,f as createCircleWaveMaterial,V as createEllipsoidElectricMaterial,A as createEllipsoidHScanMaterial,H as createEllipsoidVScanMaterial,T as createLightWallMaterial,m as createPoylineFlowMaterial,v as createRaderWaveMaterial,S as createScanRadarMaterial,o as createTrailMaterial,J as createZapsMaterial};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ino-cesium/material",
3
3
  "type": "module",
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "author": "koino",
6
6
  "keywords": [
7
7
  "cesium",
@@ -28,7 +28,7 @@
28
28
  "cesium": "1.134.0"
29
29
  },
30
30
  "dependencies": {
31
- "@ino-cesium/common": "0.0.23"
31
+ "@ino-cesium/common": "0.0.24"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "rimraf dist && rollup -c",