Skip to content

Commit e59a41a

Browse files
committedMar 1, 2024
feat: changed bundles loading method, no more preloading plugins
1 parent 8dc0302 commit e59a41a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2374
-888
lines changed
 

‎apps/demo/views/bigCircles.pug

+7-3
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-big-circles/tsparticles.preset.bigCircles.bundle.min.js")
2828
script.
29-
setTimeout(async () => {
30-
await tsParticles.load({
29+
(async (engine) => {
30+
await loadBigCirclesPreset(engine);
31+
32+
await engine.load({
3133
id: "tsparticles",
3234
options: {
3335
preset: "bigCircles"
3436
}
37+
}).then(container => {
38+
console.log(container);
3539
});
36-
});
40+
})(tsParticles);
3741

3842
const stats = new Stats();
3943

‎apps/demo/views/bubbles.pug

+8-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-bubbles/tsparticles.preset.bubbles.bundle.min.js")
2828
script.
29-
setTimeout(async () => {
30-
await tsParticles.load({
31-
id:"tsparticles",
29+
(async (engine) => {
30+
await loadBubblesPreset(engine);
31+
32+
await engine.load({
33+
id: "tsparticles",
3234
options: {
3335
preset: "bubbles"
3436
}
37+
}).then(container => {
38+
console.log(container);
3539
});
36-
});
40+
})(tsParticles);
3741

3842
const stats = new Stats();
3943

0 commit comments

Comments
 (0)
Please sign in to comment.