diff --git a/generative-art-opensource b/generative-art-opensource new file mode 160000 index 00000000..ed8a37d5 --- /dev/null +++ b/generative-art-opensource @@ -0,0 +1 @@ +Subproject commit ed8a37d5c4277c5011dd21152f5f4e1761060894 diff --git a/index.js b/index.js index 679e1270..b5c328e7 100644 --- a/index.js +++ b/index.js @@ -31,15 +31,9 @@ const signImage = (_sig) => { ctx.fillText(_sig, 40, 40); }; -// generate a random color hue -const genColor = () => { - let hue = Math.floor(Math.random() * 360); - let pastel = `hsl(${hue}, 100%, 85%)`; - return pastel; -}; - +// generate a random color hue inside method for better readability const drawBackground = () => { - ctx.fillStyle = genColor(); + ctx.fillStyle ='hsl(' + 360 * Math.random() + ', 100%, 85%)'; ctx.fillRect(0, 0, width, height); }; diff --git a/input/config.js b/input/config.js index aad063a7..b009949a 100644 --- a/input/config.js +++ b/input/config.js @@ -132,10 +132,11 @@ const editionDnaPrefix = 0 // create required weights // for each weight, call 'addRarity' with the id and from which to which element this rarity should be applied +// changed value of orginial rarity weight to 6 instead of 5 to reduce repepititve outcomes of outcomes between rare and original let rarityWeights = [ addRarity('super_rare', 1, 1), addRarity('rare', 2, 5), - addRarity('original', 5, 10) + addRarity('original', 6, 10) ]; // create required layers