tsparticles / astro

tsParticles Astro official component
MIT License
33 stars 4 forks source link

Problem #21

Closed Bartyspace closed 3 months ago

Bartyspace commented 3 months ago

Hi, am having issue with tsparticles script i my project.

problem tsparticles1 problem tsparticles2 problemtsparticles3 problemtsparticles4

Can u help me?

matteobruni commented 3 months ago

particlesInit is not part of window type, you need to declare a new property there like this: https://stackoverflow.com/questions/12709074/how-do-you-explicitly-set-a-new-property-on-window-in-typescript

about the other error, what tsparticles packages are you using and which version? astro-particles doesn't work with tsparticles v3 yet.

Bartyspace commented 3 months ago

I solved the first problem, So how can i use tsParticles in Astro? With React?

matteobruni commented 3 months ago

I solved the first problem, So how can i use tsParticles in Astro? With React?

Use version 2, if you don’t need v3 features it’s fine.

Bartyspace commented 3 months ago

I uninstall all modules and installed astro-particles. Now i don´t know how to install tsparticles v2.

matteobruni commented 3 months ago

I uninstall all modules and installed astro-particles. Now i don´t know how to install tsparticles v2.

npm install tsparticles@2

Bartyspace commented 3 months ago

I tried everything. Now i have astro-particles and tsparticles@2. Another problem showed up. Snímek obrazovky 2024-03-15 193908

Bartyspace commented 3 months ago

I solved it. Solution was tsParticles. But my console showed error. Snímek obrazovky 2024-03-15 194744

Bartyspace commented 3 months ago

I solved. Ty for your help. I am so happy after four days of trying. 😆 Snímek obrazovky 2024-03-15 200738