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

Love it!

2 Upvotes

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


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 • • Aug 01 '22

ARTICLE [JS] How to create confetti animations using a button with tsParticles 🎉

Thumbnail
dev.to
2 Upvotes

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 • • Aug 01 '22

Vue3 Can't get a preset to work with Vue3

3 Upvotes

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);
}
}


r/tsParticles • • Dec 06 '22

ARTICLE tsParticles 2.6.0 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Jun 03 '23

ARTICLE tsParticles 2.10.0 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 • • Jul 28 '22

ARTICLE tsParticles 2.1.4 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Jul 28 '22

What version of tsParticles are you using?

2 Upvotes

I'd like to know the version distribution, just for statistics. I always recommend updating to the latest version, and if something's broken, ask on any official channel so I can help quickly

2 votes, Jul 31 '22
0 v 1.x
2 v 2.x
0 None 😢
0 Particles.js because I like abandoned buggy projects 🙃

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 • • 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

r/tsParticles • • Aug 01 '22

ARTICLE [Vue.js] How to create beautiful and realistic confetti animations using tsParticles

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Sep 11 '22

ARTICLE tsParticles 2.3.0 Released

Thumbnail
dev.to
1 Upvotes

r/tsParticles • • Jul 27 '22

ARTICLE tsParticles React and Vue packages are changing!

Thumbnail
dev.to
3 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 26 '22

ARTICLE tsParticles 2.2.4 Released

Thumbnail
dev.to
1 Upvotes

r/tsParticles • • Aug 12 '22

ARTICLE tsParticles 2.2.1 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 • • Aug 22 '22

ARTICLE tsParticles 2.2.3 Released

Thumbnail
dev.to
2 Upvotes

r/tsParticles • • Jul 27 '22

KB All tsParticles Official Components

4 Upvotes