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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Randomise the races.

jon5791 opened this issue · comments

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.

Forgot to mention I am using branch 4

Would also like to know a way to do this

commented

I'm also curious about this

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 :)

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?

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

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