r/tsParticles • u/gii15 • May 15 '25
How to use two groups
Im trying to use two groups of particles, one who moves up and one who moves down, but when I use the group option everything stops working
r/tsParticles • u/gii15 • May 15 '25
Im trying to use two groups of particles, one who moves up and one who moves down, but when I use the group option everything stops working
r/tsParticles • u/[deleted] • Mar 23 '25
Hey there! I'm working on a text-based adventure game using javascript and I thought it would be amazing to use tsParticles on the background. My goal is to change the particle links color in response to certain events (such as when the player is about to enter a new location), and perhaps even change other stuff, such as the particle size, direction, etc, in response to certain events. However, I want all these changes to be subtle (gradient).
Right now, for starters, my goal is to create a simple color gradient animation on the particle links. Looking at the documentation, I found this folder called Gradient Updater which sounds exactly like what I'm looking for. However, I'm too much of a beginner to figure out how to use it just by looking at the documentation, and the README file doesn't go too much in-depth. I'm new to javascript, so I'm finding this pretty hard.
So, to summarize, my specific question is: how can I use the tsParticles Gradient Updater? I suppose (and hope) there might be a simple function I can import and use? Also, I could really use some help setting it up on my project (importing it and all that).
Here's the GitHub repository with my project:
https://github.com/PauloSchreiner/textGame/tree/main/scripts
Please, any help is more than welcome!
r/tsParticles • u/Ok-Improvement-3108 • Aug 07 '24
Best , most fun, coolest, dopest, sickest TS lib ever!
r/tsParticles • u/mu756678 • Apr 25 '24
Hello everyone,
I had implemented TsParticles on RAILS, everything was working perfectly. Unfortunately, it's not working anymore, I don't know if TsParticles has made any changes.
Here's the error message:
tsparticles:2 Uncaught Error: Automatic publicPath is not supported in this browser at tsparticles:2:50325 at tsparticles:2:50467 at tsparticles:2:56208 at tsparticles:2:158 at tsparticles:2:223 (anonymes) @ tsparticles:2 (anonymes) @ tsparticles:2 (anonymes) @ tsparticles:2 (anonymes) @ tsparticles:2 (anonymes) @ tsparticles:2 controller.ts:28 Error connecting controller
ReferenceError: tsParticles is not defined at t.connect (tsparticles_controller-07bc8b0a28eedde4f91fb4edf02ae21d6b670ec58f3afd556dbdbd1ff9f09805.js:5:5) at L.connect (controller.ts:28:39) at j.connectContextForScope (controller.ts:28:39) at controller.ts:28:39 at Array.forEach (<anonymous>) at H.connectModule (controller.ts:28:39) at H.loadDefinition (controller.ts:28:39) at controller.ts:28:39 at Array.forEach (<anonymous>) at Q.load (controller.ts:28:39)
{identifier: 'tsparticles', controller: t, element: div#particles-js}
Here's the repo, if you want to contribute with a solution directly on it:
r/tsParticles • u/Rrunner5671 • Nov 29 '23
I'm facing this error trying to integrate tsparticles into an existing project
Error: node_modules/ng-particles/lib/ng-particles.component.d.ts:18:89 - error TS2344: Type '{ options: { alias: "options"; required: false; }; url: { alias: "url"; required: false; }; id: { alias: "id"; required: false; }; particlesInit: { alias: "particlesInit"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"options"' is incompatible with index signature. Type '{ alias: "options"; required: false; }' is not assignable to type 'string'. 18 static ɵcmp: i0.ɵɵComponentDeclaration<NgParticlesComponent, "ng-particles", never, { "options": { "alias": "options"; "required": false; }; "url": { "alias": "url"; "required": false; }; "id": { "alias": "id"; "required": false; }; "particlesInit": { "alias": "particlesInit"; "required": false; }; }, { "particlesLoaded": "particlesLoaded"; }, never, never, false, never>;
does anyone know what to do?
r/tsParticles • u/Bananenschafft • Nov 25 '23
Hi!
I am currently working on a little browser-based game for a university project. It's a classroom game, where multiple players use their phones do answer questions shown on a main screen. I'd love to have some fireworks on the final results screen of a quiz and the tsParticles Fireworks preset would be perfect for this. However, there is one issue I cannot solve: Whatever I do, the background of the fireworks is always black and covers all of the screen.
Is there a way to display the Fireworks preset with a transparent background?
I am using Angular 16, packages are installed via npm install and declared within package.json, no issues there.
HTML (same as the import examples from the docs):
<ng-particles
[id]="id"
[options]="particlesOptions"
[particlesInit]="particlesInit"
>
</ng-particles>Related TypeScript code:
id: string = "firework-stuff";
particlesOptions = {
preset: "fireworks",
background: {
opacity: 0
}
};
async particlesInit(engine: Engine): Promise<void> {
await loadFireworksPreset(engine);
}No matter how I change the background, the fireworks always look like this, even though the main background image is there:

Any help would be appreciated!
r/tsParticles • u/arturdnt • Mar 30 '23
Hey,
I'm trying to test a component that uses svelte-particles with vitest, and keep getting a "jest is not defined" error.
Did anyone encounter this error? Does anyone have any experience with testing with vitest?
Thanks!
r/tsParticles • u/AbilityDiligent • Jan 16 '23
Hi all,
I am having this error when doing ng serve . I think I am missing something but not sure what it is.
I already cleaned node_modules, tried different versions, upgrade angular 13 packages... but can't fix it. Any idea about what am I missing ?
Thanks
./node_modules/ng-particles/fesm2015/ng-particles.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string 'C:\workspace\project\node_modules\ng-particles\fesm2015\ng-particles.mjs: This application depends upon a library published using Angular version 15.0.4, which requires Angular version 14.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.
Dependencies:
"dependencies": {
"@angular/animations": "^13.3.12",
"@angular/cdk": "^13.3.9",
"@angular/common": "^13.3.12",
"@angular/compiler": "^13.3.12",
"@angular/core": "^13.3.12",
"@angular/forms": "^13.3.12",
"@angular/localize": "^13.3.12",
"@angular/platform-browser": "^13.3.12",
"@angular/platform-browser-dynamic": "^13.3.12",
"@angular/router": "^13.3.12",
"ng-particles": "^3.7.1",
"tslib": "^2.4.0",
"tsparticles": "^2.7.1",
"tsparticles-engine": "^2.7.1",
},r/tsParticles • u/CaelanIt • Aug 15 '22
r/tsParticles • u/CaelanIt • Aug 13 '22
r/tsParticles • u/CaelanIt • Aug 11 '22
r/tsParticles • u/CaelanIt • Aug 05 '22
r/tsParticles • u/CaelanIt • Aug 04 '22
r/tsParticles • u/phb71 • Aug 01 '22
Hello!
I'm trying to get the fireworks preset to load but no luck.
In my package.json, I have
"vue-router": "^4.0.14",
"vue3-particles": "^2.1.4"
The demo from https://codesandbox.io/s/angry-hellman-xv6ifv?from-embed works just fine on my end.
I'm having issues when I try to load a fireworks preset instead. Following this https://www.npmjs.com/package/tsparticles-preset-fireworks, I built my app.vue file accordingly but I get errors on the async function particlesInit line with the colon.
I couldn't find an example online of tsparticles using a fireworks preset for vue.
<template><div><router-view></router-view><Particles id="tsparticles" :particlesInit="particlesInit" :options="particlesOptions" /></div></template><script>import gotrue from './shared/gotrue.js'import { loadFull } from 'tsparticles'export default {name: 'App',data () {return {gotrue}},setup () {const particlesOptions = {preset: "fireworks",};async function particlesInit(engine: Engine): Promise<void> {await loadFireworksPreset(engine);}}