File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,45 +6,11 @@ import configs from "@tsparticles/configs";
66( async ( engine : Engine ) => {
77 await loadAll ( engine ) ;
88
9- /* const keys = Object.keys(configs),
10- randomKey = keys[Math.floor(Math.random() * keys.length)] as keyof typeof configs;*/
9+ const keys = Object . keys ( configs ) ,
10+ randomKey = keys [ Math . floor ( Math . random ( ) * keys . length ) ] as keyof typeof configs ;
1111
1212 await engine . load ( {
1313 id : "tsparticles" ,
14- options : {
15- ...configs . basic ,
16- fullScreen : {
17- ...configs . basic . fullScreen ,
18- enable : false
19- } ,
20- interactivity : {
21- ...configs . basic . interactivity ,
22- events : {
23- ...configs . basic . interactivity . events ,
24- onClick : {
25- ...configs . basic . interactivity . events . onClick ,
26- enable : false ,
27- } ,
28- onHover : {
29- ...configs . basic . interactivity . events . onHover ,
30- enable : false ,
31- }
32- }
33- } ,
34- particles : {
35- ...configs . basic . particles ,
36- number : {
37- ...configs . basic . particles . number ,
38- density : {
39- ...configs . basic . particles . number . density ,
40- enable : false ,
41- }
42- } ,
43- links : {
44- ...configs . basic . particles . links ,
45- enable : false
46- }
47- }
48- }
14+ options : configs [ randomKey ] ,
4915 } ) ;
5016} ) ( tsParticles ) ;
You can’t perform that action at this time.
0 commit comments