Skip to content

Commit 0acd9d5

Browse files
authored
Merge pull request tsparticles#5657 from tsparticles/v4
Docs
2 parents 43df594 + b680a97 commit 0acd9d5

File tree

199 files changed

+11872
-7891
lines changed

Some content is hidden

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

199 files changed

+11872
-7891
lines changed

.github/workflows/npm-publish.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
permissions:
99
id-token: write
10-
contents: read
10+
contents: write
1111

1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
@@ -16,6 +16,7 @@ concurrency:
1616
env:
1717
NX_CLOUD_DISTRIBUTED_EXECUTION: true
1818
NX_CLOUD_ACCESS_TOKEN: '${{ secrets.NX_CLOUD_ACCESS_TOKEN }}'
19+
IS_STABLE: ${{ !contains(github.ref, '-alpha.') && !contains(github.ref, '-beta.') }}
1920

2021
jobs:
2122
publish:
@@ -39,12 +40,11 @@ jobs:
3940
run_install: false
4041

4142
- name: Initialize Nx Cloud
42-
run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js"
43+
run: pnpm nx-cloud start-ci-run --distribute-on="5 linux-medium-js"
4344

4445
- name: Get pnpm store directory
4546
id: pnpm-cache
46-
run: |
47-
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
47+
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
4848

4949
- uses: actions/cache@v5
5050
name: Setup pnpm cache
@@ -58,15 +58,20 @@ jobs:
5858
run: pnpm install
5959

6060
- name: Build All Packages
61-
run: npx nx run-many -t build:ci
61+
run: pnpm nx run-many -t build:ci
6262
env:
6363
CI: true
6464

65+
# 📦 ZIP artifacts (solo stable)
66+
- name: Generate zip artifacts
67+
if: env.IS_STABLE == 'true'
68+
run: pnpm run release:zip-artifacts
69+
70+
# 🚀 Publish npm
6571
- name: Publish to NPM (OIDC Auth)
6672
run: |
6773
TAG="${GITHUB_REF#refs/tags/}"
68-
69-
BASE_CMD="npx lerna publish from-package --ignore-scripts"
74+
BASE_CMD="pnpm lerna publish from-package --ignore-scripts"
7075
7176
echo "Publishing tag: $TAG via OIDC"
7277
@@ -84,6 +89,30 @@ jobs:
8489
$BASE_CMD
8590
fi
8691
92+
# 🧠 Create release (raw GitHub notes)
93+
- name: Create Release (raw)
94+
if: env.IS_STABLE == 'true'
95+
id: release
96+
uses: softprops/action-gh-release@v2
97+
with:
98+
files: release-artifacts/*.zip
99+
generate_release_notes: true
100+
101+
# ✨ Prettify changelog → per package
102+
- name: Prettify changelog
103+
if: env.IS_STABLE == 'true'
104+
run: |
105+
echo "${{ steps.release.outputs.body }}" > RAW_RELEASE.md
106+
pnpm run release:prettify-changelog
107+
108+
# 🔁 Update release con changelog finale
109+
- name: Update Release Notes
110+
if: env.IS_STABLE == 'true'
111+
uses: softprops/action-gh-release@v2
112+
with:
113+
files: release-artifacts/*.zip
114+
body_path: RELEASE_NOTES.md
115+
87116
- name: Stop Nx Cloud Session
88-
run: npx nx fix-ci
117+
run: pnpm nx fix-ci
89118
if: always()

README.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.j
3131
- [tsParticles - TypeScript Particles](#tsparticles---typescript-particles)
3232
- [Table of Contents](#table-of-contents)
3333
- [Do you want to use it on your website?](#do-you-want-to-use-it-on-your-website)
34+
- [Start here in 2 minutes](#start-here-in-2-minutes)
3435
- [**_Library installation_**](#library-installation)
3536
- [**_Hosting / CDN_**](#hosting--cdn)
3637
- [jsDelivr](#jsdelivr)
@@ -72,16 +73,23 @@ React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.j
7273
- [`@tsparticles/wordpress`](#@tsparticles/wordpress)
7374
- [Elementor](#elementor)
7475
- [Presets](#presets)
76+
- [Ambient](#ambient)
7577
- [Big Circles](#big-circles)
7678
- [Bubbles](#bubbles)
7779
- [Confetti](#confetti)
80+
- [Confetti Cannon](#confetti-cannon)
81+
- [Confetti Explosions](#confetti-explosions)
82+
- [Confetti Falling](#confetti-falling)
83+
- [Confetti Parade](#confetti-parade)
7884
- [Fire](#fire)
7985
- [Firefly](#firefly)
8086
- [Fireworks](#fireworks)
8187
- [Fountain](#fountain)
88+
- [Hyperspace](#hyperspace)
8289
- [Links](#links)
8390
- [Sea Anemone](#sea-anemone)
8491
- [Snow](#snow)
92+
- [Squares](#squares)
8593
- [Stars](#stars)
8694
- [Triangles](#triangles)
8795
- [Templates and Resources](#templates-and-resources)
@@ -123,6 +131,69 @@ files splitted for `import` syntax.
123131
just [below](https://github.com/tsparticles/tsparticles/blob/main/README.md#library-installation) to guide you to
124132
migrate from the old particles.js library.
125133

134+
## Start here in 2 minutes
135+
136+
If you are new to tsParticles, this path is usually the fastest:
137+
138+
1. Install `@tsparticles/engine` and `@tsparticles/slim`
139+
2. Load the slim bundle once
140+
3. Start with a small config and iterate
141+
142+
```javascript
143+
import { tsParticles } from "@tsparticles/engine";
144+
import { loadSlim } from "@tsparticles/slim";
145+
146+
await loadSlim(tsParticles);
147+
148+
await tsParticles.load({
149+
id: "tsparticles",
150+
options: {
151+
background: {
152+
color: "#0d1117",
153+
},
154+
particles: {
155+
move: {
156+
enable: true,
157+
},
158+
number: {
159+
value: 60,
160+
},
161+
},
162+
},
163+
});
164+
```
165+
166+
Useful docs for the next step:
167+
168+
- Docs home: <https://particles.js.org/docs/>
169+
- Options guide: <https://github.com/tsparticles/tsparticles/blob/main/markdown/Options.md>
170+
- Migration guide: <https://github.com/tsparticles/tsparticles/blob/main/markdown/pjsMigration.md>
171+
- Presets catalog: <https://github.com/tsparticles/presets>
172+
173+
## Quick checklist
174+
175+
- Install `@tsparticles/engine` and one bundle (`@tsparticles/slim` is the common default)
176+
- Load the bundle before calling `tsParticles.load(...)`
177+
- Start from a small config, then extend incrementally
178+
179+
## Choose your quick-start path
180+
181+
- **I want fewer dependencies**: use `@tsparticles/engine` + only needed feature packages
182+
- **I want the easiest default**: use `@tsparticles/slim`
183+
- **I need everything enabled**: use `@tsparticles/all`
184+
185+
## Common pitfalls
186+
187+
- Loading options that require plugins before loading those plugin packages
188+
- Starting with very high particle counts before checking FPS
189+
- Mixing legacy snake_case keys with modern camelCase options
190+
191+
## Related docs
192+
193+
- Main docs: <https://particles.js.org/docs/>
194+
- Root options guide: <https://github.com/tsparticles/tsparticles/blob/main/markdown/Options.md>
195+
- Migration guide: <https://github.com/tsparticles/tsparticles/blob/main/markdown/pjsMigration.md>
196+
126197
## **_Library installation_**
127198

128199
### **_Hosting / CDN_**
@@ -440,6 +511,16 @@ the `Premium Addons for Elementor` plugin collection.
440511
There are some presets ready to be used in [this repository](https://github.com/tsparticles/presets), and they also have a bundle file that contains everything
441512
needed to run.
442513

514+
### Ambient
515+
516+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-ambient/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-ambient) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-ambient.svg)](https://www.npmjs.com/package/@tsparticles/preset-ambient) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-ambient)](https://www.npmjs.com/package/@tsparticles/preset-ambient)
517+
518+
This preset loads ambient circles on a dark background.
519+
520+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/ambient/images/sample.png)](https://particles.js.org/samples/presets/ambient)
521+
522+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/ambient#readme)
523+
443524
### Big Circles
444525

445526
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-big-circles/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-big-circles) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-big-circles.svg)](https://www.npmjs.com/package/@tsparticles/preset-big-circles) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-big-circles)](https://www.npmjs.com/package/@tsparticles/preset-big-circles)
@@ -470,6 +551,46 @@ This preset loads white and red confetti launched from the screen center on a tr
470551

471552
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/confetti#readme)
472553

554+
### Confetti Cannon
555+
556+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-confetti-cannon/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-confetti-cannon) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-confetti-cannon.svg)](https://www.npmjs.com/package/@tsparticles/preset-confetti-cannon) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-confetti-cannon)](https://www.npmjs.com/package/@tsparticles/preset-confetti-cannon)
557+
558+
This preset loads confetti launched from a draggable cannon.
559+
560+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/confettiCannon/images/sample.png)](https://particles.js.org/samples/presets/confettiCannon)
561+
562+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/confettiCannon#readme)
563+
564+
### Confetti Explosions
565+
566+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-confetti-explosions/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-confetti-explosions) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-confetti-explosions.svg)](https://www.npmjs.com/package/@tsparticles/preset-confetti-explosions) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-confetti-explosions)](https://www.npmjs.com/package/@tsparticles/preset-confetti-explosions)
567+
568+
This preset loads confetti bursts at multiple points on the screen.
569+
570+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/confettiExplosions/images/sample.png)](https://particles.js.org/samples/presets/confettiExplosions)
571+
572+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/confettiExplosions#readme)
573+
574+
### Confetti Falling
575+
576+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-confetti-falling/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-confetti-falling) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-confetti-falling.svg)](https://www.npmjs.com/package/@tsparticles/preset-confetti-falling) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-confetti-falling)](https://www.npmjs.com/package/@tsparticles/preset-confetti-falling)
577+
578+
This preset loads slowly falling confetti particles.
579+
580+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/confettiFalling/images/sample.png)](https://particles.js.org/samples/presets/confettiFalling)
581+
582+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/confettiFalling#readme)
583+
584+
### Confetti Parade
585+
586+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-confetti-parade/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-confetti-parade) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-confetti-parade.svg)](https://www.npmjs.com/package/@tsparticles/preset-confetti-parade) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-confetti-parade)](https://www.npmjs.com/package/@tsparticles/preset-confetti-parade)
587+
588+
This preset loads confetti moving horizontally across the screen like a parade.
589+
590+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/confettiParade/images/sample.png)](https://particles.js.org/samples/presets/confettiParade)
591+
592+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/confettiParade#readme)
593+
473594
### Fire
474595

475596
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-fire/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-fire) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-fire.svg)](https://www.npmjs.com/package/@tsparticles/preset-fire) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-fire)](https://www.npmjs.com/package/@tsparticles/preset-fire)
@@ -500,6 +621,16 @@ This preset loads a beautiful fireworks effect.
500621

501622
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/fireworks#readme)
502623

624+
### Hyperspace
625+
626+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-hyperspace/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-hyperspace) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-hyperspace.svg)](https://www.npmjs.com/package/@tsparticles/preset-hyperspace) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-hyperspace)](https://www.npmjs.com/package/@tsparticles/preset-hyperspace)
627+
628+
This preset loads a hyperspace tunnel effect with fast-moving particles.
629+
630+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/hyperspace/images/sample.png)](https://particles.js.org/samples/presets/hyperspace)
631+
632+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/hyperspace#readme)
633+
503634
### Fountain
504635

505636
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-fountain/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-fountain) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-fountain.svg)](https://www.npmjs.com/package/@tsparticles/preset-fountain) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-fountain)](https://www.npmjs.com/package/@tsparticles/preset-fountain)
@@ -532,6 +663,14 @@ You can find the instructions [here](https://github.com/tsparticles/presets/tree
532663

533664
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/snow#readme)
534665

666+
### Squares
667+
668+
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-squares/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-squares) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-squares.svg)](https://www.npmjs.com/package/@tsparticles/preset-squares) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-squares)](https://www.npmjs.com/package/@tsparticles/preset-squares)
669+
670+
[![demo](https://github.com/tsparticles/presets/raw/main/presets/squares/images/sample.png)](https://particles.js.org/samples/presets/squares)
671+
672+
You can find the instructions [here](https://github.com/tsparticles/presets/tree/main/presets/squares#readme)
673+
535674
### Stars
536675

537676
[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/preset-stars/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/preset-stars) [![npmjs](https://badge.fury.io/js/@tsparticles/preset-stars.svg)](https://www.npmjs.com/package/@tsparticles/preset-stars) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/preset-stars)](https://www.npmjs.com/package/@tsparticles/preset-stars)
@@ -629,6 +768,12 @@ You can find all options
629768
available [here](https://particles.js.org/docs/interfaces/tsParticles_Engine.Options_Interfaces_IOptions.IOptions.html)
630769
📖
631770

771+
If you want a practical map with examples, check these markdown docs too:
772+
773+
- Root options: <https://github.com/tsparticles/tsparticles/blob/main/markdown/Options.md>
774+
- Colors: <https://github.com/tsparticles/tsparticles/blob/main/markdown/Color.md>
775+
- Container API: <https://github.com/tsparticles/tsparticles/blob/main/markdown/Container.md>
776+
632777
## Want to see it in action and try it?
633778

634779
I've created a tsParticles collection on [CodePen](https://codepen.io/collection/DPOage) 😮 or you can check out
@@ -669,6 +814,10 @@ switch? [Read here](https://dev.to/matteobruni/5-reasons-to-use-tsparticles-and-
669814

670815
_Below you can find all the information you need to install tsParticles and its new syntax._
671816

817+
Migration quick guide in this repository:
818+
819+
- <https://github.com/tsparticles/tsparticles/blob/main/markdown/pjsMigration.md>
820+
672821
---
673822

674823
## Plugins/Customizations
@@ -679,6 +828,10 @@ tsParticles now supports some customizations 🥳.
679828

680829
_Read more [here](https://particles.js.org/docs/modules/Core_Interfaces_IPlugin.html)..._
681830

831+
Practical customization guide (shape + preset examples):
832+
833+
- <https://github.com/tsparticles/tsparticles/blob/main/markdown/Plugins.md>
834+
682835
---
683836

684837
## Dependency Graph

bundles/all/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ ba --> s
201201
ba --> u
202202
```
203203

204+
## Quick checklist
205+
206+
1. Install `@tsparticles/engine` (or use the CDN bundle below)
207+
2. Call the package loader function(s) before `tsParticles.load(...)`
208+
3. Apply the package options in your `tsParticles.load(...)` config
209+
204210
## How to use it
205211

206212
### CDN / Vanilla JS / jQuery
@@ -350,3 +356,14 @@ let particlesInit = async engine => {
350356
await loadAll(engine);
351357
};
352358
```
359+
360+
## Common pitfalls
361+
362+
- Calling `tsParticles.load(...)` before `loadAll(...)`
363+
- Verify required peer packages before enabling advanced options
364+
- Change one option group at a time to isolate regressions quickly
365+
366+
## Related docs
367+
368+
- All packages catalog: <https://github.com/tsparticles/tsparticles>
369+
- Main docs: <https://particles.js.org/docs/>

bundles/basic/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ bb --> s
5656
bb --> u
5757
```
5858

59+
## Quick checklist
60+
61+
1. Install `@tsparticles/engine` (or use the CDN bundle below)
62+
2. Call the package loader function(s) before `tsParticles.load(...)`
63+
3. Apply the package options in your `tsParticles.load(...)` config
64+
5965
## How to use it
6066

6167
### CDN / Vanilla JS / jQuery
@@ -205,3 +211,14 @@ let particlesInit = async engine => {
205211
await loadBasic(engine);
206212
};
207213
```
214+
215+
## Common pitfalls
216+
217+
- Calling `tsParticles.load(...)` before `loadBasic(...)`
218+
- Verify required peer packages before enabling advanced options
219+
- Change one option group at a time to isolate regressions quickly
220+
221+
## Related docs
222+
223+
- All packages catalog: <https://github.com/tsparticles/tsparticles>
224+
- Main docs: <https://particles.js.org/docs/>

0 commit comments

Comments
 (0)