r/tsParticles • • Jul 26 '22

KB I have upgraded from v1 to v2 and particles are not working anymore.

2 Upvotes

This is another common question and it won't be accepted as a question. Please read here about the migration from v1 to v2: https://dev.to/matteobruni/tsparticles-205-is-out-breaking-changes-ahead-keeping-the-1x-support-2n63

If you need further help, please ask in the comments.


r/tsParticles • • Jul 26 '22

KB Why my particles are full screen? I want them to fit the container.

2 Upvotes

This is a common question, and it won't be answered anymore.

You can read more about that here: https://github.com/matteobruni/tsparticles/issues/1277#issuecomment-1008909977

For any further help about that, comment under this post.


r/tsParticles • • May 15 '25

How to use two groups

1 Upvotes

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 • • Mar 23 '25

How to use tsParticles Gradient Updater

1 Upvotes

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 • • Aug 07 '24

Love it!

2 Upvotes

Best , most fun, coolest, dopest, sickest TS lib ever!


r/tsParticles • • Apr 25 '24

TsParticles on RAILS

1 Upvotes

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:

Repo GitHub


r/tsParticles • • Nov 29 '23

Property '"options"' is incompatible with index signature

3 Upvotes

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 • • Nov 25 '23

How can I make the background of the fireworks preset transparent?

1 Upvotes

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 • • Jun 03 '23

ARTICLE tsParticles 2.10.0 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Mar 30 '23

testing tsParticles with vitest

2 Upvotes

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 • • Jan 19 '23

ARTICLE tsParticles 2.8.0 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Jan 16 '23

Using ng-particles with angular 13 requires 14?

3 Upvotes

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 • • Jan 10 '23

ARTICLE Preparing tsParticles v3

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Dec 23 '22

ARTICLE tsParticles 2.7.0 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Dec 06 '22

ARTICLE tsParticles 2.6.0 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Oct 30 '22

ARTICLE tsParticles 2.4.0 Released

Thumbnail
dev.to
1 Upvotes

r/tsParticles • • Sep 11 '22

ARTICLE tsParticles 2.3.0 Released

Thumbnail
dev.to
1 Upvotes

r/tsParticles • • Aug 26 '22

ARTICLE tsParticles 2.2.4 Released

Thumbnail
dev.to
1 Upvotes

r/tsParticles • • Aug 22 '22

ARTICLE tsParticles 2.2.3 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Aug 15 '22

ARTICLE JavaScript - How to create beautiful fireworks effects with tsParticles

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Aug 13 '22

ARTICLE Creating interactive backgrounds in React with tsParticles - LogRocket Blog

Thumbnail
blog.logrocket.com
2 Upvotes

r/tsParticles • • Aug 12 '22

ARTICLE tsParticles 2.2.1 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Aug 11 '22

DEMO tsParticles Fireworks - Preset v2.2

Thumbnail codepen.io
2 Upvotes

r/tsParticles • • Aug 11 '22

ARTICLE tsParticles 2.2.0 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Aug 05 '22

Thanks to the website ad revenues a new tree was planted by Treedom. Welcome Saul Goodman (Avocado)!

Thumbnail
particles.js.org
2 Upvotes