1/* ----------------------------------------------- 2/* How to use? : Check the GitHub README 3/* ----------------------------------------------- */ 4 5/* To load a config file (particles.json) you need to host this demo (MAMP/WAMP/local)... */ 6/* 7particlesJS.load('particles-js', 'particles.json', function() { 8 console.log('particles.js loaded - callback'); 9}); 10*/ 11 12/* Otherwise just put the config content (json): */ 13 14particlesJS({ 15 "particles": { 16 "number": { 17 "value": 63, 18 "density": { 19 "enable": true, 20 "value_area": 800 21 } 22 }, 23 "color": { 24 "value": "#FFF" 25 }, 26 "shape": { 27 "type": "circle", 28 "stroke": { 29 "width": 0, 30 "color": "#000000" 31 }, 32 "polygon": { 33 "nb_sides": 5 34 }, 35 "image": { 36 "src": "img/github.svg", 37 "width": 100, 38 "height": 100 39 } 40 }, 41 "opacity": { 42 "value": 0.5, 43 "random": true, 44 "anim": { 45 "enable": false, 46 "speed": 1, 47 "opacity_min": 0.1, 48 "sync": false 49 } 50 }, 51 "size": { 52 "value": 4, 53 "random": true, 54 "anim": { 55 "enable": false, 56 "speed": 2, 57 "size_min": 0.1, 58 "sync": false 59 } 60 }, 61 "line_linked": { 62 "enable": false, 63 "distance": 500, 64 "color": "#ffffff", 65 "opacity": 0.4, 66 "width": 2 67 }, 68 "move": { 69 "enable": true, 70 "speed": 3, 71 "direction": "left", 72 "random": false, 73 "straight": false, 74 "out_mode": "out", 75 "bounce": false, 76 "attract": { 77 "enable": false, 78 "rotateX": 4577, 79 "rotateY": 1893.9842325812622 80 } 81 } 82 }, 83 "interactivity": { 84 "detect_on": "canvas", 85 "events": { 86 "onhover": { 87 "enable": false, 88 "mode": "bubble" 89 }, 90 "onclick": { 91 "enable": false, 92 "mode": "repulse" 93 }, 94 "resize": true 95 }, 96 "modes": { 97 "grab": { 98 "distance": 400, 99 "line_linked": { 100 "opacity": 0.5 101 } 102 }, 103 "bubble": { 104 "distance": 400, 105 "size": 3, 106 "duration": 0.3, 107 "opacity": 1, 108 "speed": 3 109 }, 110 "repulse": { 111 "distance": 200, 112 "duration": 0.4 113 }, 114 "push": { 115 "particles_nb": 4 116 }, 117 "remove": { 118 "particles_nb": 2 119 } 120 } 121 }, 122 "retina_detect": true 123}); 124 125 126 127 128 129 130var count_particles, stats, update; 131stats = new Stats; 132stats.setMode(0); 133stats.domElement.style.position = 'absolute'; 134stats.domElement.style.left = '0px'; 135stats.domElement.style.top = '0px'; 136document.body.appendChild(stats.domElement); 137count_particles = document.querySelector('.js-count-particles'); 138update = function() { 139 stats.begin(); 140 stats.end(); 141 if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) { 142 count_particles.innerText = window.pJSDom[0].pJS.particles.array.length; 143 } 144 requestAnimationFrame(update); 145}; 146requestAnimationFrame(update);; 147 148 149
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.