@tsparticles/template-particles 4.1.3 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +3 -0
  3. package/package.json +4 -3
  4. package/template/angular/package.json +34 -0
  5. package/template/angular/src/app/app.component.css +16 -0
  6. package/template/angular/src/app/app.component.html +4 -0
  7. package/template/angular/src/app/app.component.ts +38 -0
  8. package/template/angular-confetti/package.json +36 -0
  9. package/template/angular-confetti/src/app/app.component.css +16 -0
  10. package/template/angular-confetti/src/app/app.component.html +4 -0
  11. package/template/angular-confetti/src/app/app.component.ts +38 -0
  12. package/template/angular-fireworks/package.json +36 -0
  13. package/template/angular-fireworks/src/app/app.component.css +16 -0
  14. package/template/angular-fireworks/src/app/app.component.html +4 -0
  15. package/template/angular-fireworks/src/app/app.component.ts +38 -0
  16. package/template/astro/package.json +18 -0
  17. package/template/astro/src/pages/index.astro +53 -0
  18. package/template/ember/app/templates/application.hbs +4 -0
  19. package/template/ember/package.json +20 -0
  20. package/template/inferno/package.json +21 -0
  21. package/template/inferno/src/App.css +21 -0
  22. package/template/inferno/src/App.tsx +42 -0
  23. package/template/jquery/package.json +21 -0
  24. package/template/jquery/src/main.ts +49 -0
  25. package/template/jquery/src/style.css +21 -0
  26. package/template/lit/package.json +21 -0
  27. package/template/lit/src/my-app.ts +64 -0
  28. package/template/nextjs/package.json +24 -0
  29. package/template/nextjs/src/app/page.tsx +39 -0
  30. package/template/nuxt2/package.json +20 -0
  31. package/template/nuxt2/pages/index.vue +83 -0
  32. package/template/nuxt3/app.vue +62 -0
  33. package/template/nuxt3/package.json +18 -0
  34. package/template/nuxt4/app.vue +62 -0
  35. package/template/nuxt4/package.json +18 -0
  36. package/template/preact/package.json +22 -0
  37. package/template/preact/src/App.css +21 -0
  38. package/template/preact/src/App.tsx +40 -0
  39. package/template/qwik/package.json +21 -0
  40. package/template/qwik/src/App.tsx +50 -0
  41. package/template/react/package.json +19 -0
  42. package/template/react/src/App.css +21 -0
  43. package/template/react/src/App.tsx +38 -0
  44. package/template/riot/package.json +21 -0
  45. package/template/riot/src/app.riot +31 -0
  46. package/template/solid/package.json +18 -0
  47. package/template/solid/src/App.tsx +59 -0
  48. package/template/solid/src/index.css +21 -0
  49. package/template/solid/src/main.tsx +9 -0
  50. package/template/stencil/package.json +21 -0
  51. package/template/stencil/src/components/app-home/app-home.tsx +64 -0
  52. package/template/svelte/package.json +20 -0
  53. package/template/svelte/src/App.svelte +70 -0
  54. package/template/svelte/src/main.ts +12 -0
  55. package/template/vanilla/LICENSE +21 -0
  56. package/template/vue2/package.json +23 -0
  57. package/template/vue2/src/App.vue +83 -0
  58. package/template/vue3/package.json +19 -0
  59. package/template/vue3/src/App.vue +53 -0
  60. package/template/vue3/src/main.ts +14 -0
  61. package/template/webcomponents/package.json +20 -0
  62. package/template/webcomponents/src/main.ts +16 -0
  63. package/template/webcomponents/src/style.css +21 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [4.2.0](https://github.com/tsparticles/tsparticles/compare/v4.1.3...v4.2.0) (2026-06-17)
7
+
8
+ ### Features
9
+
10
+ - adding templates to cli create ([bc118ef](https://github.com/tsparticles/tsparticles/commit/bc118efa3f40497f9fa84186ac6102411a19fda7))
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @tsparticles/template-particles
2
+
3
+ tsParticles base particles template. Use with `create-tsparticles-app` to scaffold a new project with a full-screen particle animation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/template-particles",
3
- "version": "4.1.3",
3
+ "version": "4.2.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -8,7 +8,8 @@
8
8
  "scripts": {
9
9
  "prebuild": "node scripts/prebuild.js",
10
10
  "build": "pnpm run prebuild",
11
- "build:ci": "pnpm run prebuild"
11
+ "build:ci": "pnpm run prebuild",
12
+ "version": "pnpm run build && git add template.json"
12
13
  },
13
- "gitHead": "0551736c55ae8eec3855a693af8a99b1b4420350"
14
+ "gitHead": "0a0fbf89c6cb3e1c2395763f55dabecfa85618f9"
14
15
  }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "ng": "ng",
7
+ "start": "ng serve",
8
+ "dev": "ng serve",
9
+ "build": "ng build",
10
+ "preview": "ng serve",
11
+ "watch": "ng build --watch --configuration development"
12
+ },
13
+ "dependencies": {
14
+ "@angular/animations": "~22.0.0",
15
+ "@angular/common": "~22.0.0",
16
+ "@angular/compiler": "~22.0.0",
17
+ "@angular/core": "~22.0.0",
18
+ "@angular/forms": "~22.0.0",
19
+ "@angular/platform-browser": "~22.0.0",
20
+ "@angular/platform-browser-dynamic": "~22.0.0",
21
+ "@angular/router": "~22.0.0",
22
+ "@tsparticles/angular": "^4.1.3",
23
+ "@tsparticles/particles": "^4.0.0",
24
+ "rxjs": "~7.8.2",
25
+ "tslib": "^2.8.1",
26
+ "zone.js": "~0.16.2"
27
+ },
28
+ "devDependencies": {
29
+ "@angular-devkit/build-angular": "~22.0.0",
30
+ "@angular/cli": "~22.0.0",
31
+ "@angular/compiler-cli": "~22.0.0",
32
+ "typescript": "~6.0.3"
33
+ }
34
+ }
@@ -0,0 +1,16 @@
1
+ #app {
2
+ position: absolute;
3
+ top: 50%;
4
+ left: 50%;
5
+ transform: translate(-50%, -50%);
6
+ z-index: 10;
7
+ text-align: center;
8
+ color: #fff;
9
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
10
+ pointer-events: none;
11
+ }
12
+
13
+ h1 {
14
+ font-size: 3.2em;
15
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
16
+ }
@@ -0,0 +1,4 @@
1
+ <div id="app">
2
+ <h1>tsParticles</h1>
3
+ </div>
4
+ <ngx-particles id="tsparticles" [options]="options" />
@@ -0,0 +1,38 @@
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadParticles } from "@tsparticles/particles";
4
+ import type { ISourceOptions } from "@tsparticles/engine";
5
+
6
+ @Component({
7
+ selector: "app-root",
8
+ templateUrl: "./app.component.html",
9
+ styleUrls: ["./app.component.css"],
10
+ })
11
+ export class AppComponent implements OnInit {
12
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
13
+
14
+ options: ISourceOptions = {
15
+ background: { color: { value: "#0d0d2b" } },
16
+ fpsLimit: 120,
17
+ particles: {
18
+ number: { value: 80, density: { enable: true } },
19
+ color: { value: "#ffffff" },
20
+ shape: { type: "circle" },
21
+ opacity: { value: 0.5 },
22
+ size: { value: { min: 1, max: 5 } },
23
+ links: { enable: true, distance: 150, color: "#ffffff", opacity: 0.3, width: 1 },
24
+ move: { enable: true, speed: 2, direction: "none", random: false, straight: false, outModes: { default: "bounce" } },
25
+ },
26
+ interactivity: {
27
+ events: { onHover: { enable: true, mode: "repulse" }, onClick: { enable: true, mode: "push" } },
28
+ modes: { repulse: { distance: 100, duration: 0.4 }, push: { quantity: 4 } },
29
+ },
30
+ detectRetina: true,
31
+ };
32
+
33
+ ngOnInit(): void {
34
+ void this.ngParticlesService.init(async (engine) => {
35
+ await loadParticles(engine);
36
+ });
37
+ }
38
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "ng": "ng",
7
+ "start": "ng serve",
8
+ "dev": "ng serve",
9
+ "build": "ng build",
10
+ "preview": "ng serve",
11
+ "watch": "ng build --watch --configuration development"
12
+ },
13
+ "dependencies": {
14
+ "@angular/animations": "~22.0.0",
15
+ "@angular/common": "~22.0.0",
16
+ "@angular/compiler": "~22.0.0",
17
+ "@angular/core": "~22.0.0",
18
+ "@angular/forms": "~22.0.0",
19
+ "@angular/platform-browser": "~22.0.0",
20
+ "@angular/platform-browser-dynamic": "~22.0.0",
21
+ "@angular/router": "~22.0.0",
22
+ "@tsparticles/angular": "^4.1.3",
23
+ "@tsparticles/engine": "^4.0.0",
24
+ "@tsparticles/particles": "^4.0.0",
25
+ "@tsparticles/configs": "^4.0.0",
26
+ "rxjs": "~7.8.2",
27
+ "tslib": "^2.8.1",
28
+ "zone.js": "~0.16.2"
29
+ },
30
+ "devDependencies": {
31
+ "@angular-devkit/build-angular": "~22.0.0",
32
+ "@angular/cli": "~22.0.0",
33
+ "@angular/compiler-cli": "~22.0.0",
34
+ "typescript": "~6.0.3"
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ #app {
2
+ position: absolute;
3
+ top: 50%;
4
+ left: 50%;
5
+ transform: translate(-50%, -50%);
6
+ z-index: 10;
7
+ text-align: center;
8
+ color: #fff;
9
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
10
+ pointer-events: none;
11
+ }
12
+
13
+ h1 {
14
+ font-size: 3.2em;
15
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
16
+ }
@@ -0,0 +1,4 @@
1
+ <div id="app">
2
+ <h1>tsParticles</h1>
3
+ </div>
4
+ <ng-particles id="tsparticles" [options]="options"></ng-particles>
@@ -0,0 +1,38 @@
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadParticles } from "@tsparticles/particles";
4
+ import type { ISourceOptions } from "@tsparticles/engine";
5
+
6
+ @Component({
7
+ selector: "app-root",
8
+ templateUrl: "./app.component.html",
9
+ styleUrls: ["./app.component.css"],
10
+ })
11
+ export class AppComponent implements OnInit {
12
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
13
+
14
+ options: ISourceOptions = {
15
+ background: { color: { value: "#0d0d2b" } },
16
+ fpsLimit: 120,
17
+ particles: {
18
+ number: { value: 80, density: { enable: true } },
19
+ color: { value: "#ffffff" },
20
+ shape: { type: "circle" },
21
+ opacity: { value: 0.5 },
22
+ size: { value: { min: 1, max: 5 } },
23
+ links: { enable: true, distance: 150, color: "#ffffff", opacity: 0.3, width: 1 },
24
+ move: { enable: true, speed: 2, direction: "none", random: false, straight: false, outModes: { default: "bounce" } },
25
+ },
26
+ interactivity: {
27
+ events: { onHover: { enable: true, mode: "repulse" }, onClick: { enable: true, mode: "push" } },
28
+ modes: { repulse: { distance: 100, duration: 0.4 }, push: { quantity: 4 } },
29
+ },
30
+ detectRetina: true,
31
+ };
32
+
33
+ ngOnInit(): void {
34
+ void this.ngParticlesService.init(async (engine) => {
35
+ await loadParticles(engine);
36
+ });
37
+ }
38
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "ng": "ng",
7
+ "start": "ng serve",
8
+ "dev": "ng serve",
9
+ "build": "ng build",
10
+ "preview": "ng serve",
11
+ "watch": "ng build --watch --configuration development"
12
+ },
13
+ "dependencies": {
14
+ "@angular/animations": "~22.0.0",
15
+ "@angular/common": "~22.0.0",
16
+ "@angular/compiler": "~22.0.0",
17
+ "@angular/core": "~22.0.0",
18
+ "@angular/forms": "~22.0.0",
19
+ "@angular/platform-browser": "~22.0.0",
20
+ "@angular/platform-browser-dynamic": "~22.0.0",
21
+ "@angular/router": "~22.0.0",
22
+ "@tsparticles/angular": "^4.1.3",
23
+ "@tsparticles/engine": "^4.0.0",
24
+ "@tsparticles/particles": "^4.0.0",
25
+ "@tsparticles/configs": "^4.0.0",
26
+ "rxjs": "~7.8.2",
27
+ "tslib": "^2.8.1",
28
+ "zone.js": "~0.16.2"
29
+ },
30
+ "devDependencies": {
31
+ "@angular-devkit/build-angular": "~22.0.0",
32
+ "@angular/cli": "~22.0.0",
33
+ "@angular/compiler-cli": "~22.0.0",
34
+ "typescript": "~6.0.3"
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ #app {
2
+ position: absolute;
3
+ top: 50%;
4
+ left: 50%;
5
+ transform: translate(-50%, -50%);
6
+ z-index: 10;
7
+ text-align: center;
8
+ color: #fff;
9
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
10
+ pointer-events: none;
11
+ }
12
+
13
+ h1 {
14
+ font-size: 3.2em;
15
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
16
+ }
@@ -0,0 +1,4 @@
1
+ <div id="app">
2
+ <h1>tsParticles</h1>
3
+ </div>
4
+ <ng-particles id="tsparticles" [options]="options"></ng-particles>
@@ -0,0 +1,38 @@
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadParticles } from "@tsparticles/particles";
4
+ import type { ISourceOptions } from "@tsparticles/engine";
5
+
6
+ @Component({
7
+ selector: "app-root",
8
+ templateUrl: "./app.component.html",
9
+ styleUrls: ["./app.component.css"],
10
+ })
11
+ export class AppComponent implements OnInit {
12
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
13
+
14
+ options: ISourceOptions = {
15
+ background: { color: { value: "#0d0d2b" } },
16
+ fpsLimit: 120,
17
+ particles: {
18
+ number: { value: 80, density: { enable: true } },
19
+ color: { value: "#ffffff" },
20
+ shape: { type: "circle" },
21
+ opacity: { value: 0.5 },
22
+ size: { value: { min: 1, max: 5 } },
23
+ links: { enable: true, distance: 150, color: "#ffffff", opacity: 0.3, width: 1 },
24
+ move: { enable: true, speed: 2, direction: "none", random: false, straight: false, outModes: { default: "bounce" } },
25
+ },
26
+ interactivity: {
27
+ events: { onHover: { enable: true, mode: "repulse" }, onClick: { enable: true, mode: "push" } },
28
+ modes: { repulse: { distance: 100, duration: 0.4 }, push: { quantity: 4 } },
29
+ },
30
+ detectRetina: true,
31
+ };
32
+
33
+ ngOnInit(): void {
34
+ void this.ngParticlesService.init(async (engine) => {
35
+ await loadParticles(engine);
36
+ });
37
+ }
38
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "astro dev",
8
+ "build": "astro build",
9
+ "preview": "astro preview"
10
+ },
11
+ "dependencies": {
12
+ "astro": "^5.7.0",
13
+ "@tsparticles/engine": "^4.0.0",
14
+ "@tsparticles/particles": "^4.0.0",
15
+ "@tsparticles/configs": "^4.0.0",
16
+ "@tsparticles/astro": "^4.1.3"
17
+ }
18
+ }
@@ -0,0 +1,53 @@
1
+ ---
2
+ import { loadParticles } from "@tsparticles/particles";
3
+ import { tsParticles } from "@tsparticles/engine";
4
+ import type { ISourceOptions } from "@tsparticles/engine";
5
+
6
+ const options: ISourceOptions = {
7
+ background: { color: { value: "#0d0d2b" } },
8
+ fpsLimit: 120,
9
+ particles: {
10
+ number: { value: 80, density: { enable: true } },
11
+ color: { value: "#ffffff" },
12
+ shape: { type: "circle" },
13
+ opacity: { value: 0.5 },
14
+ size: { value: { min: 1, max: 5 } },
15
+ links: { enable: true, distance: 150, color: "#ffffff", opacity: 0.3, width: 1 },
16
+ move: { enable: true, speed: 2, direction: "none", random: false, straight: false, outModes: { default: "bounce" } },
17
+ },
18
+ interactivity: {
19
+ events: { onHover: { enable: true, mode: "repulse" }, onClick: { enable: true, mode: "push" } },
20
+ modes: { repulse: { distance: 100, duration: 0.4 }, push: { quantity: 4 } },
21
+ },
22
+ detectRetina: true,
23
+ };
24
+ ---
25
+
26
+ <html lang="en">
27
+ <head>
28
+ <meta charset="utf-8" />
29
+ <title>tsParticles</title>
30
+ <style>
31
+ body { margin: 0; overflow: hidden; }
32
+ #app {
33
+ position: absolute; top: 50%; left: 50%;
34
+ transform: translate(-50%, -50%); z-index: 10;
35
+ text-align: center; color: #fff;
36
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
37
+ pointer-events: none;
38
+ }
39
+ h1 { font-size: 3.2em; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
40
+ </style>
41
+ </head>
42
+ <body>
43
+ <div id="app">
44
+ <h1>tsParticles</h1>
45
+ </div>
46
+ <Particles id="tsparticles" options={options} client:load />
47
+ <script>
48
+ import { loadParticles } from "@tsparticles/particles";
49
+ import { tsParticles } from "@tsparticles/engine";
50
+ void loadParticles(tsParticles);
51
+ </script>
52
+ </body>
53
+ </html>
@@ -0,0 +1,4 @@
1
+ <div id="app">
2
+ <h1>tsParticles</h1>
3
+ </div>
4
+ <EmberParticles @id="tsparticles" @options={{this.options}} />
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "dev": "ember serve",
7
+ "build": "ember build",
8
+ "preview": "ember serve"
9
+ },
10
+ "dependencies": {
11
+ "ember-source": "^6.4.0",
12
+ "@tsparticles/engine": "^4.0.0",
13
+ "@tsparticles/particles": "^4.0.0",
14
+ "@tsparticles/configs": "^4.0.0",
15
+ "@tsparticles/ember": "^4.1.3"
16
+ },
17
+ "devDependencies": {
18
+ "ember-cli": "^6.3.1"
19
+ }
20
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "inferno": "^9.0.4",
13
+ "@tsparticles/engine": "^4.0.0",
14
+ "@tsparticles/particles": "^4.0.0",
15
+ "@tsparticles/configs": "^4.0.0",
16
+ "@tsparticles/inferno": "^4.1.3"
17
+ },
18
+ "devDependencies": {
19
+ "typescript": "~5.8.3"
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ body {
2
+ margin: 0;
3
+ overflow: hidden;
4
+ }
5
+
6
+ #app {
7
+ position: absolute;
8
+ top: 50%;
9
+ left: 50%;
10
+ transform: translate(-50%, -50%);
11
+ z-index: 10;
12
+ text-align: center;
13
+ color: #fff;
14
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
15
+ pointer-events: none;
16
+ }
17
+
18
+ h1 {
19
+ font-size: 3.2em;
20
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
21
+ }
@@ -0,0 +1,42 @@
1
+ import { Component } from "inferno";
2
+ import Particles from "@tsparticles/inferno";
3
+ import { loadParticles } from "@tsparticles/particles";
4
+ import { tsParticles } from "@tsparticles/engine";
5
+ import type { ISourceOptions } from "@tsparticles/engine";
6
+ import "./App.css";
7
+
8
+ const options: ISourceOptions = {
9
+ background: { color: { value: "#0d0d2b" } },
10
+ fpsLimit: 120,
11
+ particles: {
12
+ number: { value: 80, density: { enable: true } },
13
+ color: { value: "#ffffff" },
14
+ shape: { type: "circle" },
15
+ opacity: { value: 0.5 },
16
+ size: { value: { min: 1, max: 5 } },
17
+ links: { enable: true, distance: 150, color: "#ffffff", opacity: 0.3, width: 1 },
18
+ move: { enable: true, speed: 2, direction: "none", random: false, straight: false, outModes: { default: "bounce" } },
19
+ },
20
+ interactivity: {
21
+ events: { onHover: { enable: true, mode: "repulse" }, onClick: { enable: true, mode: "push" } },
22
+ modes: { repulse: { distance: 100, duration: 0.4 }, push: { quantity: 4 } },
23
+ },
24
+ detectRetina: true,
25
+ };
26
+
27
+ export default class App extends Component {
28
+ componentDidMount() {
29
+ void loadParticles(tsParticles);
30
+ }
31
+
32
+ render() {
33
+ return (
34
+ <>
35
+ <div id="app">
36
+ <h1>tsParticles</h1>
37
+ </div>
38
+ <Particles id="tsparticles" options={options} />
39
+ </>
40
+ );
41
+ }
42
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "jquery": "^3.7.1",
13
+ "@tsparticles/engine": "^4.0.0",
14
+ "@tsparticles/particles": "^4.0.0",
15
+ "@tsparticles/configs": "^4.0.0",
16
+ "@tsparticles/jquery": "^4.1.3"
17
+ },
18
+ "devDependencies": {
19
+ "typescript": "~5.8.3"
20
+ }
21
+ }
@@ -0,0 +1,49 @@
1
+ import "./style.css";
2
+ import $ from "jquery";
3
+ import { loadParticles } from "@tsparticles/particles";
4
+ import { tsParticles } from "@tsparticles/engine";
5
+
6
+ (async () => {
7
+ await loadParticles(tsParticles);
8
+
9
+ $(() => {
10
+ $("#app").after('<div id="tsparticles"></div>');
11
+ $("#tsparticles").particles({
12
+ background: { color: { value: "#0d0d2b" } },
13
+ fpsLimit: 120,
14
+ particles: {
15
+ number: { value: 80, density: { enable: true } },
16
+ color: { value: "#ffffff" },
17
+ shape: { type: "circle" },
18
+ opacity: { value: 0.5 },
19
+ size: { value: { min: 1, max: 5 } },
20
+ links: {
21
+ enable: true,
22
+ distance: 150,
23
+ color: "#ffffff",
24
+ opacity: 0.3,
25
+ width: 1,
26
+ },
27
+ move: {
28
+ enable: true,
29
+ speed: 2,
30
+ direction: "none",
31
+ random: false,
32
+ straight: false,
33
+ outModes: { default: "bounce" },
34
+ },
35
+ },
36
+ interactivity: {
37
+ events: {
38
+ onHover: { enable: true, mode: "repulse" },
39
+ onClick: { enable: true, mode: "push" },
40
+ },
41
+ modes: {
42
+ repulse: { distance: 100, duration: 0.4 },
43
+ push: { quantity: 4 },
44
+ },
45
+ },
46
+ detectRetina: true,
47
+ });
48
+ });
49
+ })();
@@ -0,0 +1,21 @@
1
+ body {
2
+ margin: 0;
3
+ overflow: hidden;
4
+ }
5
+
6
+ #app {
7
+ position: absolute;
8
+ top: 50%;
9
+ left: 50%;
10
+ transform: translate(-50%, -50%);
11
+ z-index: 10;
12
+ text-align: center;
13
+ color: #fff;
14
+ font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
15
+ pointer-events: none;
16
+ }
17
+
18
+ h1 {
19
+ font-size: 3.2em;
20
+ text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "lit": "^3.2.1",
13
+ "@tsparticles/engine": "^4.0.0",
14
+ "@tsparticles/particles": "^4.0.0",
15
+ "@tsparticles/configs": "^4.0.0",
16
+ "@tsparticles/lit": "^4.1.3"
17
+ },
18
+ "devDependencies": {
19
+ "typescript": "~5.8.3"
20
+ }
21
+ }