app.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /* -----------------------------------------------
  2. /* How to use? : Check the GitHub README
  3. /* ----------------------------------------------- */
  4. /* To load a config file (particles.json) you need to host this demo (MAMP/WAMP/local)... */
  5. /*
  6. particlesJS.load('particles-js', 'particles.json', function() {
  7. console.log('particles.js loaded - callback');
  8. });
  9. */
  10. /* Otherwise just put the config content (json): */
  11. particlesJS('particles-js',
  12. {
  13. "particles": {
  14. "number": {
  15. "value": 80,
  16. "density": {
  17. "enable": true,
  18. "value_area": 800
  19. }
  20. },
  21. "color": {
  22. "value": "#ffffff"
  23. },
  24. "shape": {
  25. "type": "circle",
  26. "stroke": {
  27. "width": 0,
  28. "color": "#000000"
  29. },
  30. "polygon": {
  31. "nb_sides": 5
  32. },
  33. "image": {
  34. "src": "img/github.svg",
  35. "width": 100,
  36. "height": 100
  37. }
  38. },
  39. "opacity": {
  40. "value": 0.5,
  41. "random": false,
  42. "anim": {
  43. "enable": false,
  44. "speed": 1,
  45. "opacity_min": 0.1,
  46. "sync": false
  47. }
  48. },
  49. "size": {
  50. "value": 5,
  51. "random": true,
  52. "anim": {
  53. "enable": false,
  54. "speed": 40,
  55. "size_min": 0.1,
  56. "sync": false
  57. }
  58. },
  59. "line_linked": {
  60. "enable": true,
  61. "distance": 150,
  62. "color": "#ffffff",
  63. "opacity": 0.4,
  64. "width": 1
  65. },
  66. "move": {
  67. "enable": true,
  68. "speed": 6,
  69. "direction": "none",
  70. "random": false,
  71. "straight": false,
  72. "out_mode": "out",
  73. "attract": {
  74. "enable": false,
  75. "rotateX": 600,
  76. "rotateY": 1200
  77. }
  78. }
  79. },
  80. "interactivity": {
  81. "detect_on": "canvas",
  82. "events": {
  83. "onhover": {
  84. "enable": true,
  85. "mode": "repulse"
  86. },
  87. "onclick": {
  88. "enable": true,
  89. "mode": "push"
  90. },
  91. "resize": true
  92. },
  93. "modes": {
  94. "grab": {
  95. "distance": 400,
  96. "line_linked": {
  97. "opacity": 1
  98. }
  99. },
  100. "bubble": {
  101. "distance": 400,
  102. "size": 40,
  103. "duration": 2,
  104. "opacity": 8,
  105. "speed": 3
  106. },
  107. "repulse": {
  108. "distance": 200
  109. },
  110. "push": {
  111. "particles_nb": 4
  112. },
  113. "remove": {
  114. "particles_nb": 2
  115. }
  116. }
  117. },
  118. "retina_detect": true,
  119. "config_demo": {
  120. "hide_card": false,
  121. "background_color": "#b61924",
  122. "background_image": "",
  123. "background_position": "50% 50%",
  124. "background_repeat": "no-repeat",
  125. "background_size": "cover"
  126. }
  127. }
  128. );