wufe/react-particles-js

Passing size range for particles shape to config

mafiusu opened this issue · 2 comments

Hello I want to display circle shapes with a size between 11 to 15px. Is it possible to do so?
I've tried it with the image array to pass 5 different images but it display very small particles too and not only the size I've set.

Hi @mafiusu,

You can achive this setting size options like this:

size: {
      value: 15, /* max value */
      random: { enable: true, minimumValue: 11 /* min value */ }
}

You can see a working sample here: https://codepen.io/matteobruni/pen/YzyZzGZ

@matteobruni cool it worked! Thank you. Didn't know that you can also pass an object for this key random.