2017-07-07 5 views
0

私が持っている:粒子の反応粒子-JS更新していない番号は

どんなに私が number.value作り方高い
return (
    <Particles 
    style={{ 
     position: 'absolute', 
     top: 0, 
     left: 0, 
     right: 0, 
     bottom: 0, 
     zIndex: -1 
    }} 
    params={{ 
     number: { 
     value: 400, 
     density: { 
      enable: true, 
      value_area: 800 
     } 
     }, 
     line_linked: { 
     enable: true, 
     distance: 150, 
     color: "#ffffff", 
     opacity: 0.4, 
     width: 1 
     }, 
     "shape": { 
     "type": "circle", 
     "stroke": { 
      "width": 0, 
      "color": "#000000" 
     }, 
     polygon: { 
      nb_sides: 7 
     } 
     }, 
     "interactivity": { 
     "detect_on": "canvas", 
     "events": { 
      "onhover": { 
      "enable": true, 
      "mode": "grab" 
      }, 
      "onclick": { 
      "enable": true, 
      "mode": "push" 
      }, 
      "resize": true 
     }, 
     "modes": { 
      "grab": { 
      "distance": 400, 
      "line_linked": { 
       "opacity": 1 
      } 
      }, 
      "repulse": { 
      "distance": 200, 
      "duration": 0.4 
      } 
     } 
     }, 
     "retina_detect": true 
    }} /> 

、画面上の粒子の数だけ増加しません。私が間違ってやっていることに関する考えは?

答えて

1

の中にこのプロパティを囲んでいないことがあります。また、スタイルからのz-indexプロパティを削除するか、粒子

particles: { 
    number: { 
    value: 400, 
    density: { 
     enable: true, 
     value_area: 800 
    } 
    }, 
    line_linked: { 
    enable: true, 
    distance: 150, 
    color: "#ffffff", 
    opacity: 0.4, 
    width: 1 
    }, 
    "shape": { 
    "type": "circle", 
    "stroke": { 
     "width": 0, 
     "color": "#000000" 
    }, 
    polygon: { 
     nb_sides: 7 
    } 
    } 
}, 
    "interactivity": { 
    "detect_on": "canvas", 
    "events": { 
     "onhover": { 
     "enable": true, 
     "mode": "grab" 
     }, 
     "onclick": { 
     "enable": true, 
     "mode": "push" 
     }, 
     "resize": true 
    }, 
    "modes": { 
     "grab": { 
     "distance": 400, 
     "line_linked": { 
      "opacity": 1 
     } 
     }, 
     "repulse": { 
     "distance": 200, 
     "duration": 0.4 
     } 
    } 
    }, 
    "retina_detect": true 
+0

うーんが表示されますに設定 - そして、どのように私はそれ私のバックグラウンド作るのですか? – Shamoon

+0

また、これは動作していないようです – Shamoon

+0

編集の答え:) –

関連する問題