HashLips / generative-art-opensource

Create generative art by using the canvas api and node js, feel free to contribute to this repo with new ideas.
MIT License
1.36k stars 693 forks source link

Randomise the races. #141

Open jon5791 opened 3 years ago

jon5791 commented 3 years ago

Is there a way to randomise the races so it doesn't do them all in a row. I don't want to have 1 - 1000 be only one race and then have 1001 - 2000 be the next race.

jon5791 commented 3 years ago

Forgot to mention I am using branch 4

NetworkEntity commented 3 years ago

Would also like to know a way to do this

s-d-sd commented 3 years ago

I'm also curious about this

tdr357 commented 3 years ago

const getRace = (_editionCount) => { let race = "No Race"; if (Math.random() > 0.3) { race = "HumanMale" } else { race = "HumanFemale" } return race; };

PS: If you have code to stop overlapping layers eg: IF Mask THEN No CIG. I'd appreciate some help in return! The code i've supplied will be placed in Index.js :)

jon5791 commented 3 years ago

const getRace = (_editionCount) => { let race = "No Race"; if (Math.random() > 0.3) { race = "HumanMale" } else { race = "HumanFemale" } return race; };

PS: If you have code to stop overlapping layers eg: IF Mask THEN No CIG. I'd appreciate some help in return! The code i've supplied will be placed in Index.js :)

Not sure why you are getting layers overlapping have you changed the original code on layer building?

tdr357 commented 3 years ago

No, have you got a link to the video, might of missed that. I want an IF statement which cancels layer building if a mask is supplied first

tdr357 commented 3 years ago

const getRace = (_editionCount) => { let race = "No Race"; if (Math.random() > 0.3) { race = "HumanMale" } else { race = "HumanFemale" } return race; }; PS: If you have code to stop overlapping layers eg: IF Mask THEN No CIG. I'd appreciate some help in return! The code i've supplied will be placed in Index.js :)

Not sure why you are getting layers overlapping have you changed the original code on layer building?

read above brotha