Skip to content

Commit b24f185

Browse files
authored
Update tsparticles to use new repo (#24688)
1 parent dc5bb89 commit b24f185

File tree

4 files changed

+189
-170
lines changed

4 files changed

+189
-170
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
"@replit/codemirror-indentation-markers": "6.5.3",
9292
"@shoelace-style/shoelace": "2.20.1",
9393
"@thomasloven/round-slider": "0.6.0",
94+
"@tsparticles/engine": "3.8.1",
95+
"@tsparticles/preset-links": "3.2.0",
9496
"@vaadin/combo-box": "24.7.1",
9597
"@vaadin/vaadin-themable-mixin": "24.7.1",
9698
"@vibrant/color": "4.0.0",
@@ -137,8 +139,6 @@
137139
"stacktrace-js": "2.0.2",
138140
"superstruct": "2.0.2",
139141
"tinykeys": "3.0.0",
140-
"tsparticles-engine": "2.12.0",
141-
"tsparticles-preset-links": "2.12.0",
142142
"ua-parser-js": "2.0.3",
143143
"vis-data": "7.1.9",
144144
"vis-network": "9.1.9",

renovate.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{
3838
"description": "Group tsparticles engine and presets",
3939
"groupName": "tsparticles",
40-
"matchPackageNames": ["tsparticles-engine", "tsparticles-preset-{/,}**"]
40+
"matchPackageNames": ["@tsparticles/engine", "@tsparticles/preset-{/,}**"]
4141
},
4242
{
4343
"description": "Group date-fns with dependent timezone package",

src/resources/particles.ts

+58-69
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,78 @@
1-
import { tsParticles } from "tsparticles-engine";
2-
import { loadLinksPreset } from "tsparticles-preset-links";
1+
import { tsParticles } from "@tsparticles/engine";
2+
import { loadLinksPreset } from "@tsparticles/preset-links";
33
import { DEFAULT_PRIMARY_COLOR } from "./styles-data";
44

55
loadLinksPreset(tsParticles).then(() => {
6-
tsParticles.load("particles", {
7-
preset: "links",
8-
background: {
9-
opacity: 0,
10-
},
11-
fullScreen: {
12-
enable: true,
13-
zIndex: -1,
14-
},
15-
detectRetina: true,
16-
fpsLimit: 60,
17-
motion: {
18-
disable: false,
19-
reduce: {
20-
factor: 4,
21-
value: true,
6+
tsParticles.load({
7+
id: "particles",
8+
options: {
9+
preset: "links",
10+
background: {
11+
opacity: 0,
2212
},
23-
},
24-
particles: {
25-
color: {
26-
value: DEFAULT_PRIMARY_COLOR,
27-
},
28-
animation: {
13+
fullScreen: {
2914
enable: true,
30-
speed: 50,
31-
sync: false,
15+
zIndex: -1,
3216
},
33-
links: {
34-
color: {
35-
value: DEFAULT_PRIMARY_COLOR,
17+
detectRetina: true,
18+
fpsLimit: 60,
19+
motion: {
20+
disable: false,
21+
reduce: {
22+
factor: 4,
23+
value: true,
3624
},
37-
distance: 100,
38-
enable: true,
39-
frequency: 1,
40-
opacity: 0.7,
41-
width: 1,
42-
},
43-
move: {
44-
enable: true,
45-
speed: 0.5,
4625
},
47-
number: {
48-
density: {
49-
enable: true,
50-
area: 800,
51-
factor: 1000,
26+
particles: {
27+
color: {
28+
value: DEFAULT_PRIMARY_COLOR,
5229
},
53-
limit: 0,
54-
value: 50,
55-
},
56-
opacity: {
57-
random: {
30+
links: {
31+
color: {
32+
value: DEFAULT_PRIMARY_COLOR,
33+
},
34+
distance: 100,
5835
enable: true,
59-
minimumValue: 0.3,
36+
frequency: 1,
37+
opacity: 0.7,
38+
width: 1,
6039
},
61-
value: 0.5,
62-
animation: {
63-
destroy: "none",
40+
move: {
6441
enable: true,
65-
minimumValue: 0.3,
6642
speed: 0.5,
67-
startValue: "random",
68-
sync: false,
6943
},
70-
},
71-
size: {
72-
random: {
73-
enable: true,
74-
minimumValue: 1,
44+
number: {
45+
limit: undefined,
46+
value: 50,
7547
},
76-
value: 3,
77-
animation: {
78-
destroy: "none",
79-
enable: true,
80-
minimumValue: 1,
81-
speed: 3,
82-
startValue: "random",
83-
sync: false,
48+
opacity: {
49+
value: {
50+
min: 0.3,
51+
max: 0.5,
52+
},
53+
animation: {
54+
destroy: "none",
55+
enable: true,
56+
speed: 0.5,
57+
startValue: "random",
58+
sync: false,
59+
},
60+
},
61+
size: {
62+
value: {
63+
min: 1,
64+
max: 3,
65+
},
66+
animation: {
67+
destroy: "none",
68+
enable: true,
69+
speed: 3,
70+
startValue: "random",
71+
sync: false,
72+
},
8473
},
8574
},
75+
pauseOnBlur: true,
8676
},
87-
pauseOnBlur: true,
8877
});
8978
});

0 commit comments

Comments
 (0)