• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Defines a pair of given type for particle.
23 *
24 * @typedef { [T1, T2] } ParticleTuple
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @crossplatform
27 * @atomicservice
28 * @since 18
29 */
30declare type ParticleTuple<T1, T2> = [T1, T2];
31
32/**
33 * Defines velocity options.
34 *
35 * @typedef VelocityOptions
36 * @syscap SystemCapability.ArkUI.ArkUI.Full
37 * @crossplatform
38 * @atomicservice
39 * @since 18
40 */
41declare interface VelocityOptions {
42  /**
43   * Particle speed.
44   * @type { ParticleTuple<number, number> }
45   * @syscap SystemCapability.ArkUI.ArkUI.Full
46   * @crossplatform
47   * @since 10
48   */
49  /**
50   * Particle speed.
51   * @type { ParticleTuple<number, number> }
52   * @syscap SystemCapability.ArkUI.ArkUI.Full
53   * @crossplatform
54   * @atomicservice
55   * @since 11
56   */
57  /**
58   * Particle speed.
59   *
60   * Anonymous Object Rectification.
61   * @type { ParticleTuple<number, number> }
62   * @syscap SystemCapability.ArkUI.ArkUI.Full
63   * @crossplatform
64   * @atomicservice
65   * @since 18
66   */
67  speed: ParticleTuple<number, number>;
68
69  /**
70   * Angle of particle's direction.
71   * @type { ParticleTuple<number, number> }
72   * @syscap SystemCapability.ArkUI.ArkUI.Full
73   * @crossplatform
74   * @since 10
75   */
76  /**
77   * Angle of particle's direction.
78   * @type { ParticleTuple<number, number> }
79   * @syscap SystemCapability.ArkUI.ArkUI.Full
80   * @crossplatform
81   * @atomicservice
82   * @since 11
83   */
84  /**
85   * Angle of particle's direction.
86   *
87   * Anonymous Object Rectification.
88   * @type { ParticleTuple<number, number> }
89   * @syscap SystemCapability.ArkUI.ArkUI.Full
90   * @crossplatform
91   * @atomicservice
92   * @since 18
93   */
94  angle: ParticleTuple<number, number>;
95}
96
97/**
98 * Defines acceleration options.
99 *
100 * @typedef AccelerationOptions<ACC_SPEED_UPDATER extends ParticleUpdater, ACC_ANGLE_UPDATER extends ParticleUpdater>
101 * @syscap SystemCapability.ArkUI.ArkUI.Full
102 * @crossplatform
103 * @atomicservice
104 * @since 18
105 */
106declare interface AccelerationOptions<
107  ACC_SPEED_UPDATER extends ParticleUpdater,
108  ACC_ANGLE_UPDATER extends ParticleUpdater
109> {
110  /**
111   * Speed property options.
112   * @type { ?ParticlePropertyOptions<number, ACC_SPEED_UPDATER> }
113   * @syscap SystemCapability.ArkUI.ArkUI.Full
114   * @crossplatform
115   * @since 10
116   */
117  /**
118   * Speed property options.
119   * @type { ?ParticlePropertyOptions<number, ACC_SPEED_UPDATER> }
120   * @syscap SystemCapability.ArkUI.ArkUI.Full
121   * @crossplatform
122   * @atomicservice
123   * @since 11
124   */
125  /**
126   * Speed property options.
127   *
128   * Anonymous Object Rectification.
129   * @type { ?ParticlePropertyOptions<number, ACC_SPEED_UPDATER> }
130   * @syscap SystemCapability.ArkUI.ArkUI.Full
131   * @crossplatform
132   * @atomicservice
133   * @since 18
134   */
135  speed?: ParticlePropertyOptions<number, ACC_SPEED_UPDATER>;
136
137  /**
138   * Angle property options.
139   * @type { ?ParticlePropertyOptions<number, ACC_ANGLE_UPDATER> }
140   * @syscap SystemCapability.ArkUI.ArkUI.Full
141   * @crossplatform
142   * @since 10
143   */
144  /**
145   * Angle property options.
146   * @type { ?ParticlePropertyOptions<number, ACC_ANGLE_UPDATER> }
147   * @syscap SystemCapability.ArkUI.ArkUI.Full
148   * @crossplatform
149   * @atomicservice
150   * @since 11
151   */
152  /**
153   * Angle property options.
154   *
155   * Anonymous Object Rectification.
156   * @type { ?ParticlePropertyOptions<number, ACC_ANGLE_UPDATER> }
157   * @syscap SystemCapability.ArkUI.ArkUI.Full
158   * @crossplatform
159   * @atomicservice
160   * @since 18
161   */
162  angle?: ParticlePropertyOptions<number, ACC_ANGLE_UPDATER>;
163}
164
165/**
166 * Defines the ParticleOptions Interface.
167 * @interface ParticleOptions
168 * @syscap SystemCapability.ArkUI.ArkUI.Full
169 * @crossplatform
170 * @since 10
171 */
172/**
173 * Defines the ParticleOptions Interface.
174 * @interface ParticleOptions
175 * @syscap SystemCapability.ArkUI.ArkUI.Full
176 * @crossplatform
177 * @atomicservice
178 * @since 11
179 */
180interface ParticleOptions<
181  PARTICLE extends ParticleType,
182  COLOR_UPDATER extends ParticleUpdater,
183  OPACITY_UPDATER extends ParticleUpdater,
184  SCALE_UPDATER extends ParticleUpdater,
185  ACC_SPEED_UPDATER extends ParticleUpdater,
186  ACC_ANGLE_UPDATER extends ParticleUpdater,
187  SPIN_UPDATER extends ParticleUpdater
188> {
189  /**
190   * Particle emitter.
191   * @type { EmitterOptions<PARTICLE> }
192   * @syscap SystemCapability.ArkUI.ArkUI.Full
193   * @crossplatform
194   * @since 10
195   */
196  /**
197   * Particle emitter.
198   * @type { EmitterOptions<PARTICLE> }
199   * @syscap SystemCapability.ArkUI.ArkUI.Full
200   * @crossplatform
201   * @atomicservice
202   * @since 11
203   */
204  emitter: EmitterOptions<PARTICLE>;
205
206  /**
207   * Particle color.
208   * @type { ?ParticleColorPropertyOptions<COLOR_UPDATER> }
209   * @default {range:['#FFFFFF','#FFFFFF']}
210   * @syscap SystemCapability.ArkUI.ArkUI.Full
211   * @crossplatform
212   * @since 10
213   */
214  /**
215   * Particle color.
216   * @type { ?ParticleColorPropertyOptions<COLOR_UPDATER> }
217   * @default {range:['#FFFFFF','#FFFFFF']}
218   * @syscap SystemCapability.ArkUI.ArkUI.Full
219   * @crossplatform
220   * @atomicservice
221   * @since 11
222   */
223  color?: ParticleColorPropertyOptions<COLOR_UPDATER>;
224
225  /**
226   * Particle opacity.
227   * @type { ?ParticlePropertyOptions<number, OPACITY_UPDATER> }
228   * @default {range:[1.0,1.0]}
229   * @syscap SystemCapability.ArkUI.ArkUI.Full
230   * @crossplatform
231   * @since 10
232   */
233  /**
234   * Particle opacity.
235   * @type { ?ParticlePropertyOptions<number, OPACITY_UPDATER> }
236   * @default {range:[1.0,1.0]}
237   * @syscap SystemCapability.ArkUI.ArkUI.Full
238   * @crossplatform
239   * @atomicservice
240   * @since 11
241   */
242  opacity?: ParticlePropertyOptions<number, OPACITY_UPDATER>;
243
244  /**
245   * Particle scale.
246   * @type { ?ParticlePropertyOptions<number, SCALE_UPDATER> }
247   * @default {range:[1.0,1.0]}
248   * @syscap SystemCapability.ArkUI.ArkUI.Full
249   * @crossplatform
250   * @since 10
251   */
252  /**
253   * Particle scale.
254   * @type { ?ParticlePropertyOptions<number, SCALE_UPDATER> }
255   * @default {range:[1.0,1.0]}
256   * @syscap SystemCapability.ArkUI.ArkUI.Full
257   * @crossplatform
258   * @atomicservice
259   * @since 11
260   */
261  scale?: ParticlePropertyOptions<number, SCALE_UPDATER>;
262
263  /**
264   * Particle velocity.
265   * @type { ?object }
266   * @default {speed:[0,0];angle:[0,0]}
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @crossplatform
269   * @since 10
270   */
271  /**
272   * Particle velocity.
273   * @type { ?object }
274   * @default {speed:[0,0];angle:[0,0]}
275   * @syscap SystemCapability.ArkUI.ArkUI.Full
276   * @crossplatform
277   * @atomicservice
278   * @since 11
279   */
280  /**
281   * Particle velocity.
282   *
283   * Anonymous Object Rectification.
284   * @type { ?VelocityOptions }
285   * @default {speed:[0,0];angle:[0,0]}
286   * @syscap SystemCapability.ArkUI.ArkUI.Full
287   * @crossplatform
288   * @atomicservice
289   * @since 18
290   */
291  velocity?: VelocityOptions;
292
293  /**
294   * Particle acceleration.
295   * @type { ?object }
296   * @default {speed:{range:[0,0]};angle:{range:[0,0]}}
297   * @syscap SystemCapability.ArkUI.ArkUI.Full
298   * @crossplatform
299   * @since 10
300   */
301  /**
302   * Particle acceleration.
303   * @type { ?object }
304   * @default {speed:{range:[0,0]};angle:{range:[0,0]}}
305   * @syscap SystemCapability.ArkUI.ArkUI.Full
306   * @crossplatform
307   * @atomicservice
308   * @since 11
309   */
310  /**
311   * Particle acceleration.
312   *
313   * Anonymous Object Rectification.
314   * @type { ?AccelerationOptions<ACC_SPEED_UPDATER, ACC_ANGLE_UPDATER> }
315   * @default {speed:{range:[0,0]};angle:{range:[0,0]}}
316   * @syscap SystemCapability.ArkUI.ArkUI.Full
317   * @crossplatform
318   * @atomicservice
319   * @since 18
320   */
321  acceleration?: AccelerationOptions<ACC_SPEED_UPDATER, ACC_ANGLE_UPDATER>;
322
323  /**
324   * Particle spin.
325   * @type { ?ParticlePropertyOptions<number, SPIN_UPDATER> }
326   * @default {range:[0,0]}
327   * @syscap SystemCapability.ArkUI.ArkUI.Full
328   * @crossplatform
329   * @since 10
330   */
331  /**
332   * Particle spin.
333   * @type { ?ParticlePropertyOptions<number, SPIN_UPDATER> }
334   * @default {range:[0,0]}
335   * @syscap SystemCapability.ArkUI.ArkUI.Full
336   * @crossplatform
337   * @atomicservice
338   * @since 11
339   */
340  spin?: ParticlePropertyOptions<number, SPIN_UPDATER>;
341}
342
343/**
344 * Defines the parameters for a point-like particle.
345 * @interface PointParticleParameters
346 * @syscap SystemCapability.ArkUI.ArkUI.Full
347 * @crossplatform
348 * @since 10
349 */
350/**
351 * Defines the parameters for a point-like particle.
352 * @interface PointParticleParameters
353 * @syscap SystemCapability.ArkUI.ArkUI.Full
354 * @crossplatform
355 * @atomicservice
356 * @since 11
357 */
358interface PointParticleParameters {
359  /**
360   * Particle radius.
361   * @type { VP }
362   * @syscap SystemCapability.ArkUI.ArkUI.Full
363   * @crossplatform
364   * @since 10
365   */
366  /**
367   * Particle radius.
368   * @type { VP }
369   * @syscap SystemCapability.ArkUI.ArkUI.Full
370   * @crossplatform
371   * @atomicservice
372   * @since 11
373   */
374  radius: VP;
375}
376
377/**
378 * Defines the parameters for an image-like particle.
379 * @interface ImageParticleParameters
380 * @syscap SystemCapability.ArkUI.ArkUI.Full
381 * @crossplatform
382 * @since 10
383 */
384/**
385 * Defines the parameters for an image-like particle.
386 * @interface ImageParticleParameters
387 * @syscap SystemCapability.ArkUI.ArkUI.Full
388 * @crossplatform
389 * @atomicservice
390 * @since 11
391 */
392interface ImageParticleParameters {
393  /**
394   * Particle image pixelMap.
395   * @type { ResourceStr }
396   * @syscap SystemCapability.ArkUI.ArkUI.Full
397   * @crossplatform
398   * @since 10
399   */
400  /**
401   * Particle image pixelMap.
402   * @type { ResourceStr }
403   * @syscap SystemCapability.ArkUI.ArkUI.Full
404   * @crossplatform
405   * @atomicservice
406   * @since 11
407   */
408  src: ResourceStr;
409
410  /**
411   * Particle image size.
412   * @type { [Dimension, Dimension] }
413   * @syscap SystemCapability.ArkUI.ArkUI.Full
414   * @crossplatform
415   * @since 10
416   */
417  /**
418   * Particle image size.
419   * @type { [Dimension, Dimension] }
420   * @syscap SystemCapability.ArkUI.ArkUI.Full
421   * @crossplatform
422   * @atomicservice
423   * @since 11
424   */
425  /**
426   * Particle image size.
427   *
428   * Anonymous Object Rectification.
429   * @type { ParticleTuple<Dimension, Dimension> }
430   * @syscap SystemCapability.ArkUI.ArkUI.Full
431   * @crossplatform
432   * @atomicservice
433   * @since 18
434   */
435  size: ParticleTuple<Dimension, Dimension>;
436
437  /**
438   * Image fit.
439   * @type { ?ImageFit }
440   * @default ImageFit.Cover
441   * @syscap SystemCapability.ArkUI.ArkUI.Full
442   * @crossplatform
443   * @since 10
444   */
445  /**
446   * Image fit.
447   * @type { ?ImageFit }
448   * @default ImageFit.Cover
449   * @syscap SystemCapability.ArkUI.ArkUI.Full
450   * @crossplatform
451   * @atomicservice
452   * @since 11
453   */
454  objectFit?: ImageFit;
455}
456
457/**
458 * Defines the particle configs.
459 * @interface ParticleConfigs
460 * @syscap SystemCapability.ArkUI.ArkUI.Full
461 * @crossplatform
462 * @since 10
463 */
464/**
465 * Defines the particle configs.
466 * @interface ParticleConfigs
467 * @syscap SystemCapability.ArkUI.ArkUI.Full
468 * @crossplatform
469 * @atomicservice
470 * @since 11
471 */
472interface ParticleConfigs {
473  /**
474   * Point-like Particle.
475   * @type { PointParticleParameters }
476   * @syscap SystemCapability.ArkUI.ArkUI.Full
477   * @crossplatform
478   * @since 10
479   */
480  /**
481   * Point-like Particle.
482   * @type { PointParticleParameters }
483   * @syscap SystemCapability.ArkUI.ArkUI.Full
484   * @crossplatform
485   * @atomicservice
486   * @since 11
487   */
488  [ParticleType.POINT]: PointParticleParameters;
489
490  /**
491   * Image-like Particle.
492   * @type { ImageParticleParameters }
493   * @syscap SystemCapability.ArkUI.ArkUI.Full
494   * @crossplatform
495   * @since 10
496   */
497  /**
498   * Image-like Particle.
499   * @type { ImageParticleParameters }
500   * @syscap SystemCapability.ArkUI.ArkUI.Full
501   * @crossplatform
502   * @atomicservice
503   * @since 11
504   */
505  [ParticleType.IMAGE]: ImageParticleParameters;
506}
507
508/**
509 * Defines the emitter property.
510 *
511 * @interface EmitterProperty
512 * @syscap SystemCapability.ArkUI.ArkUI.Full
513 * @crossplatform
514 * @atomicservice
515 * @since 12
516 */
517interface EmitterProperty {
518
519  /**
520   * Emitter index.
521   *
522   * @type { number }
523   * @syscap SystemCapability.ArkUI.ArkUI.Full
524   * @crossplatform
525   * @atomicservice
526   * @since 12
527   */
528  index: number;
529
530  /**
531   * Emitter emission rate.
532   *
533   * @type { ?number }
534   * @syscap SystemCapability.ArkUI.ArkUI.Full
535   * @crossplatform
536   * @atomicservice
537   * @since 12
538   */
539  emitRate?: number;
540
541  /**
542   * Emitter emission rate. Only support number type.
543   *
544   * @type { ?PositionT<number> }
545   * @syscap SystemCapability.ArkUI.ArkUI.Full
546   * @crossplatform
547   * @atomicservice
548   * @since 12
549   */
550  position?: PositionT<number>;
551
552  /**
553   * Emitter emission window size. Only support number type.
554   *
555   * @type { ?SizeT<number> }
556   * @syscap SystemCapability.ArkUI.ArkUI.Full
557   * @crossplatform
558   * @atomicservice
559   * @since 12
560   */
561  size?: SizeT<number>;
562}
563
564/**
565 * Defines parameters of particles used by emitters.
566 *
567 * @typedef EmitterParticleOptions<PARTICLE extends ParticleType>
568 * @syscap SystemCapability.ArkUI.ArkUI.Full
569 * @crossplatform
570 * @atomicservice
571 * @since 18
572 */
573interface EmitterParticleOptions<PARTICLE extends ParticleType> {
574  /**
575   * Particle type.
576   * @type { PARTICLE }
577   * @syscap SystemCapability.ArkUI.ArkUI.Full
578   * @crossplatform
579   * @since 10
580   */
581  /**
582   * Particle type.
583   * @type { PARTICLE }
584   * @syscap SystemCapability.ArkUI.ArkUI.Full
585   * @crossplatform
586   * @atomicservice
587   * @since 11
588   */
589  /**
590   * Particle type.
591   *
592   * Anonymous Object Rectification.
593   * @type { PARTICLE }
594   * @syscap SystemCapability.ArkUI.ArkUI.Full
595   * @crossplatform
596   * @atomicservice
597   * @since 18
598   */
599  type: PARTICLE;
600  /**
601   * Particle config.
602   * @type { ParticleConfigs[PARTICLE] }
603   * @syscap SystemCapability.ArkUI.ArkUI.Full
604   * @crossplatform
605   * @since 10
606   */
607  /**
608   * Particle config.
609   * @type { ParticleConfigs[PARTICLE] }
610   * @syscap SystemCapability.ArkUI.ArkUI.Full
611   * @crossplatform
612   * @atomicservice
613   * @since 11
614   */
615  /**
616   * Particle config.
617   *
618   * Anonymous Object Rectification.
619   * @type { ParticleConfigs[PARTICLE] }
620   * @syscap SystemCapability.ArkUI.ArkUI.Full
621   * @crossplatform
622   * @atomicservice
623   * @since 18
624   */
625  config: ParticleConfigs[PARTICLE];
626
627  /**
628   * Particle count.
629   * @type { number }
630   * @syscap SystemCapability.ArkUI.ArkUI.Full
631   * @crossplatform
632   * @since 10
633   */
634  /**
635   * Particle count.
636   * @type { number }
637   * @syscap SystemCapability.ArkUI.ArkUI.Full
638   * @crossplatform
639   * @atomicservice
640   * @since 11
641   */
642  /**
643   * Particle count.
644   *
645   * Anonymous Object Rectification.
646   * @type { number }
647   * @syscap SystemCapability.ArkUI.ArkUI.Full
648   * @crossplatform
649   * @atomicservice
650   * @since 18
651   */
652  count: number;
653
654  /**
655   * Particle lifetime.
656   * @type { ?number }
657   * @default 1000
658   * @syscap SystemCapability.ArkUI.ArkUI.Full
659   * @crossplatform
660   * @since 10
661   */
662  /**
663   * Particle lifetime.
664   * @type { ?number }
665   * @default 1000
666   * @syscap SystemCapability.ArkUI.ArkUI.Full
667   * @crossplatform
668   * @atomicservice
669   * @since 11
670   */
671  /**
672   * Particle lifetime.
673   *
674   * Anonymous Object Rectification.
675   * @type { ?number }
676   * @default 1000
677   * @syscap SystemCapability.ArkUI.ArkUI.Full
678   * @crossplatform
679   * @atomicservice
680   * @since 18
681   */
682  lifetime?: number;
683
684  /**
685   * Particle lifetimeRange,value range [0, ∞).
686   * when lifetimeRange>lifetime,minimum lifetime is 0.
687   * @type { ?number }
688   * @default 0
689   * @syscap SystemCapability.ArkUI.ArkUI.Full
690   * @crossplatform
691   * @atomicservice
692   * @since 12
693   */
694  /**
695   * Particle lifetimeRange,value range [0, ∞).
696   * when lifetimeRange>lifetime,minimum lifetime is 0.
697   *
698   * Anonymous Object Rectification.
699   * @type { ?number }
700   * @default 0
701   * @syscap SystemCapability.ArkUI.ArkUI.Full
702   * @crossplatform
703   * @atomicservice
704   * @since 18
705   */
706  lifetimeRange?: number;
707}
708
709/**
710 * Defines the emitter Options.
711 * @interface EmitterOptions
712 * @syscap SystemCapability.ArkUI.ArkUI.Full
713 * @crossplatform
714 * @since 10
715 */
716/**
717 * Defines the emitter Options.
718 * @interface EmitterOptions
719 * @syscap SystemCapability.ArkUI.ArkUI.Full
720 * @crossplatform
721 * @atomicservice
722 * @since 11
723 */
724interface EmitterOptions<PARTICLE extends ParticleType> {
725  /**
726   * Set particle config.
727   * @type { object }
728   * @syscap SystemCapability.ArkUI.ArkUI.Full
729   * @crossplatform
730   * @since 10
731   */
732  /**
733   * Set particle config.
734   * @type { object }
735   * @syscap SystemCapability.ArkUI.ArkUI.Full
736   * @crossplatform
737   * @atomicservice
738   * @since 11
739   */
740  /**
741   * Set particle config.
742   *
743   * Anonymous Object Rectification.
744   * @type { EmitterParticleOptions<PARTICLE> }
745   * @syscap SystemCapability.ArkUI.ArkUI.Full
746   * @crossplatform
747   * @atomicservice
748   * @since 18
749   */
750  particle: EmitterParticleOptions<PARTICLE>;
751
752  /**
753   * Emitting rate, that is, the number of particles produced per second.
754   * @type { ?number }
755   * @default 5
756   * @syscap SystemCapability.ArkUI.ArkUI.Full
757   * @crossplatform
758   * @since 10
759   */
760  /**
761   * Emitting rate, that is, the number of particles produced per second.
762   * @type { ?number }
763   * @default 5
764   * @syscap SystemCapability.ArkUI.ArkUI.Full
765   * @crossplatform
766   * @atomicservice
767   * @since 11
768   */
769  emitRate?: number;
770
771  /**
772   * Shape of emitter.
773   * @type { ?ParticleEmitterShape }
774   * @default ParticleEmitterShape.RECTANGLE
775   * @syscap SystemCapability.ArkUI.ArkUI.Full
776   * @crossplatform
777   * @since 10
778   */
779  /**
780   * Shape of emitter.
781   * @type { ?ParticleEmitterShape }
782   * @default ParticleEmitterShape.RECTANGLE
783   * @syscap SystemCapability.ArkUI.ArkUI.Full
784   * @crossplatform
785   * @atomicservice
786   * @since 11
787   */
788  shape?: ParticleEmitterShape;
789
790  /**
791   * Position of emitter.
792   * The first element means X-axis location.
793   * The second element means the Y-axis location.
794   * @type { ?[Dimension, Dimension] }
795   * @default [0,0]
796   * @syscap SystemCapability.ArkUI.ArkUI.Full
797   * @crossplatform
798   * @since 10
799   */
800  /**
801   * Position of emitter.
802   * The first element means X-axis location.
803   * The second element means the Y-axis location.
804   * @type { ?[Dimension, Dimension] }
805   * @default [0,0]
806   * @syscap SystemCapability.ArkUI.ArkUI.Full
807   * @crossplatform
808   * @atomicservice
809   * @since 11
810   */
811  /**
812   * Position of emitter.
813   * The first element means X-axis location.
814   * The second element means the Y-axis location.
815   *
816   * Anonymous Object Rectification.
817   * @type { ?ParticleTuple<Dimension, Dimension> }
818   * @default [0,0]
819   * @syscap SystemCapability.ArkUI.ArkUI.Full
820   * @crossplatform
821   * @atomicservice
822   * @since 18
823   */
824  position?: ParticleTuple<Dimension, Dimension>;
825
826  /**
827   * Size of emitter.
828   * The first element means emitter width.
829   * The second element means emitter height.
830   * @type { ?[Dimension, Dimension] }
831   * @default ['100%','100%']
832   * @syscap SystemCapability.ArkUI.ArkUI.Full
833   * @crossplatform
834   * @since 10
835   */
836  /**
837   * Size of emitter.
838   * The first element means emitter width.
839   * The second element means emitter height.
840   * @type { ?[Dimension, Dimension] }
841   * @default ['100%','100%']
842   * @syscap SystemCapability.ArkUI.ArkUI.Full
843   * @crossplatform
844   * @atomicservice
845   * @since 11
846   */
847  /**
848   * Size of emitter.
849   * The first element means emitter width.
850   * The second element means emitter height.
851   *
852   * Anonymous Object Rectification.
853   * @type { ?ParticleTuple<Dimension, Dimension> }
854   * @default ['100%','100%']
855   * @syscap SystemCapability.ArkUI.ArkUI.Full
856   * @crossplatform
857   * @atomicservice
858   * @since 18
859   */
860  size?: ParticleTuple<Dimension, Dimension>;
861}
862
863/**
864 * Defines the particle property updater configs.
865 * @interface ParticlePropertyUpdaterConfigs
866 * @syscap SystemCapability.ArkUI.ArkUI.Full
867 * @crossplatform
868 * @since 10
869 */
870/**
871 * Defines the particle property updater configs.
872 * @interface ParticlePropertyUpdaterConfigs
873 * @syscap SystemCapability.ArkUI.ArkUI.Full
874 * @crossplatform
875 * @atomicservice
876 * @since 11
877 */
878interface ParticlePropertyUpdaterConfigs<T> {
879  /**
880   * No effect of particle updater.
881   *
882   * @type { void }
883   * @syscap SystemCapability.ArkUI.ArkUI.Full
884   * @crossplatform
885   * @since 10
886   */
887  /**
888   * No effect of particle updater.
889   *
890   * @type { void }
891   * @syscap SystemCapability.ArkUI.ArkUI.Full
892   * @crossplatform
893   * @atomicservice
894   * @since 11
895   */
896  [ParticleUpdater.NONE]: void;
897
898  /**
899   * Random effect of particle updater.
900   * @type { [T, T] }
901   * @syscap SystemCapability.ArkUI.ArkUI.Full
902   * @crossplatform
903   * @since 10
904   */
905  /**
906   * Random effect of particle updater.
907   * @type { [T, T] }
908   * @syscap SystemCapability.ArkUI.ArkUI.Full
909   * @crossplatform
910   * @atomicservice
911   * @since 11
912   */
913  /**
914   * Random effect of particle updater.
915   *
916   * Anonymous Object Rectification.
917   * @type { ParticleTuple<T, T> }
918   * @syscap SystemCapability.ArkUI.ArkUI.Full
919   * @crossplatform
920   * @atomicservice
921   * @since 18
922   */
923  [ParticleUpdater.RANDOM]: ParticleTuple<T, T>;
924
925  /**
926   * Curve effect of particle updater.
927   * @type { Array<ParticlePropertyAnimation<T>> }
928   * @syscap SystemCapability.ArkUI.ArkUI.Full
929   * @crossplatform
930   * @since 10
931   */
932  /**
933   * Curve effect of particle updater.
934   * @type { Array<ParticlePropertyAnimation<T>> }
935   * @syscap SystemCapability.ArkUI.ArkUI.Full
936   * @crossplatform
937   * @atomicservice
938   * @since 11
939   */
940  [ParticleUpdater.CURVE]: Array<ParticlePropertyAnimation<T>>;
941}
942
943/**
944 * Defines the particle updater options.
945 *
946 * @typedef ParticleUpdaterOptions<TYPE, UPDATER extends ParticleUpdater>
947 * @syscap SystemCapability.ArkUI.ArkUI.Full
948 * @crossplatform
949 * @atomicservice
950 * @since 18
951 */
952interface ParticleUpdaterOptions<TYPE, UPDATER extends ParticleUpdater> {
953  /**
954   * Particle updater type.
955   * @type { UPDATER }
956   * @syscap SystemCapability.ArkUI.ArkUI.Full
957   * @crossplatform
958   * @since 10
959   */
960  /**
961   * Particle updater type.
962   * @type { UPDATER }
963   * @syscap SystemCapability.ArkUI.ArkUI.Full
964   * @crossplatform
965   * @atomicservice
966   * @since 11
967   */
968  /**
969   * Particle updater type.
970   *
971   * Anonymous Object Rectification.
972   * @type { UPDATER }
973   * @syscap SystemCapability.ArkUI.ArkUI.Full
974   * @crossplatform
975   * @atomicservice
976   * @since 18
977   */
978  type: UPDATER;
979
980  /**
981   * Particle updater configuration.
982   * @type { ParticlePropertyUpdaterConfigs<TYPE>[UPDATER] }
983   * @syscap SystemCapability.ArkUI.ArkUI.Full
984   * @crossplatform
985   * @since 10
986   */
987  /**
988   * Particle updater configuration.
989   * @type { ParticlePropertyUpdaterConfigs<TYPE>[UPDATER] }
990   * @syscap SystemCapability.ArkUI.ArkUI.Full
991   * @crossplatform
992   * @atomicservice
993   * @since 11
994   */
995  /**
996   * Particle updater configuration.
997   *
998   * Anonymous Object Rectification.
999   * @type { ParticlePropertyUpdaterConfigs<TYPE>[UPDATER] }
1000   * @syscap SystemCapability.ArkUI.ArkUI.Full
1001   * @crossplatform
1002   * @atomicservice
1003   * @since 18
1004   */
1005  config: ParticlePropertyUpdaterConfigs<TYPE>[UPDATER];
1006}
1007
1008/**
1009 * Defines the particle color options.
1010 *
1011 * @typedef ParticleColorOptions
1012 * @syscap SystemCapability.ArkUI.ArkUI.Full
1013 * @crossplatform
1014 * @atomicservice
1015 * @since 18
1016 */
1017interface ParticleColorOptions {
1018  /**
1019   * Red component of particle color.
1020   * @type { ParticleTuple<number, number> }
1021   * @syscap SystemCapability.ArkUI.ArkUI.Full
1022   * @crossplatform
1023   * @since 10
1024   */
1025  /**
1026   * Red component of particle color.
1027   * @type { ParticleTuple<number, number> }
1028   * @syscap SystemCapability.ArkUI.ArkUI.Full
1029   * @crossplatform
1030   * @atomicservice
1031   * @since 11
1032   */
1033  /**
1034   * Red component of particle color.
1035   *
1036   * Anonymous Object Rectification.
1037   * @type { ParticleTuple<number, number> }
1038   * @syscap SystemCapability.ArkUI.ArkUI.Full
1039   * @crossplatform
1040   * @atomicservice
1041   * @since 18
1042   */
1043  r: ParticleTuple<number, number>;
1044
1045  /**
1046   * Green component of particle color.
1047   * @type { ParticleTuple<number, number> }
1048   * @syscap SystemCapability.ArkUI.ArkUI.Full
1049   * @crossplatform
1050   * @since 10
1051   */
1052  /**
1053   * Green component of particle color.
1054   * @type { ParticleTuple<number, number> }
1055   * @syscap SystemCapability.ArkUI.ArkUI.Full
1056   * @crossplatform
1057   * @atomicservice
1058   * @since 11
1059   */
1060  /**
1061   * Green component of particle color.
1062   *
1063   * Anonymous Object Rectification.
1064   * @type { ParticleTuple<number, number> }
1065   * @syscap SystemCapability.ArkUI.ArkUI.Full
1066   * @crossplatform
1067   * @atomicservice
1068   * @since 18
1069   */
1070  g: ParticleTuple<number, number>;
1071
1072  /**
1073   * Blue component of particle color.
1074   * @type { ParticleTuple<number, number> }
1075   * @syscap SystemCapability.ArkUI.ArkUI.Full
1076   * @crossplatform
1077   * @since 10
1078   */
1079  /**
1080   * Blue component of particle color.
1081   * @type { ParticleTuple<number, number> }
1082   * @syscap SystemCapability.ArkUI.ArkUI.Full
1083   * @crossplatform
1084   * @atomicservice
1085   * @since 11
1086   */
1087  /**
1088   * Blue component of particle color.
1089   *
1090   * Anonymous Object Rectification.
1091   * @type { ParticleTuple<number, number> }
1092   * @syscap SystemCapability.ArkUI.ArkUI.Full
1093   * @crossplatform
1094   * @atomicservice
1095   * @since 18
1096   */
1097  b: ParticleTuple<number, number>;
1098
1099  /**
1100   * Opacity component of particle color.
1101   * @type { ParticleTuple<number, number> }
1102   * @syscap SystemCapability.ArkUI.ArkUI.Full
1103   * @crossplatform
1104   * @since 10
1105   */
1106  /**
1107   * Opacity component of particle color.
1108   * @type { ParticleTuple<number, number> }
1109   * @syscap SystemCapability.ArkUI.ArkUI.Full
1110   * @crossplatform
1111   * @atomicservice
1112   * @since 11
1113   */
1114  /**
1115   * Opacity component of particle color.
1116   *
1117   * Anonymous Object Rectification.
1118   * @type { ParticleTuple<number, number> }
1119   * @syscap SystemCapability.ArkUI.ArkUI.Full
1120   * @crossplatform
1121   * @atomicservice
1122   * @since 18
1123   */
1124  a: ParticleTuple<number, number>;
1125}
1126
1127/**
1128 * Defines the particle color updater options.
1129 *
1130 * @typedef ParticleColorUpdaterOptions<UPDATER extends ParticleUpdater>
1131 * @syscap SystemCapability.ArkUI.ArkUI.Full
1132 * @crossplatform
1133 * @atomicservice
1134 * @since 18
1135 */
1136interface ParticleColorUpdaterOptions<UPDATER extends ParticleUpdater> {
1137  /**
1138   * Color updater.
1139   * @type { UPDATER }
1140   * @syscap SystemCapability.ArkUI.ArkUI.Full
1141   * @crossplatform
1142   * @since 10
1143   */
1144  /**
1145   * Color updater.
1146   * @type { UPDATER }
1147   * @syscap SystemCapability.ArkUI.ArkUI.Full
1148   * @crossplatform
1149   * @atomicservice
1150   * @since 11
1151   */
1152  /**
1153   * Color updater.
1154   *
1155   * Anonymous Object Rectification.
1156   * @type { UPDATER }
1157   * @syscap SystemCapability.ArkUI.ArkUI.Full
1158   * @crossplatform
1159   * @atomicservice
1160   * @since 18
1161   */
1162  type: UPDATER;
1163
1164  /**
1165   * Color updater configuration.
1166   * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] }
1167   * @syscap SystemCapability.ArkUI.ArkUI.Full
1168   * @crossplatform
1169   * @since 10
1170   */
1171  /**
1172   * Color updater configuration.
1173   * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] }
1174   * @syscap SystemCapability.ArkUI.ArkUI.Full
1175   * @crossplatform
1176   * @atomicservice
1177   * @since 11
1178   */
1179  /**
1180   * Color updater configuration.
1181   *
1182   * Anonymous Object Rectification.
1183   * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] }
1184   * @syscap SystemCapability.ArkUI.ArkUI.Full
1185   * @crossplatform
1186   * @atomicservice
1187   * @since 18
1188   */
1189  config: ParticleColorPropertyUpdaterConfigs[UPDATER];
1190}
1191
1192/**
1193 * Defines the particle property Options.
1194 * @interface ParticlePropertyOptions
1195 * @syscap SystemCapability.ArkUI.ArkUI.Full
1196 * @crossplatform
1197 * @since 10
1198 */
1199/**
1200 * Defines the particle property Options.
1201 * @interface ParticlePropertyOptions
1202 * @syscap SystemCapability.ArkUI.ArkUI.Full
1203 * @crossplatform
1204 * @atomicservice
1205 * @since 11
1206 */
1207interface ParticlePropertyOptions<TYPE, UPDATER extends ParticleUpdater> {
1208  /**
1209   * Initial range, within which the initial value are randomly generated.
1210   * @type { [TYPE, TYPE] }
1211   * @syscap SystemCapability.ArkUI.ArkUI.Full
1212   * @crossplatform
1213   * @since 10
1214   */
1215  /**
1216   * Initial range, within which the initial value are randomly generated.
1217   * @type { [TYPE, TYPE] }
1218   * @syscap SystemCapability.ArkUI.ArkUI.Full
1219   * @crossplatform
1220   * @atomicservice
1221   * @since 11
1222   */
1223  /**
1224   * Initial range, within which the initial value are randomly generated.
1225   *
1226   * Anonymous Object Rectification.
1227   * @type { ParticleTuple<TYPE, TYPE> }
1228   * @syscap SystemCapability.ArkUI.ArkUI.Full
1229   * @crossplatform
1230   * @atomicservice
1231   * @since 18
1232   */
1233  range: ParticleTuple<TYPE, TYPE>;
1234
1235  /**
1236   * Particle property updater.
1237   * @type { ?object }
1238   * @default  {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs<UPDATER.NONE>[UPDATER.NONE]}
1239   * @syscap SystemCapability.ArkUI.ArkUI.Full
1240   * @crossplatform
1241   * @since 10
1242   */
1243  /**
1244   * Particle property updater.
1245   * @type { ?object }
1246   * @default  {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs<UPDATER.NONE>[UPDATER.NONE]}
1247   * @syscap SystemCapability.ArkUI.ArkUI.Full
1248   * @crossplatform
1249   * @atomicservice
1250   * @since 11
1251   */
1252  /**
1253   * Particle property updater.
1254   *
1255   * Anonymous Object Rectification.
1256   * @type { ?ParticleUpdaterOptions<TYPE, UPDATER> }
1257   * @default  {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs<UPDATER.NONE>[UPDATER.NONE]}
1258   * @syscap SystemCapability.ArkUI.ArkUI.Full
1259   * @crossplatform
1260   * @atomicservice
1261   * @since 18
1262   */
1263  updater?: ParticleUpdaterOptions<TYPE, UPDATER>;
1264}
1265
1266/**
1267 * Defines the particle color property updater configs.
1268 * @interface ParticleColorPropertyUpdaterConfigs
1269 * @syscap SystemCapability.ArkUI.ArkUI.Full
1270 * @crossplatform
1271 * @since 10
1272 */
1273/**
1274 * Defines the particle color property updater configs.
1275 * @interface ParticleColorPropertyUpdaterConfigs
1276 * @syscap SystemCapability.ArkUI.ArkUI.Full
1277 * @crossplatform
1278 * @atomicservice
1279 * @since 11
1280 */
1281interface ParticleColorPropertyUpdaterConfigs {
1282  /**
1283   * No effect of particle color property updater.
1284   *
1285   * @type { void }
1286   * @syscap SystemCapability.ArkUI.ArkUI.Full
1287   * @crossplatform
1288   * @since 10
1289   */
1290  /**
1291   * No effect of particle color property updater.
1292   *
1293   * @type { void }
1294   * @syscap SystemCapability.ArkUI.ArkUI.Full
1295   * @crossplatform
1296   * @atomicservice
1297   * @since 11
1298   */
1299  [ParticleUpdater.NONE]: void;
1300
1301  /**
1302   * Random effect of particle color property updater.
1303   * @type { object }
1304   * @syscap SystemCapability.ArkUI.ArkUI.Full
1305   * @crossplatform
1306   * @since 10
1307   */
1308  /**
1309   * Random effect of particle color property updater.
1310   * @type { object }
1311   * @syscap SystemCapability.ArkUI.ArkUI.Full
1312   * @crossplatform
1313   * @atomicservice
1314   * @since 11
1315   */
1316  /**
1317   * Random effect of particle color property updater.
1318   *
1319   * Anonymous Object Rectification.
1320   * @type { ParticleColorOptions }
1321   * @syscap SystemCapability.ArkUI.ArkUI.Full
1322   * @crossplatform
1323   * @atomicservice
1324   * @since 18
1325   */
1326  [ParticleUpdater.RANDOM]: ParticleColorOptions;
1327
1328  /**
1329   * Curve effect of particle color property updater.
1330   *
1331   * @type { Array<ParticlePropertyAnimation<ResourceColor>> }
1332   * @syscap SystemCapability.ArkUI.ArkUI.Full
1333   * @crossplatform
1334   * @since 10
1335   */
1336  /**
1337   * Curve effect of particle color property updater.
1338   *
1339   * @type { Array<ParticlePropertyAnimation<ResourceColor>> }
1340   * @syscap SystemCapability.ArkUI.ArkUI.Full
1341   * @crossplatform
1342   * @atomicservice
1343   * @since 11
1344   */
1345  [ParticleUpdater.CURVE]: Array<ParticlePropertyAnimation<ResourceColor>>;
1346}
1347
1348/**
1349 * Defines the particle color property updater configs which can support generics.
1350 * @interface ParticleColorPropertyOptions
1351 * @syscap SystemCapability.ArkUI.ArkUI.Full
1352 * @crossplatform
1353 * @since 10
1354 */
1355/**
1356 * Defines the particle color property updater configs which can support generics.
1357 * @interface ParticleColorPropertyOptions
1358 * @syscap SystemCapability.ArkUI.ArkUI.Full
1359 * @crossplatform
1360 * @atomicservice
1361 * @since 11
1362 */
1363interface ParticleColorPropertyOptions<UPDATER extends ParticleUpdater> {
1364  /**
1365   * Initial color range, within which the initial color is randomly generated.
1366   * @type { [ResourceColor, ResourceColor] }
1367   * @syscap SystemCapability.ArkUI.ArkUI.Full
1368   * @crossplatform
1369   * @since 10
1370   */
1371  /**
1372   * Initial color range, within which the initial color is randomly generated.
1373   * @type { [ResourceColor, ResourceColor] }
1374   * @syscap SystemCapability.ArkUI.ArkUI.Full
1375   * @crossplatform
1376   * @atomicservice
1377   * @since 11
1378   */
1379  /**
1380   * Initial color range, within which the initial color is randomly generated.
1381   *
1382   * Anonymous Object Rectification.
1383   * @type { ParticleTuple<ResourceColor, ResourceColor> }
1384   * @syscap SystemCapability.ArkUI.ArkUI.Full
1385   * @crossplatform
1386   * @atomicservice
1387   * @since 18
1388   */
1389  range: ParticleTuple<ResourceColor, ResourceColor>;
1390
1391  /**
1392   * Distribution type of particle color.
1393   * @type { ?DistributionType }
1394   * @default DistributionType.UNIFORM
1395   * @syscap SystemCapability.ArkUI.ArkUI.Full
1396   * @crossplatform
1397   * @atomicservice
1398   * @since 12
1399   */
1400  distributionType?: DistributionType;
1401
1402  /**
1403   * Particle color property updater.
1404   * @type { ?object }
1405   * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]}
1406   * @syscap SystemCapability.ArkUI.ArkUI.Full
1407   * @crossplatform
1408   * @since 10
1409   */
1410  /**
1411   * Particle color property updater.
1412   * @type { ?object }
1413   * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]}
1414   * @syscap SystemCapability.ArkUI.ArkUI.Full
1415   * @crossplatform
1416   * @atomicservice
1417   * @since 11
1418   */
1419  /**
1420   * Particle color property updater.
1421   *
1422   * Anonymous Object Rectification.
1423   * @type { ?ParticleColorUpdaterOptions<UPDATER> }
1424   * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]}
1425   * @syscap SystemCapability.ArkUI.ArkUI.Full
1426   * @crossplatform
1427   * @atomicservice
1428   * @since 18
1429   */
1430  updater?: ParticleColorUpdaterOptions<UPDATER>;
1431}
1432
1433/**
1434 * Defines the particle property lifecycle.
1435 * @interface ParticlePropertyAnimation
1436 * @syscap SystemCapability.ArkUI.ArkUI.Full
1437 * @crossplatform
1438 * @since 10
1439 */
1440/**
1441 * Defines the particle property lifecycle.
1442 * @interface ParticlePropertyAnimation
1443 * @syscap SystemCapability.ArkUI.ArkUI.Full
1444 * @crossplatform
1445 * @atomicservice
1446 * @since 11
1447 */
1448interface ParticlePropertyAnimation<T> {
1449  /**
1450   * Start position of the particle animation.
1451   * @type { T }
1452   * @syscap SystemCapability.ArkUI.ArkUI.Full
1453   * @crossplatform
1454   * @since 10
1455   */
1456  /**
1457   * Start position of the particle animation.
1458   * @type { T }
1459   * @syscap SystemCapability.ArkUI.ArkUI.Full
1460   * @crossplatform
1461   * @atomicservice
1462   * @since 11
1463   */
1464  from: T;
1465
1466  /**
1467   * End position of the particle animation.
1468   * @type { T }
1469   * @syscap SystemCapability.ArkUI.ArkUI.Full
1470   * @crossplatform
1471   * @since 10
1472   */
1473  /**
1474   * End position of the particle animation.
1475   * @type { T }
1476   * @syscap SystemCapability.ArkUI.ArkUI.Full
1477   * @crossplatform
1478   * @atomicservice
1479   * @since 11
1480   */
1481  to: T;
1482
1483  /**
1484   * Start millis of the particle animation.
1485   * @type { number }
1486   * @syscap SystemCapability.ArkUI.ArkUI.Full
1487   * @crossplatform
1488   * @since 10
1489   */
1490  /**
1491   * Start millis of the particle animation.
1492   * @type { number }
1493   * @syscap SystemCapability.ArkUI.ArkUI.Full
1494   * @crossplatform
1495   * @atomicservice
1496   * @since 11
1497   */
1498  startMillis: number;
1499
1500  /**
1501   * End millis of the particle animation.
1502   * @type { number }
1503   * @syscap SystemCapability.ArkUI.ArkUI.Full
1504   * @crossplatform
1505   * @since 10
1506   */
1507  /**
1508   * End millis of the particle animation.
1509   * @type { number }
1510   * @syscap SystemCapability.ArkUI.ArkUI.Full
1511   * @crossplatform
1512   * @atomicservice
1513   * @since 11
1514   */
1515  endMillis: number;
1516
1517  /**
1518   * Curve of the particle animation.
1519   * @type { ?(Curve | ICurve) }
1520   * @default Curve.Linear
1521   * @syscap SystemCapability.ArkUI.ArkUI.Full
1522   * @crossplatform
1523   * @since 10
1524   */
1525  /**
1526   * Curve of the particle animation.
1527   * @type { ?(Curve | ICurve) }
1528   * @default Curve.Linear
1529   * @syscap SystemCapability.ArkUI.ArkUI.Full
1530   * @crossplatform
1531   * @atomicservice
1532   * @since 11
1533   */
1534  curve?: Curve | ICurve;
1535}
1536
1537/**
1538 * Defines the particle array.
1539 *
1540 * @typedef Particles
1541 * @syscap SystemCapability.ArkUI.ArkUI.Full
1542 * @crossplatform
1543 * @atomicservice
1544 * @since 18
1545 */
1546interface Particles<
1547  PARTICLE extends ParticleType,
1548  COLOR_UPDATER extends ParticleUpdater,
1549  OPACITY_UPDATER extends ParticleUpdater,
1550  SCALE_UPDATER extends ParticleUpdater,
1551  ACC_SPEED_UPDATER extends ParticleUpdater,
1552  ACC_ANGLE_UPDATER extends ParticleUpdater,
1553  SPIN_UPDATER extends ParticleUpdater
1554> {
1555  /**
1556   * Array of particles.
1557   * @type { Array<ParticleOptions<PARTICLE, COLOR_UPDATER, OPACITY_UPDATER, SCALE_UPDATER, ACC_SPEED_UPDATER, ACC_ANGLE_UPDATER, SPIN_UPDATER>> }
1558   * @syscap SystemCapability.ArkUI.ArkUI.Full
1559   * @crossplatform
1560   * @since 10
1561   */
1562  /**
1563   * Array of particles.
1564   * @type { Array<ParticleOptions<PARTICLE, COLOR_UPDATER, OPACITY_UPDATER, SCALE_UPDATER, ACC_SPEED_UPDATER, ACC_ANGLE_UPDATER, SPIN_UPDATER>> }
1565   * @syscap SystemCapability.ArkUI.ArkUI.Full
1566   * @crossplatform
1567   * @atomicservice
1568   * @since 11
1569   */
1570  /**
1571   * Array of particles.
1572   *
1573   * Anonymous Object Rectification.
1574   * @type { Array<ParticleOptions<PARTICLE, COLOR_UPDATER, OPACITY_UPDATER, SCALE_UPDATER, ACC_SPEED_UPDATER, ACC_ANGLE_UPDATER, SPIN_UPDATER>> }
1575   * @syscap SystemCapability.ArkUI.ArkUI.Full
1576   * @crossplatform
1577   * @atomicservice
1578   * @since 18
1579   */
1580  particles: Array<
1581    ParticleOptions<
1582      PARTICLE,
1583      COLOR_UPDATER,
1584      OPACITY_UPDATER,
1585      SCALE_UPDATER,
1586      ACC_SPEED_UPDATER,
1587      ACC_ANGLE_UPDATER,
1588      SPIN_UPDATER
1589    >
1590  >;
1591}
1592
1593/**
1594 * Defines the particle Interface.
1595 * @interface ParticleInterface
1596 * @syscap SystemCapability.ArkUI.ArkUI.Full
1597 * @crossplatform
1598 * @since 10
1599 */
1600/**
1601 * Defines the particle Interface.
1602 * @interface ParticleInterface
1603 * @syscap SystemCapability.ArkUI.ArkUI.Full
1604 * @crossplatform
1605 * @atomicservice
1606 * @since 11
1607 */
1608interface ParticleInterface {
1609  /**
1610   * create a particle array.
1611   * @param { object } value - Particle value
1612   * particles - list of ParticleOptions.
1613   * @returns { ParticleAttribute } Returns the particle attribute.
1614   * @syscap SystemCapability.ArkUI.ArkUI.Full
1615   * @crossplatform
1616   * @since 10
1617   */
1618  /**
1619   * create a particle array.
1620   * @param { object } value - Particle value
1621   * particles - list of ParticleOptions.
1622   * @returns { ParticleAttribute } Returns the particle attribute.
1623   * @syscap SystemCapability.ArkUI.ArkUI.Full
1624   * @crossplatform
1625   * @atomicservice
1626   * @since 11
1627   */
1628  /**
1629   * create a particle array.
1630   *
1631   * Anonymous Object Rectification.
1632   * @param { Particles<PARTICLE, COLOR_UPDATER, OPACITY_UPDATER, SCALE_UPDATER, ACC_SPEED_UPDATER, ACC_ANGLE_UPDATER,
1633   *          SPIN_UPDATER> } particles - Array of particles.
1634   * @returns { ParticleAttribute } Returns the particle attribute.
1635   * @syscap SystemCapability.ArkUI.ArkUI.Full
1636   * @crossplatform
1637   * @atomicservice
1638   * @since 18
1639   */
1640  <
1641    PARTICLE extends ParticleType,
1642    COLOR_UPDATER extends ParticleUpdater,
1643    OPACITY_UPDATER extends ParticleUpdater,
1644    SCALE_UPDATER extends ParticleUpdater,
1645    ACC_SPEED_UPDATER extends ParticleUpdater,
1646    ACC_ANGLE_UPDATER extends ParticleUpdater,
1647    SPIN_UPDATER extends ParticleUpdater
1648  >(particles: Particles<
1649      PARTICLE,
1650      COLOR_UPDATER,
1651      OPACITY_UPDATER,
1652      SCALE_UPDATER,
1653      ACC_SPEED_UPDATER,
1654      ACC_ANGLE_UPDATER,
1655      SPIN_UPDATER
1656    >): ParticleAttribute;
1657}
1658
1659/**
1660 * Enumerates the particle types.
1661 * @enum { string }
1662 * @syscap SystemCapability.ArkUI.ArkUI.Full
1663 * @crossplatform
1664 * @since 10
1665 */
1666/**
1667 * Enumerates the particle types.
1668 * @enum { string }
1669 * @syscap SystemCapability.ArkUI.ArkUI.Full
1670 * @crossplatform
1671 * @atomicservice
1672 * @since 11
1673 */
1674declare enum ParticleType {
1675  /**
1676   * Point-like particle.
1677   * @syscap SystemCapability.ArkUI.ArkUI.Full
1678   * @crossplatform
1679   * @since 10
1680   */
1681  /**
1682   * Point-like particle.
1683   * @syscap SystemCapability.ArkUI.ArkUI.Full
1684   * @crossplatform
1685   * @atomicservice
1686   * @since 11
1687   */
1688  POINT = 'point',
1689
1690  /**
1691   * Image-like particle.
1692   * @syscap SystemCapability.ArkUI.ArkUI.Full
1693   * @crossplatform
1694   * @since 10
1695   */
1696  /**
1697   * Image-like particle.
1698   * @syscap SystemCapability.ArkUI.ArkUI.Full
1699   * @crossplatform
1700   * @atomicservice
1701   * @since 11
1702   */
1703  IMAGE = 'image',
1704}
1705
1706/**
1707 * Enumerates the emitter shapes of a particle.
1708 * @enum { string }
1709 * @syscap SystemCapability.ArkUI.ArkUI.Full
1710 * @crossplatform
1711 * @since 10
1712 */
1713/**
1714 * Enumerates the emitter shapes of a particle.
1715 * @enum { string }
1716 * @syscap SystemCapability.ArkUI.ArkUI.Full
1717 * @crossplatform
1718 * @atomicservice
1719 * @since 11
1720 */
1721declare enum ParticleEmitterShape {
1722  /**
1723   * Rectangle.
1724   * @syscap SystemCapability.ArkUI.ArkUI.Full
1725   * @crossplatform
1726   * @since 10
1727   */
1728  /**
1729   * Rectangle.
1730   * @syscap SystemCapability.ArkUI.ArkUI.Full
1731   * @crossplatform
1732   * @atomicservice
1733   * @since 11
1734   */
1735  RECTANGLE = 'rectangle',
1736
1737  /**
1738   * Circle.
1739   * @syscap SystemCapability.ArkUI.ArkUI.Full
1740   * @crossplatform
1741   * @since 10
1742   */
1743  /**
1744   * Circle.
1745   * @syscap SystemCapability.ArkUI.ArkUI.Full
1746   * @crossplatform
1747   * @atomicservice
1748   * @since 11
1749   */
1750  CIRCLE = 'circle',
1751
1752  /**
1753   * Ellipse.
1754   * @syscap SystemCapability.ArkUI.ArkUI.Full
1755   * @crossplatform
1756   * @since 10
1757   */
1758  /**
1759   * Ellipse.
1760   * @syscap SystemCapability.ArkUI.ArkUI.Full
1761   * @crossplatform
1762   * @atomicservice
1763   * @since 11
1764   */
1765  ELLIPSE = 'ellipse',
1766}
1767
1768/**
1769 * Enumerates the color distribution types of a particle.
1770 *
1771 * @enum { number }
1772 * @syscap SystemCapability.ArkUI.ArkUI.Full
1773 * @crossplatform
1774 * @atomicservice
1775 * @since 12
1776 */
1777declare enum DistributionType {
1778  /**
1779   * Uniform distribution.
1780   *
1781   * @syscap SystemCapability.ArkUI.ArkUI.Full
1782   * @crossplatform
1783   * @atomicservice
1784   * @since 12
1785   */
1786  UNIFORM = 0,
1787
1788  /**
1789   * Gaussian distribution.
1790   *
1791   * @syscap SystemCapability.ArkUI.ArkUI.Full
1792   * @crossplatform
1793   * @atomicservice
1794   * @since 12
1795   */
1796  GAUSSIAN = 1,
1797}
1798
1799/**
1800 * Enumerates the updater types of a particle.
1801 * @enum { string }
1802 * @syscap SystemCapability.ArkUI.ArkUI.Full
1803 * @crossplatform
1804 * @since 10
1805 */
1806/**
1807 * Enumerates the updater types of a particle.
1808 * @enum { string }
1809 * @syscap SystemCapability.ArkUI.ArkUI.Full
1810 * @crossplatform
1811 * @atomicservice
1812 * @since 11
1813 */
1814declare enum ParticleUpdater {
1815  /**
1816   * No updater is used.
1817   * @syscap SystemCapability.ArkUI.ArkUI.Full
1818   * @crossplatform
1819   * @since 10
1820   */
1821  /**
1822   * No updater is used.
1823   * @syscap SystemCapability.ArkUI.ArkUI.Full
1824   * @crossplatform
1825   * @atomicservice
1826   * @since 11
1827   */
1828  NONE = 'none',
1829
1830  /**
1831   * Random updater.
1832   * @syscap SystemCapability.ArkUI.ArkUI.Full
1833   * @crossplatform
1834   * @since 10
1835   */
1836  /**
1837   * Random updater.
1838   * @syscap SystemCapability.ArkUI.ArkUI.Full
1839   * @crossplatform
1840   * @atomicservice
1841   * @since 11
1842   */
1843  RANDOM = 'random',
1844
1845  /**
1846   * Curve updater.
1847   * @syscap SystemCapability.ArkUI.ArkUI.Full
1848   * @crossplatform
1849   * @since 10
1850   */
1851  /**
1852   * Curve updater.
1853   * @syscap SystemCapability.ArkUI.ArkUI.Full
1854   * @crossplatform
1855   * @atomicservice
1856   * @since 11
1857   */
1858  CURVE = 'curve',
1859}
1860
1861/**
1862 * Defines the SizeT type.
1863 *
1864 * @typedef { import('../api/arkui/Graphics').SizeT<T> }
1865 * @syscap SystemCapability.ArkUI.ArkUI.Full
1866 * @crossplatform
1867 * @atomicservice
1868 * @since 12
1869 */
1870declare type SizeT<T> = import('../api/arkui/Graphics').SizeT<T>;
1871
1872 /**
1873 * Defines the PositionT type.
1874 *
1875 * @typedef { import('../api/arkui/Graphics').PositionT<T> }
1876 * @syscap SystemCapability.ArkUI.ArkUI.Full
1877 * @crossplatform
1878 * @atomicservice
1879 * @since 12
1880 */
1881declare type PositionT<T> = import('../api/arkui/Graphics').PositionT<T>;
1882
1883/**
1884 * Defines the Particle component attribute functions.
1885 * @extends CommonMethod<ParticleAttribute>
1886 * @syscap SystemCapability.ArkUI.ArkUI.Full
1887 * @crossplatform
1888 * @since 10
1889 */
1890/**
1891 * Defines the Particle component attribute functions.
1892 * @extends CommonMethod<ParticleAttribute>
1893 * @syscap SystemCapability.ArkUI.ArkUI.Full
1894 * @crossplatform
1895 * @atomicservice
1896 * @since 11
1897 */
1898declare class ParticleAttribute extends CommonMethod<ParticleAttribute> {
1899  /**
1900   * Particle disturbance Field.
1901   *
1902   * @param { Array<DisturbanceFieldOptions> } fields - particle disturbance Field params.
1903   * @returns { ParticleAttribute } Returns the particle attribute.
1904   * @syscap SystemCapability.ArkUI.ArkUI.Full
1905   * @crossplatform
1906   * @atomicservice
1907   * @since 12
1908   */
1909  disturbanceFields(fields: Array<DisturbanceFieldOptions>): ParticleAttribute;
1910
1911  /**
1912   * Add particle animation component properties.
1913   *
1914   * @param { Array<EmitterProperty> } value - The emitter property.
1915   * @returns { ParticleAttribute } Returns the particle attribute.
1916   * @syscap SystemCapability.ArkUI.ArkUI.Full
1917   * @crossplatform
1918   * @atomicservice
1919   * @since 12
1920   */
1921  emitter(value : Array<EmitterProperty>) : ParticleAttribute;
1922}
1923
1924/**
1925 * Defines Particle Component.
1926 * @syscap SystemCapability.ArkUI.ArkUI.Full
1927 * @crossplatform
1928 * @since 10
1929 */
1930/**
1931 * Defines Particle Component.
1932 * @syscap SystemCapability.ArkUI.ArkUI.Full
1933 * @crossplatform
1934 * @atomicservice
1935 * @since 11
1936 */
1937declare const Particle: ParticleInterface;
1938
1939/**
1940 * Defines particle disturbance Field params.
1941 * @interface DisturbanceFieldOptions
1942 * @syscap SystemCapability.ArkUI.ArkUI.Full
1943 * @crossplatform
1944 * @atomicservice
1945 * @since 12
1946 */
1947declare interface DisturbanceFieldOptions {
1948
1949  /**
1950   * Strength of the repulsive force from the center outward,
1951   * with positive numbers indicating outward repulsion and negative numbers indicating
1952   * inward attraction.
1953   *
1954   * @type { ?number }
1955   * @default 0
1956   * @syscap SystemCapability.ArkUI.ArkUI.Full
1957   * @crossplatform
1958   * @atomicservice
1959   * @since 12
1960   */
1961  strength?: number;
1962
1963  /**
1964   * Disturbance filed shape.
1965   *
1966   * @type { ?DisturbanceFieldShape }
1967   * @default DisturbanceFieldShape.RECT
1968   * @syscap SystemCapability.ArkUI.ArkUI.Full
1969   * @crossplatform
1970   * @atomicservice
1971   * @since 12
1972   */
1973  shape?: DisturbanceFieldShape;
1974
1975  /**
1976   * Disturbance filed size width value width, height.
1977   *
1978   * @type { ?SizeT<number> }
1979   * @default {width:0,height:0}
1980   * @syscap SystemCapability.ArkUI.ArkUI.Full
1981   * @crossplatform
1982   * @atomicservice
1983   * @since 12
1984   */
1985  size?: SizeT<number>;
1986
1987  /**
1988   * Disturbance filed position width value x, y.
1989   *
1990   * @type { ?PositionT<number> }
1991   * @default {x:0,y:0}
1992   * @syscap SystemCapability.ArkUI.ArkUI.Full
1993   * @crossplatform
1994   * @atomicservice
1995   * @since 12
1996   */
1997  position?: PositionT<number>;
1998
1999  /**
2000   * Attenuation degree of the field from the center point to the field boundary.
2001   * ranging from 0 to 100 integers. If 0, it indicates that the field is a rigid body,
2002   * and all particles within the range will be excluded.
2003   * a larger feather value indicates a greater degree of relaxation in the field,
2004   * and more particles near the center point will appear in the field strength range. The default value is 0.
2005   *
2006   * @type { ?number }
2007   * @default 0
2008   * @syscap SystemCapability.ArkUI.ArkUI.Full
2009   * @crossplatform
2010   * @atomicservice
2011   * @since 12
2012   */
2013  feather?: number;
2014
2015  /**
2016   * Scaling parameter is used to control the overall size of noise, with a value greater or equal 0.
2017   *
2018   * @type { ?number }
2019   * @default 1
2020   * @syscap SystemCapability.ArkUI.ArkUI.Full
2021   * @crossplatform
2022   * @atomicservice
2023   * @since 12
2024   */
2025  noiseScale?: number;
2026
2027   /**
2028   * Noise frequency with a value greater or equal 0.
2029   *
2030   * @type { ?number }
2031   * @default 1
2032   * @syscap SystemCapability.ArkUI.ArkUI.Full
2033   * @crossplatform
2034   * @atomicservice
2035   * @since 12
2036   */
2037  noiseFrequency?: number;
2038
2039  /**
2040   * NoiseAmplitude fluctuation range of noise,  value,
2041   *
2042   * @type { ?number }
2043   * @default 1
2044   * @syscap SystemCapability.ArkUI.ArkUI.Full
2045   * @crossplatform
2046   * @atomicservice
2047   * @since 12
2048   */
2049  noiseAmplitude?: number;
2050}
2051
2052/**
2053 * Defines particle disturbance shape.
2054 *
2055 * @enum { number }
2056 * @syscap SystemCapability.ArkUI.ArkUI.Full
2057 * @crossplatform
2058 * @atomicservice
2059 * @since 12
2060 */
2061declare enum DisturbanceFieldShape {
2062
2063  /**
2064   * Shape rect.
2065   *
2066   * @syscap SystemCapability.ArkUI.ArkUI.Full
2067   * @crossplatform
2068   * @atomicservice
2069   * @since 12
2070   */
2071  RECT,
2072
2073   /**
2074   * Shape circle.
2075   *
2076   * @syscap SystemCapability.ArkUI.ArkUI.Full
2077   * @crossplatform
2078   * @atomicservice
2079   * @since 12
2080   */
2081  CIRCLE,
2082
2083  /**
2084   * Shape eclipse.
2085   *
2086   * @syscap SystemCapability.ArkUI.ArkUI.Full
2087   * @crossplatform
2088   * @atomicservice
2089   * @since 12
2090   */
2091  ELLIPSE
2092
2093}