Skip to content

Commit 03842e7

Browse files
committedJan 6, 2024
fix: fixed some load functions, the order wasn't right
1 parent 21d61bc commit 03842e7

18 files changed

+231
-259
lines changed
 

‎apps/demo/views/bigCircles.pug

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ 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-
(async () => {
30-
await loadBigCirclesPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
33-
id:"tsparticles",
31+
id: "tsparticles",
3432
options: {
3533
preset: "bigCircles"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/bubbles.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ 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-
(async () => {
30-
await loadBubblesPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id:"tsparticles",
3432
options: {
3533
preset: "bubbles"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/confetti.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-confetti/tsparticles.preset.confetti.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadConfettiPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id:"tsparticles",
3432
options: {
3533
preset: "confetti"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/fire.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-fire/tsparticles.preset.fire.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadFirePreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "fire"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/firefly.pug

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-firefly/tsparticles.preset.firefly.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadFireflyPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
33-
id: "tsparticles",
31+
id: "tsparticles",
3432
options: {
3533
preset: "firefly"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/fireworks.pug

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ html(lang="en")
2727
script(src="/preset-fireworks/tsparticles.preset.fireworks.bundle.min.js")
2828
script.
2929
(async () => {
30-
await loadFireworksPreset(tsParticles);
31-
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {

‎apps/demo/views/fountain.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-fountain/tsparticles.preset.fountain.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadFountainPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "fountain"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/hyperspace.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-hyperspace/tsparticles.preset.hyperspace.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadHyperspacePreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "hyperspace"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/links.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-links/tsparticles.preset.links.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadLinksPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "links"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/seaAnemone.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-sea-anemone/tsparticles.preset.seaAnemone.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadSeaAnemonePreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "seaAnemone"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/snow.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-snow/tsparticles.preset.snow.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadSnowPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "snow"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/squares.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-squares/tsparticles.preset.squares.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadSquaresPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "squares"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/stars.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-stars/tsparticles.preset.stars.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadStarsPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
await tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "stars"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎apps/demo/views/triangles.pug

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ html(lang="en")
2626
script(src="/stats.ts/dist/stats.min.js")
2727
script(src="/preset-triangles/tsparticles.preset.triangles.bundle.min.js")
2828
script.
29-
(async () => {
30-
await loadTrianglesPreset(tsParticles);
31-
29+
setTimeout(async () => {
3230
tsParticles.load({
3331
id: "tsparticles",
3432
options: {
3533
preset: "triangles"
3634
}
3735
});
38-
})();
36+
});
3937

4038
const stats = new Stats();
4139

‎presets/bigCircles/package.json

+100-100
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,105 @@
11
{
2-
"name": "@tsparticles/preset-big-circles",
3-
"version": "3.0.2",
4-
"description": "tsParticles big circles preset",
5-
"homepage": "https://particles.js.org",
6-
"scripts": {
7-
"build": "tsparticles-cli build",
8-
"build:ci": "tsparticles-cli build --ci",
9-
"version": "tsparticles-cli build -d && git add package.dist.json",
10-
"prepack": "pnpm run build"
2+
"name": "@tsparticles/preset-big-circles",
3+
"version": "3.0.2",
4+
"description": "tsParticles big circles preset",
5+
"homepage": "https://particles.js.org",
6+
"scripts": {
7+
"build": "tsparticles-cli build",
8+
"build:ci": "tsparticles-cli build --ci",
9+
"version": "tsparticles-cli build -d && git add package.dist.json",
10+
"prepack": "pnpm run build"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/tsparticles/presets.git",
15+
"directory": "presets/bigCircles"
16+
},
17+
"keywords": [
18+
"front-end",
19+
"frontend",
20+
"tsparticles",
21+
"particles.js",
22+
"particlesjs",
23+
"particles",
24+
"particle",
25+
"canvas",
26+
"jsparticles",
27+
"xparticles",
28+
"particles-js",
29+
"particles-bg",
30+
"particles-bg-vue",
31+
"particles-ts",
32+
"particles.ts",
33+
"react-particles-js",
34+
"react-particles.js",
35+
"react-particles",
36+
"react",
37+
"reactjs",
38+
"vue-particles",
39+
"ngx-particles",
40+
"angular-particles",
41+
"particleground",
42+
"vue",
43+
"vuejs",
44+
"preact",
45+
"preactjs",
46+
"jquery",
47+
"angularjs",
48+
"angular",
49+
"typescript",
50+
"javascript",
51+
"animation",
52+
"web",
53+
"html5",
54+
"web-design",
55+
"webdesign",
56+
"css",
57+
"html",
58+
"css3",
59+
"animated",
60+
"background",
61+
"confetti",
62+
"canvas",
63+
"fireworks",
64+
"fireworks-js",
65+
"confetti-js",
66+
"confettijs",
67+
"fireworksjs",
68+
"canvas-confetti",
69+
"tsparticles-preset"
70+
],
71+
"publishConfig": {
72+
"directory": "dist",
73+
"linkDirectory": true,
74+
"access": "public"
75+
},
76+
"author": "Matteo Bruni <matteo.bruni@me.com>",
77+
"license": "MIT",
78+
"bugs": {
79+
"url": "https://github.com/tsparticles/presets/issues"
80+
},
81+
"funding": [
82+
{
83+
"type": "github",
84+
"url": "https://github.com/sponsors/matteobruni"
1185
},
12-
"repository": {
13-
"type": "git",
14-
"url": "git+https://github.com/tsparticles/presets.git",
15-
"directory": "presets/bigCircles"
86+
{
87+
"type": "github",
88+
"url": "https://github.com/sponsors/tsparticles"
1689
},
17-
"keywords": [
18-
"front-end",
19-
"frontend",
20-
"tsparticles",
21-
"particles.js",
22-
"particlesjs",
23-
"particles",
24-
"particle",
25-
"canvas",
26-
"jsparticles",
27-
"xparticles",
28-
"particles-js",
29-
"particles-bg",
30-
"particles-bg-vue",
31-
"particles-ts",
32-
"particles.ts",
33-
"react-particles-js",
34-
"react-particles.js",
35-
"react-particles",
36-
"react",
37-
"reactjs",
38-
"vue-particles",
39-
"ngx-particles",
40-
"angular-particles",
41-
"particleground",
42-
"vue",
43-
"vuejs",
44-
"preact",
45-
"preactjs",
46-
"jquery",
47-
"angularjs",
48-
"angular",
49-
"typescript",
50-
"javascript",
51-
"animation",
52-
"web",
53-
"html5",
54-
"web-design",
55-
"webdesign",
56-
"css",
57-
"html",
58-
"css3",
59-
"animated",
60-
"background",
61-
"confetti",
62-
"canvas",
63-
"fireworks",
64-
"fireworks-js",
65-
"confetti-js",
66-
"confettijs",
67-
"fireworksjs",
68-
"canvas-confetti",
69-
"tsparticles-preset"
70-
],
71-
"publishConfig": {
72-
"directory": "dist",
73-
"linkDirectory": true,
74-
"access": "public"
75-
},
76-
"author": "Matteo Bruni <matteo.bruni@me.com>",
77-
"license": "MIT",
78-
"bugs": {
79-
"url": "https://github.com/tsparticles/presets/issues"
80-
},
81-
"funding": [
82-
{
83-
"type": "github",
84-
"url": "https://github.com/sponsors/matteobruni"
85-
},
86-
{
87-
"type": "github",
88-
"url": "https://github.com/sponsors/tsparticles"
89-
},
90-
{
91-
"type": "buymeacoffee",
92-
"url": "https://www.buymeacoffee.com/matteobruni"
93-
}
94-
],
95-
"main": "dist/cjs/index.js",
96-
"module": "dist/esm/index.js",
97-
"types": "dist/types/index.d.ts",
98-
"prettier": "@tsparticles/prettier-config",
99-
"dependencies": {
100-
"@tsparticles/basic": "^3.0.3",
101-
"@tsparticles/engine": "^3.0.3",
102-
"@tsparticles/plugin-emitters": "^3.0.3",
103-
"@tsparticles/plugin-emitters-shape-square": "^3.0.3"
90+
{
91+
"type": "buymeacoffee",
92+
"url": "https://www.buymeacoffee.com/matteobruni"
10493
}
94+
],
95+
"main": "dist/cjs/index.js",
96+
"module": "dist/esm/index.js",
97+
"types": "dist/types/index.d.ts",
98+
"prettier": "@tsparticles/prettier-config",
99+
"dependencies": {
100+
"@tsparticles/basic": "^3.0.3",
101+
"@tsparticles/engine": "^3.0.3",
102+
"@tsparticles/plugin-emitters": "^3.0.3",
103+
"@tsparticles/plugin-emitters-shape-square": "^3.0.3"
104+
}
105105
}

‎presets/bigCircles/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { options } from "./options.js";
1111
*/
1212
export async function loadBigCirclesPreset(engine: Engine, refresh = true): Promise<void> {
1313
await loadBasic(engine, false);
14-
await loadEmittersShapeSquare(engine, false);
1514
await loadEmittersPlugin(engine, false);
15+
await loadEmittersShapeSquare(engine, false);
1616

1717
await engine.addPreset("bigCircles", options, false);
1818
await engine.addPreset("big-circles", options, refresh);

‎presets/hyperspace/package.json

+101-101
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,106 @@
11
{
2-
"name": "@tsparticles/preset-hyperspace",
3-
"version": "3.0.2",
4-
"description": "tsParticles hyperspace preset",
5-
"homepage": "https://particles.js.org",
6-
"scripts": {
7-
"build": "tsparticles-cli build",
8-
"build:ci": "tsparticles-cli build --ci",
9-
"version": "tsparticles-cli build -d && git add package.dist.json",
10-
"prepack": "pnpm run build"
2+
"name": "@tsparticles/preset-hyperspace",
3+
"version": "3.0.2",
4+
"description": "tsParticles hyperspace preset",
5+
"homepage": "https://particles.js.org",
6+
"scripts": {
7+
"build": "tsparticles-cli build",
8+
"build:ci": "tsparticles-cli build --ci",
9+
"version": "tsparticles-cli build -d && git add package.dist.json",
10+
"prepack": "pnpm run build"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/tsparticles/presets.git",
15+
"directory": "presets/hyperspace"
16+
},
17+
"keywords": [
18+
"front-end",
19+
"frontend",
20+
"tsparticles",
21+
"particles.js",
22+
"particlesjs",
23+
"particles",
24+
"particle",
25+
"canvas",
26+
"jsparticles",
27+
"xparticles",
28+
"particles-js",
29+
"particles-bg",
30+
"particles-bg-vue",
31+
"particles-ts",
32+
"particles.ts",
33+
"react-particles-js",
34+
"react-particles.js",
35+
"react-particles",
36+
"react",
37+
"reactjs",
38+
"vue-particles",
39+
"ngx-particles",
40+
"angular-particles",
41+
"particleground",
42+
"vue",
43+
"vuejs",
44+
"preact",
45+
"preactjs",
46+
"jquery",
47+
"angularjs",
48+
"angular",
49+
"typescript",
50+
"javascript",
51+
"animation",
52+
"web",
53+
"html5",
54+
"web-design",
55+
"webdesign",
56+
"css",
57+
"html",
58+
"css3",
59+
"animated",
60+
"background",
61+
"confetti",
62+
"canvas",
63+
"fireworks",
64+
"fireworks-js",
65+
"confetti-js",
66+
"confettijs",
67+
"fireworksjs",
68+
"canvas-confetti",
69+
"tsparticles-preset"
70+
],
71+
"publishConfig": {
72+
"directory": "dist",
73+
"linkDirectory": true,
74+
"access": "public"
75+
},
76+
"author": "Matteo Bruni <matteo.bruni@me.com>",
77+
"license": "MIT",
78+
"bugs": {
79+
"url": "https://github.com/tsparticles/presets/issues"
80+
},
81+
"funding": [
82+
{
83+
"type": "github",
84+
"url": "https://github.com/sponsors/matteobruni"
1185
},
12-
"repository": {
13-
"type": "git",
14-
"url": "git+https://github.com/tsparticles/presets.git",
15-
"directory": "presets/hyperspace"
86+
{
87+
"type": "github",
88+
"url": "https://github.com/sponsors/tsparticles"
1689
},
17-
"keywords": [
18-
"front-end",
19-
"frontend",
20-
"tsparticles",
21-
"particles.js",
22-
"particlesjs",
23-
"particles",
24-
"particle",
25-
"canvas",
26-
"jsparticles",
27-
"xparticles",
28-
"particles-js",
29-
"particles-bg",
30-
"particles-bg-vue",
31-
"particles-ts",
32-
"particles.ts",
33-
"react-particles-js",
34-
"react-particles.js",
35-
"react-particles",
36-
"react",
37-
"reactjs",
38-
"vue-particles",
39-
"ngx-particles",
40-
"angular-particles",
41-
"particleground",
42-
"vue",
43-
"vuejs",
44-
"preact",
45-
"preactjs",
46-
"jquery",
47-
"angularjs",
48-
"angular",
49-
"typescript",
50-
"javascript",
51-
"animation",
52-
"web",
53-
"html5",
54-
"web-design",
55-
"webdesign",
56-
"css",
57-
"html",
58-
"css3",
59-
"animated",
60-
"background",
61-
"confetti",
62-
"canvas",
63-
"fireworks",
64-
"fireworks-js",
65-
"confetti-js",
66-
"confettijs",
67-
"fireworksjs",
68-
"canvas-confetti",
69-
"tsparticles-preset"
70-
],
71-
"publishConfig": {
72-
"directory": "dist",
73-
"linkDirectory": true,
74-
"access": "public"
75-
},
76-
"author": "Matteo Bruni <matteo.bruni@me.com>",
77-
"license": "MIT",
78-
"bugs": {
79-
"url": "https://github.com/tsparticles/presets/issues"
80-
},
81-
"funding": [
82-
{
83-
"type": "github",
84-
"url": "https://github.com/sponsors/matteobruni"
85-
},
86-
{
87-
"type": "github",
88-
"url": "https://github.com/sponsors/tsparticles"
89-
},
90-
{
91-
"type": "buymeacoffee",
92-
"url": "https://www.buymeacoffee.com/matteobruni"
93-
}
94-
],
95-
"main": "dist/cjs/index.js",
96-
"module": "dist/esm/index.js",
97-
"types": "dist/types/index.d.ts",
98-
"prettier": "@tsparticles/prettier-config",
99-
"dependencies": {
100-
"@tsparticles/basic": "^3.0.3",
101-
"@tsparticles/engine": "^3.0.3",
102-
"@tsparticles/plugin-emitters": "^3.0.3",
103-
"@tsparticles/plugin-emitters-shape-square": "^3.0.3",
104-
"@tsparticles/updater-life": "^3.0.3"
90+
{
91+
"type": "buymeacoffee",
92+
"url": "https://www.buymeacoffee.com/matteobruni"
10593
}
94+
],
95+
"main": "dist/cjs/index.js",
96+
"module": "dist/esm/index.js",
97+
"types": "dist/types/index.d.ts",
98+
"prettier": "@tsparticles/prettier-config",
99+
"dependencies": {
100+
"@tsparticles/basic": "^3.0.3",
101+
"@tsparticles/engine": "^3.0.3",
102+
"@tsparticles/plugin-emitters": "^3.0.3",
103+
"@tsparticles/plugin-emitters-shape-square": "^3.0.3",
104+
"@tsparticles/updater-life": "^3.0.3"
105+
}
106106
}

‎presets/hyperspace/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { options } from "./options.js";
1212
*/
1313
export async function loadHyperspacePreset(engine: Engine, refresh = true): Promise<void> {
1414
await loadBasic(engine, false);
15-
await loadEmittersShapeSquare(engine, false);
1615
await loadEmittersPlugin(engine, false);
16+
await loadEmittersShapeSquare(engine, false);
1717
await loadLifeUpdater(engine, false);
1818

1919
await engine.addPreset("hyperspace", options, refresh);

0 commit comments

Comments
 (0)
Please sign in to comment.