Add traits
To add traits to your collection, edit the window.$generativeTraits variable in the index.html
file.
You can also set rarity
for each trait as in the sample code below.
function Trait0(rand) {
if (rand > 0.5) {
return true;
} else {
return false
}
}
function Trait1(rand) {
if (rand > 0.1) {
return true;
} else {
return false
}
}
window.$generativeTraits = {
"Trait0": Trait0(rand),
"Trait1": Trait1(rand)
}
Last updated