Skip to content

Commit 289815f

Browse files
committed
build: fixed demo
1 parent 1779147 commit 289815f

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

  • demo/vanilla/public/javascripts

demo/vanilla/public/javascripts/demo.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@
9393
});
9494
}
9595

96-
const particles = await tsParticles.load({ id: "tsparticles", options: tsParticles.configs[presetId] });
96+
const particles = await tsParticles.load({
97+
id: "tsparticles",
98+
options: tsParticles.pluginManager.configs[presetId],
99+
});
97100

98101
localStorage.presetId = presetId;
99102

@@ -165,14 +168,14 @@
165168
document.addEventListener("DOMContentLoaded", async () => {
166169
await initParticles(tsParticles);
167170

168-
for (const presetId in tsParticles.configs) {
169-
const preset = tsParticles.configs[presetId];
171+
for (const presetId in tsParticles.pluginManager.configs) {
172+
const preset = tsParticles.pluginManager.configs[presetId];
170173

171-
const option = document.createElement("option");
172-
option.value = presetId;
173-
option.text = preset.name || presetId;
174+
const option = document.createElement("option");
175+
option.value = presetId;
176+
option.text = preset.name || presetId;
174177

175-
document.getElementById("presets").appendChild(option);
178+
document.getElementById("presets").appendChild(option);
176179
}
177180

178181
const element = document.getElementById("editor"), options = {

0 commit comments

Comments
 (0)