VincentGarreau / particles.js

A lightweight JavaScript library for creating particles

Home Page:https://vincentgarreau.com/particles.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Particles dont interact while hovering or clicking

Surobhan opened this issue · comments

Hello community, can anyone help with my problem? The particles don't interact while hovering or clicking.

I downloaded the Json directly from https://vincentgarreau.com/particles.js/

On that website the particles do interact. But on my website they don't.
The code for interactivity is placed on my website as following:

"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": true,
"mode": "repulse"
},
"onclick": {
"enable": true,
"mode": "repulse"
},
"resize": true
},
"modes": {
"grab": {
"distance": 400,
"line_linked": {
"opacity": 1
}
},
"bubble": {
"distance": 400,
"size": 40,
"duration": 2,
"opacity": 8,
"speed": 3
},
"repulse": {
"distance": 200,
"duration": 0.4
},
"push": {
"particles_nb": 4
},
"remove": {
"particles_nb": 2
}
}
},

set the detect_on to "window"