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