Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add random greyscale color feature #26

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jamjar919
Copy link

This pull req adds a new feature - The ability to have the script generate random greyscale colors for the strokes. Here's a demo.

The behaviour is controlled with the randomStrokeColor flag in options, by default set to false. When the flag is set to true, each particle is assigned a random color, picked from the range #000 - #FFF. The range of colors can be selected by setting the strokeColorMin and strokeColorMax options to numbers between 0 and 15, where 0 = #000 and 15 = #FFF.

I've also updated the readme to include more information but haven't updated the min file as I am unsure how you have split the code up.

Adds a feature where you can enable the `randomStrokeColor: true` option in the options array. This will assign each particle a random stroke colour that it will draw connections with. Demo [here](http://thejamespaterson.com/scripts/particlegroundrandom/)
Adds the docs for the random stroke color feature.
Change to include new code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant