UNPKG

29.1 kBMarkdownView Raw
1[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
2
3# tsParticles - TypeScript Particles
4
5**A lightweight TypeScript library for creating particles. Dependency free (\*), browser ready and compatible with
6React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.js, Solid.js, and Web Components**
7
8[![Rate on Openbase](https://badges.openbase.com/js/rating/tsparticles.svg)](https://openbase.com/js/tsparticles?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles/badge?style=rounded)](https://www.jsdelivr.com/package/npm/tsparticles) [![Cdnjs](https://img.shields.io/cdnjs/v/tsparticles)](https://cdnjs.com/libraries/tsparticles) [![npmjs](https://badge.fury.io/js/tsparticles.svg)](https://www.npmjs.com/package/tsparticles) [![npm](https://img.shields.io/npm/dm/tsparticles)](https://www.npmjs.com/package/tsparticles) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/) [![CodeFactor](https://www.codefactor.io/repository/github/matteobruni/tsparticles/badge)](https://www.codefactor.io/repository/github/matteobruni/tsparticles) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/b983aaf3461a4c48b1e2eecce1ff1d74)](https://www.codacy.com/manual/ar3s/tsparticles?utm_source=github.com&utm_medium=referral&utm_content=matteobruni/tsparticles&utm_campaign=Badge_Grade) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/matteobruni/tsparticles) [![Run on Repl.it](https://repl.it/badge/github/matteobruni/tsparticles)](https://repl.it/github/matteobruni/tsparticles)
9
10[![Discord](https://img.shields.io/discord/872061157379301416?label=discord&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/hACwv45Hme) [![Slack](https://particles.js.org/images/slack.png)](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI) [![Telegram](https://particles.js.org/images/telegram.png)](https://t.me/tsparticles)
11
12[![tsParticles Product Hunt](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=186113&theme=light)](https://www.producthunt.com/posts/tsparticles?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-tsparticles") <a href="https://www.buymeacoffee.com/matteobruni"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a beer&emoji=🍺&slug=matteobruni&button_colour=5F7FFF&font_colour=ffffff&font_family=Arial&outline_colour=000000&coffee_colour=FFDD00"></a>
13
14---
15
16## Table of Contents
17
18- [Use for your website](#Do-you-want-to-use-it-on-your-website)
19 - [Library installation](#Library-installation)
20- [Official components for some of the most used frameworks](#Official-components-for-some-of-the-most-used-frameworks)
21 - [Angular](#Angular)
22 - [Inferno](#Inferno)
23 - [jQuery](#jQuery)
24 - [Preact](#Preact)
25 - [ReactJS](#ReactJS)
26 - [RiotJS](#RiotJS)
27 - [SolidJS](#SolidJS)
28 - [Svelte](#Svelte)
29 - [VueJS 2.x](#VueJS-2x)
30 - [VueJS 3.x](#VueJS-3x)
31 - [Web Components](#Web-Components)
32 - [WordPress](#WordPress)
33- [Presets](#Presets)
34 - [Big Circles](#Big-Circles)
35 - [Bubbles](#Bubbles)
36 - [Confetti](#Confetti)
37 - [Fire](#Fire)
38 - [Firefly](#Firefly)
39 - [Fireworks](#Fireworks)
40 - [Fountain](#fountain)
41 - [Links](#links)
42 - [Sea Anemone](#Sea-Anemone)
43 - [Snow](#Snow)
44 - [Stars](#Stars)
45 - [Triangles](#Triangles)
46- [Templates and Resources](#Templates-and-Resources)
47- [Demo / Generator](#Demo--Generator)
48 - [Characters as particles](#Characters-as-particles)
49 - [Mouse hover connections](#Mouse-hover-connections)
50 - [Polygon mask](#Polygon-mask)
51 - [Animated stars](#Animated-stars)
52 - [Nyan cat flying on scrolling stars](#Nyan-cat-flying-on-scrolling-stars)
53 - [Background Mask particles](#Background-Mask-particles)
54- [Migrating from Particles.js](#Migrating-from-Particlesjs)
55- [Plugins/Customizations](#PluginsCustomizations)
56
57---
58
59## Do you want to use it on your website?
60
61_Documentation and Development references [here](https://particles.js.org/docs/) 📖_
62
63**This library is available on the two most popular CDNs and it's easy and ready to use, if you were using particles.js
64it's even easier**.
65
66You'll find the
67instructions [below](https://github.com/matteobruni/tsparticles/blob/main/README.md#library-installation), with all the
68links you need, and _don't be scared by **TypeScript**, it's just the source language_.
69
70**The output files are just JavaScript**. 🤩
71
72CDNs and `npm` have all the sources you need in **Javascript**, a bundle browser ready (tsparticles.min.js) and all
73files splitted for `import` syntax.
74
75**If you are interested** there are some _simple instructions_
76just [below](https://github.com/matteobruni/tsparticles/blob/main/README.md#library-installation) to guide you to
77migrate from the old particles.js library.
78
79## **_Library installation_**
80
81### **_Hosting / CDN_**
82
83**_Please use these hosts or your own to load tsParticles on your projects_**
84
85#### jsDelivr
86
87[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-engine/badge)](https://www.jsdelivr.com/package/npm/tsparticles-engine)
88[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-slim/badge)](https://www.jsdelivr.com/package/npm/tsparticles-slim)
89[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles/badge)](https://www.jsdelivr.com/package/npm/tsparticles)
90
91#### cdnjs
92
93[![Cdnjs](https://img.shields.io/cdnjs/v/tsparticles)](https://cdnjs.com/libraries/tsparticles)
94
95#### unpkg
96
97<https://unpkg.com/tsparticles-engine/> <https://unpkg.com/tsparticles-slim/> <https://unpkg.com/tsparticles/>
98
99---
100
101### **_npm_**
102
103[![npmjs](https://badge.fury.io/js/tsparticles-engine.svg)](https://www.npmjs.com/package/tsparticles-engine) [![npmjs](https://img.shields.io/npm/dt/tsparticles-engine)](https://www.npmjs.com/package/tsparticles-engine)
104[![npmjs](https://badge.fury.io/js/tsparticles-slim.svg)](https://www.npmjs.com/package/tsparticles-slim) [![npmjs](https://img.shields.io/npm/dt/tsparticles-slim)](https://www.npmjs.com/package/tsparticles-slim)
105[![npmjs](https://badge.fury.io/js/tsparticles.svg)](https://www.npmjs.com/package/tsparticles) [![npmjs](https://img.shields.io/npm/dt/tsparticles)](https://www.npmjs.com/package/tsparticles)
106
107```shell
108npm install tsparticles-engine
109```
110
111### **_yarn_**
112
113```shell
114yarn add tsparticles-engine
115```
116
117#### Import and require
118
119Starting from version 1.12.11 `import` and `require` can be used to import `tsParticles` .
120
121Now you can write something like this
122
123```javascript
124const tsParticles = require("tsparticles-engine");
125
126// or
127
128import { tsParticles } from "tsparticles-engine";
129```
130
131The imported `tsParticles` is the same instance you have when including the script.
132
133---
134
135### **_NuGet_**
136
137[![Nuget](https://img.shields.io/nuget/v/tsParticles)](https://www.nuget.org/packages/tsParticles/)
138
139---
140
141### **_Usage_**
142
143Load tsParticles and configure the particles:
144
145[![tsParticles demo](https://media.giphy.com/media/ftHwBpp3b0qNyCXRuu/giphy.gif)](https://particles.js.org)
146
147**index.html**
148
149```html
150<div id="tsparticles"></div>
151
152<script src="tsparticles.engine.min.js"></script>
153```
154
155**app.js**
156
157```javascript
158// @path-json can be an object or an array, the first will be loaded directly, the object from the array will be random selected
159/* tsParticles.loadJSON(@dom-id, @path-json, @callback (optional)); */
160
161tsParticles
162 .loadJSON("tsparticles", "presets/default.json")
163 .then((container) => {
164 console.log("callback - tsparticles config loaded");
165 })
166 .catch((error) => {
167 console.error(error);
168 });
169
170//or
171
172/* tsParticles.load(@dom-id, @options); */
173
174tsParticles.load("tsparticles", {
175 /* options here */
176});
177
178//or
179
180/* tsParticles.loadFromArray(@dom-id, @options, @index (optional)); */
181
182tsParticles.loadFromArray("tsparticles", [
183 {
184 /* options here */
185 },
186 {
187 /* other options here */
188 },
189]);
190//random object
191
192tsParticles.loadFromArray(
193 "tsparticles",
194 [
195 {
196 /* options here */
197 },
198 {
199 /* other options here */
200 },
201 ],
202 1
203); //the second one
204// Important! If the index is not in range 0...<array.length, the index will be ignored.
205
206// after initialization this can be used.
207
208/* tsParticles.setOnClickHandler(@callback); */
209
210/* this will be fired from all particles loaded */
211
212tsParticles.setOnClickHandler((event, particles) => {
213 /* custom on click handler */
214});
215
216// now you can control the animations too, it's possible to pause and resume the animations
217// these methods don't change the config so you're safe with all your configurations
218// domItem(0) returns the first tsParticles instance loaded in the dom
219const particles = tsParticles.domItem(0);
220
221// play will start the animations, if the move is not enabled it won't enable it, it just updates the frame
222particles.play();
223
224// pause will stop the animations
225particles.pause();
226```
227
228---
229
230## Official components for some of the most used frameworks
231
232### Angular
233
234`ng-particles`
235
236[![npm](https://img.shields.io/npm/v/ng-particles)](https://www.npmjs.com/package/ng-particles) [![npm](https://img.shields.io/npm/dm/ng-particles)](https://www.npmjs.com/package/ng-particles)
237
238Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/angular/README.md)
239
240### Inferno
241
242`inferno-particles`
243
244[![npm](https://img.shields.io/npm/v/inferno-particles)](https://www.npmjs.com/package/inferno-particles) [![npm](https://img.shields.io/npm/dm/inferno-particles)](https://www.npmjs.com/package/inferno-particles)
245
246Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/inferno/README.md)
247
248### jQuery
249
250`jquery-particles`
251
252[![npm](https://img.shields.io/npm/v/jquery-particles)](https://www.npmjs.com/package/jquery-particles) [![npm](https://img.shields.io/npm/dm/jquery-particles)](https://www.npmjs.com/package/jquery-particles)
253
254Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/jquery/README.md)
255
256### Preact
257
258`preact-particles`
259
260[![npm](https://img.shields.io/npm/v/preact-particles)](https://www.npmjs.com/package/preact-particles) [![npm](https://img.shields.io/npm/dm/preact-particles)](https://www.npmjs.com/package/preact-particles)
261
262Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/preact/README.md)
263
264### ReactJS
265
266`react-tsparticles`
267
268[![npm](https://img.shields.io/npm/v/react-tsparticles)](https://www.npmjs.com/package/react-tsparticles) [![npm](https://img.shields.io/npm/dm/react-tsparticles)](https://www.npmjs.com/package/react-tsparticles)
269
270Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/react/README.md)
271
272### RiotJS
273
274#### `riot-particles`
275
276[![npm](https://img.shields.io/npm/v/riot-particles)](https://www.npmjs.com/package/riot-particles) [![npm](https://img.shields.io/npm/dm/riot-particles)](https://www.npmjs.com/package/riot-particles)
277
278You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/components/riot/README.md)
279
280### SolidJS
281
282#### `solid-particles`
283
284[![npm](https://img.shields.io/npm/v/solid-particles)](https://www.npmjs.com/package/solid-particles) [![npm](https://img.shields.io/npm/dm/solid-particles)](https://www.npmjs.com/package/solid-particles)
285
286You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/components/solid/README.md)
287
288### Svelte
289
290`svelte-particles`
291
292[![npm](https://img.shields.io/npm/v/svelte-particles)](https://www.npmjs.com/package/svelte-particles) [![npm downloads](https://img.shields.io/npm/dm/svelte-particles)](https://www.npmjs.com/package/svelte-particles)
293
294Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/svelte/README.md)
295
296### VueJS 2.x
297
298`particles.vue`
299
300[![npm](https://img.shields.io/npm/v/particles.vue)](https://www.npmjs.com/package/particles.vue) [![npm](https://img.shields.io/npm/dm/particles.vue)](https://www.npmjs.com/package/particles.vue)
301
302Instructions available [here](https://github.com/matteobruni/tsparticles/blob/main/components/vue/README.md)
303
304### VueJS 3.x
305
306`particles.vue3`
307
308[![npm](https://img.shields.io/npm/v/particles.vue3)](https://www.npmjs.com/package/particles.vue3) [![npm](https://img.shields.io/npm/dm/particles.vue3)](https://www.npmjs.com/package/particles.vue3)
309
310Instruction available [here](https://github.com/matteobruni/tsparticles/blob/main/components/vue3/README.md)
311
312### WordPress
313
314Actually an official tsParticles plugin isn't existing, but I have a collaboration with
315the `Premium Addons for Elementor` plugin collection.
316
317<div style="float: left; margin-right: 10px;">
318 <img width="64" alt="Premium Addons for Elementor" src="https://particles.js.org/images/premium-addons-wordpress-plugin.png" />
319</div>
320<div>
321 Premium Addons for Elementor is one of the most common plugins for Elementor that offers more than 55 highly customizable Elementor Widgets and Section Add-ons. tsParticles is exclusively included in Premium Particles Section Add-on for Elementor Page Builder. <a href="https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/" target="_blank">Check It Now</a>.<br />
322 Use Premium Addons for Elementor Page Builder and get the chance to include tsParticles in your next WordPress website without the need to write a single line of code. <a href="https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/" target="_blank">See a Live Example</a>.
323</div>
324<div style="clear: both;"></div>
325
326### Web Components
327
328#### `web-particles`
329
330[![npm](https://img.shields.io/npm/v/web-particles)](https://www.npmjs.com/package/web-particles) [![npm](https://img.shields.io/npm/dm/web-particles)](https://www.npmjs.com/package/web-particles)
331
332You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/components/web/README.md)
333
334### WordPress
335
336Actually an official tsParticles plugin isn't existing, but I have a collaboration with
337the `Premium Addons for Elementor` plugin collection.
338
339<div style="float: left; margin-right: 10px;">
340 <img width="64" alt="Premium Addons for Elementor" src="https://particles.js.org/images/premium-addons-wordpress-plugin.png" />
341</div>
342<div>
343 Premium Addons for Elementor is one of the most common plugins for Elementor that offers more than 55 highly customizable Elementor Widgets and Section Add-ons. tsParticles is exclusively included in Premium Particles Section Add-on for Elementor Page Builder. <a href="https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/" target="_blank">Check It Now</a>.<br />
344 Use Premium Addons for Elementor Page Builder and get the chance to include tsParticles in your next WordPress website without the need to write a single line of code. <a href="https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/" target="_blank">See a Live Example</a>.
345</div>
346<div style="clear: both;"></div>
347
348---
349
350## Presets
351
352There are some presets ready to be used in this repository, and they have also a bundle file that contains everything
353needed to run.
354
355### Big Circles
356
357[![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)
358
359This preset loads big colored circles moving upwards on a white background.
360
361[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/bigCircles/images/sample.png)](https://particles.js.org/samples/presets/bigCircles)
362
363You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/bigCircles/README.md)
364
365### Bubbles
366
367[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-bubbles/badge)](https://www.jsdelivr.com/package/npm/tsparticles) [![npmjs](https://badge.fury.io/js/tsparticles-preset-bubbles.svg)](https://www.npmjs.com/package/tsparticles-preset-bubbles) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-bubbles)](https://www.npmjs.com/package/tsparticles-preset-bubbles)
368
369This preset loads colored bubbles coming from the bottom of the screen on a white background.
370
371[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/bubbles/images/sample.png)](https://particles.js.org/samples/presets/bubbles)
372
373You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/bubbles/README.md)
374
375### Confetti
376
377[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-confetti/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-confetti) [![npmjs](https://badge.fury.io/js/tsparticles-preset-confetti.svg)](https://www.npmjs.com/package/tsparticles-preset-confetti) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-confetti)](https://www.npmjs.com/package/tsparticles-preset-confetti)
378
379This preset loads white and red confetti launched from the screen center on a transparent background.
380
381[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/confetti/images/sample.png)](https://particles.js.org/samples/presets/confetti)
382
383You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/confetti/README.md)
384
385### Fire
386
387[![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)
388
389This preset loads a faded red to black background with particles colored like fire and ash sparks.
390
391[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/fire/images/sample.png)](https://particles.js.org/samples/presets/fire)
392
393You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/fire/README.md)
394
395### Firefly
396
397[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-firefly/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-firefly) [![npmjs](https://badge.fury.io/js/tsparticles-preset-firefly.svg)](https://www.npmjs.com/package/tsparticles-preset-firefly) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-firefly)](https://www.npmjs.com/package/tsparticles-preset-firefly)
398
399This preset loads a mouse trail made with small fading particles like little fireflies.
400
401[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/firefly/images/sample.png)](https://particles.js.org/samples/presets/firefly)
402
403You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/firefly/README.md)
404
405### Fireworks
406
407[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-fireworks/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-fireworks) [![npmjs](https://badge.fury.io/js/tsparticles-preset-fireworks.svg)](https://www.npmjs.com/package/tsparticles-preset-fireworks) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-fireworks)](https://www.npmjs.com/package/tsparticles-preset-fireworks)
408
409This preset loads a beautiful fireworks effect.
410
411[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/fireworks/images/sample.png)](https://particles.js.org/samples/presets/fireworks)
412
413You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/fireworks/README.md)
414
415### Fountain
416
417[![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)
418
419[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/fountain/images/sample.png)](https://particles.js.org/samples/presets/fountain)
420
421You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/fountain/README.md)
422
423### Links
424
425[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-links/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-links) [![npmjs](https://badge.fury.io/js/tsparticles-preset-links.svg)](https://www.npmjs.com/package/tsparticles-preset-links) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-links)](https://www.npmjs.com/package/tsparticles-preset-links)
426
427[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/links/images/sample.png)](https://particles.js.org/samples/presets/links)
428
429You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/links/README.md)
430
431### Sea Anemone
432
433[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-sea-anemone/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-sea-anemone) [![npmjs](https://badge.fury.io/js/tsparticles-preset-sea-anemone.svg)](https://www.npmjs.com/package/tsparticles-preset-sea-anemone) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-sea-anemone)](https://www.npmjs.com/package/tsparticles-preset-sea-anemone)
434
435[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/seaAnemone/images/sample.png)](https://particles.js.org/samples/presets/seaAnemone)
436
437You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/seaAnemone/README.md)
438
439### Snow
440
441[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-snow/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-snow) [![npmjs](https://badge.fury.io/js/tsparticles-preset-snow.svg)](https://www.npmjs.com/package/tsparticles-preset-snow) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-snow)](https://www.npmjs.com/package/tsparticles-preset-snow)
442
443[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/snow/images/sample.png)](https://particles.js.org/samples/presets/snow)
444
445You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/snow/README.md)
446
447### Stars
448
449[![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)
450
451[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/stars/images/sample.png)](https://particles.js.org/samples/presets/stars)
452
453You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/stars/README.md)
454
455### Triangles
456
457[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-preset-triangles/badge)](https://www.jsdelivr.com/package/npm/tsparticles-preset-triangles) [![npmjs](https://badge.fury.io/js/tsparticles-preset-triangles.svg)](https://www.npmjs.com/package/tsparticles-preset-triangles) [![npmjs](https://img.shields.io/npm/dt/tsparticles-preset-triangles)](https://www.npmjs.com/package/tsparticles-preset-triangles)
458
459[![demo](https://raw.githubusercontent.com/matteobruni/tsparticles/main/presets/triangles/images/sample.png)](https://particles.js.org/samples/presets/triangles)
460
461You can find the instructions [here](https://github.com/matteobruni/tsparticles/blob/main/preset/triangles/README.md)
462
463---
464
465## Templates and Resources
466
467You can find some tsParticles related templates [here](https://github.com/tsparticles/templates). The templates are
468created for _Vanilla Javascript_, _ReactJS_, _VueJS_, _Angular_, _SvelteJS_ and other frameworks.
469
470The templates will vary, new ones can be created or older ones updated with latest features or changed to a better
471style. Check them out once in a while.
472
473If you created some good design with _tsParticles_ feel free to submit a pull request with your cool template, you'll be
474credited as the template author!
475
476<https://github.com/tsparticles/templates>
477
478---
479
480## **_Demo / Generator_**
481
482<https://particles.js.org/samples>
483
484[![Particles demo](https://particles.js.org/images/demo2.png?v=1.39.2)](https://particles.js.org/samples)
485
486---
487
488### Characters as particles
489
490[![Particles chars demo](https://media.giphy.com/media/JsssOXz72bM6jGEZ0s/giphy.gif)](https://particles.js.org/samples/#chars)
491
492---
493
494### Polygon mask
495
496[![tsParticles Polygon Mask demo](https://media.giphy.com/media/lNRfiSgaMFbL4FMhW6/giphy.gif)](https://particles.js.org/samples/#polygonMask)
497
498---
499
500### Animated stars
501
502[![Particles NASA demo](https://media.giphy.com/media/cLqGsnh7FKRVMgPIWE/giphy.gif)](https://particles.js.org/samples/#nasa)
503
504---
505
506### Nyan cat flying on scrolling stars
507
508[![Particles Nyan Cat demo](https://media.giphy.com/media/LpX2oNc9ZMgIhIXQL9/giphy.gif)](https://particles.js.org/samples/#nyancat2)
509
510---
511
512### Snow particles
513
514[![tsParticles Snow demo](https://media.giphy.com/media/gihwUFbmiubbkdzEMX/giphy.gif)](https://particles.js.org/samples/#snow)
515
516---
517
518### Background Mask particles
519
520[![tsParticles Background Mask demo](https://media.giphy.com/media/dWraWgqInWFGWiOyRu/giphy.gif)](https://particles.js.org/samples/#background)
521
522---
523
524**particles.json**
525
526You can find some config samples [here](https://github.com/matteobruni/tsparticles/tree/main/website/presets) 📖
527
528---
529
530## **_Options_**
531
532You can find all options
533available [here](https://particles.js.org/docs/interfaces/Options_Interfaces_IOptions.IOptions.html) 📖
534
535## Want to see it in action and try it?
536
537I've created a tsParticles collection on [CodePen](https://codepen.io/collection/DPOage) 😮 or you can checkout
538my [profile](https://codepen.io/matteobruni)
539
540Otherwise, there's the demo page link below. Just click/tap the Coronavirus below, don't be scared. **It's safe** 😷.
541
542[![tsParticles demo](https://media.giphy.com/media/fsVN1ZHksgBIXNIbr1/giphy.gif)](https://particles.js.org/samples/#virus)
543
544Want to see ever more demos? Clone the repository on your computer and follow these instructions
545
546```shell
547$ yarn
548$ npx lerna bootstrap
549$ npx lerna run build
550$ cd demo/vanilla
551$ yarn start
552```
553
554**Boom! 💥** <http://localhost:3000> and you can checkout other demos.
555
556_If you are brave enough_ you can switch to the `dev` branch for trying the features under development.
557
558---
559
560## Migrating from Particles.js
561
562**tsParticles** has a package that makes this library 100% compatible with the _particles.js_ configuration.
563
564[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-particles.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/tsparticles-particles.js) [![npmjs](https://badge.fury.io/js/tsparticles-particles.js.svg)](https://www.npmjs.com/package/tsparticles-particles.js) [![npm](https://img.shields.io/npm/dm/tsparticles-particles.js)](https://www.npmjs.com/package/tsparticles-particles.js)
565
566Seriously, you just need to change the script from particles.js to the bundled compatibility package, et-voilà, **you're
567ready** 🧙!
568
569You can read more **[here](https://dev.to/matteobruni/migrating-from-particles-js-to-tsparticles-2a6m)**
570
571Want to know 5 reasons to do the
572switch? [Read here](https://dev.to/matteobruni/5-reasons-to-use-tsparticles-and-not-particles-js-1gbe)
573
574_Below you can find all the information you need to install tsParticles and its new syntax._
575
576---
577
578## Plugins/Customizations
579
580tsParticles now supports some customizations 🥳.
581
582**You can create your own plugins**
583
584_Read more [here](https://particles.js.org/docs/modules/Core_Interfaces_IPlugin.html)..._
585
586---
587
588<p>
589 <a href="https://www.jetbrains.com/?from=tsParticles">
590 <img src="https://raw.githubusercontent.com/matteobruni/tsparticles/gh-pages/images/jetbrains-logos/jetbrains-variant-4.png" height="150" alt="JetBrains" />
591 </a>
592 <a href="https://www.jetbrains.com/webstorm/?from=tsParticles">
593 <img src="https://raw.githubusercontent.com/matteobruni/tsparticles/gh-pages/images/jetbrains-logos/logo.png" height="150" alt="JetBrains" />
594 </a>
595</p>
596
597### Huge thanks to [JetBrains](https://www.jetbrains.com/?from=tsParticles) for the 2020-2021 Open Source Licenses!
598
599[JetBrains WebStorm](https://www.jetbrains.com/webstorm/?from=tsParticles) is used to maintain this project.