Nov 15, 2014 in Charts 15866 views
Particles.js is a lightweight JavaScript library for creating particles
Source: github.com
1. INCLUDE JS FILES
<script src="particles.js"></script>
2. HTML
<div id="particles-js"></div>
3. JAVASCRIPT
/* particlesJS('dom-id', params); /* @dom-id : set the html tag id [string, optional, default value : particles-js] /* @params: set the params [object, optional, default values : check particles.js] */ particlesJS('particles-js', { particles: { color: '#fff', shape: 'circle', // "circle", "edge" or "triangle" opacity: 0.5, size: 2, size_random: true, nb: 200, line_linked: { enable_auto: true, distance: 250, color: '#fff', opacity: 0.5, width: 1, condensed_mode: { enable: true, rotateX: 600, rotateY: 600 } }, anim: { enable: true, speed: 2 } }, interactivity: { enable: false, mouse: { distance: 250 }, detect_on: 'canvas', // "canvas" or "window" mode: 'grab' }, /* Retina Display Support */ retina_detect: false });
Tagged with:
particles.js
javascript library
particles
creating particles
lightweight
Related Articles