Elements running away from the mouse

Asked

Viewed 85 times

-1

  • The plugin used on the site is: https://vincentgarreau.com/particles.js/

  • You could have discovered in the plugin name by simply pressing F12 and reading the page code.

1 answer

2

This effect is made by particles in a <canvas>, in this case, the site you submitted uses this plugin: https://vincentgarreau.com/particles.js/

Just import the script

<script src="particles.js"></script>

And inject the data into any div with the code

particlesJS('ID_ELEMENTO', {
    "particles": {
        "number": {
            "value": 80,
            "density": {
                "enable": true,
                "value_area": 800
            }
        }
        //Outras Opções...
    },
}, function () {

});

The complete list of options can be accessed here: https://github.com/VincentGarreau/particles.js/

Here is an interesting article about the use of particles with canvas: https://imasters.com.br/desenvolvimento/desenhando-particulas-usando-html5-canvas

Browser other questions tagged

You are not signed in. Login or sign up in order to post.