Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. /* ---- reset ---- */
  2.  
  3. body {
  4. margin: 0;
  5. font:normal 75% Arial, Helvetica, sans-serif;
  6. }
  7.  
  8. canvas {
  9. display: block;
  10. vertical-align: bottom;
  11. }
  12.  
  13. /* ---- particles.js container ---- */
  14.  
  15. #particles-js {
  16. position: absolute;
  17. width: 100%;
  18. height: 100%;
  19. background-color: #000000;
  20. background-image: url("");
  21. background-repeat: no-repeat;
  22. background-size: cover;
  23. background-position: 50% 50%;
  24. }
  25.  
  26. /* ---- stats.js ---- */
  27.  
  28. .count-particles{
  29. background: #000022;
  30. position: absolute;
  31. top: 48px;
  32. left: 0;
  33. width: 80px;
  34. color: #13E8E9;
  35. font-size: .8em;
  36. text-align: left;
  37. text-indent: 4px;
  38. line-height: 14px;
  39. padding-bottom: 2px;
  40. font-family: Helvetica, Arial, sans-serif;
  41. font-weight: bold;
  42. }
  43.  
  44. .js-count-particles{
  45. font-size: 1.1em;
  46. }
  47.  
  48. #stats,
  49. .count-particles{
  50. -webkit-user-select: none;
  51. }
  52.  
  53. #stats{
  54. border-radius: 3px 3px 0 0;
  55. overflow: hidden;
  56. }
  57.  
  58. .count-particles{
  59. border-radius: 0 0 3px 3px;
  60. }
  61.  
  62. CSS
  63.  
  64. /* ---- particles.js config ---- */
  65.  
  66. particlesJS("particles-js", {
  67. "particles": {
  68. "number": {
  69. "value": 83,
  70. "density": {
  71. "enable": true,
  72. "value_area": 800
  73. }
  74. },
  75. "color": {
  76. "value": "#FFFFCC"
  77. },
  78. "shape": {
  79. "type": "circle",
  80. "stroke": {
  81. "width": 0,
  82. "color": "#000000"
  83. },
  84. "polygon": {
  85. "nb_sides": 5
  86. },
  87. "image": {
  88. "src": "img/github.svg",
  89. "width": 100,
  90. "height": 100
  91. }
  92. },
  93. "opacity": {
  94. "value": 0.5,
  95. "random": false,
  96. "anim": {
  97. "enable": false,
  98. "speed": 1,
  99. "opacity_min": 0.1,
  100. "sync": false
  101. }
  102. },
  103. "size": {
  104. "value": 3,
  105. "random": true,
  106. "anim": {
  107. "enable": false,
  108. "speed": 40,
  109. "size_min": 0.1,
  110. "sync": false
  111. }
  112. },
  113. "line_linked": {
  114. "enable": true,
  115. "distance": 150,
  116. "color": "#32CD32",
  117. "opacity": 0.4,
  118. "width": 1
  119. },
  120. "move": {
  121. "enable": true,
  122. "speed": 6,
  123. "direction": "none",
  124. "random": false,
  125. "straight": false,
  126. "out_mode": "out",
  127. "bounce": false,
  128. "attract": {
  129. "enable": false,
  130. "rotateX": 600,
  131. "rotateY": 1200
  132. }
  133. }
  134. },
  135. "interactivity": {
  136. "detect_on": "canvas",
  137. "events": {
  138. "onhover": {
  139. "enable": true,
  140. "mode": "grab"
  141. },
  142. "onclick": {
  143. "enable": true,
  144. "mode": "push"
  145. },
  146. "resize": true
  147. },
  148. "modes": {
  149. "grab": {
  150. "distance": 140,
  151. "line_linked": {
  152. "opacity": 1
  153. }
  154. },
  155. "bubble": {
  156. "distance": 400,
  157. "size": 40,
  158. "duration": 2,
  159. "opacity": 8,
  160. "speed": 3
  161. },
  162. "repulse": {
  163. "distance": 200,
  164. "duration": 0.4
  165. },
  166. "push": {
  167. "particles_nb": 4
  168. },
  169. "remove": {
  170. "particles_nb": 2
  171. }
  172. }
  173. },
  174. "retina_detect": true
  175. });
  176.  
  177.  
  178. /* ---- stats.js config ---- */
  179.  
  180. var count_particles, stats, update;
  181. stats = new Stats;
  182. stats.setMode(0);
  183. stats.domElement.style.position = 'absolute';
  184. stats.domElement.style.left = '0px';
  185. stats.domElement.style.top = '0px';
  186. document.body.appendChild(stats.domElement);
  187. count_particles = document.querySelector('.js-count-particles');
  188. update = function() {
  189. stats.begin();
  190. stats.end();
  191. if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) {
  192. count_particles.innerText = window.pJSDom[0].pJS.particles.array.length;
  193. }
  194. requestAnimationFrame(update);
  195. };
  196. requestAnimationFrame(update);
  197.  
  198. JSSSS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement