var throwAndStop=e=>{throw console.log(e),new Error(e)};"undefined"==typeof p5&&throwAndStop("You must include p5js v1.4.0; see this contract's 'artCodeDependencies()' method.");const sunflowerIsDefined="undefined"!=typeof Sunflower,tokenDataIsDefined="undefined"!=typeof tokenData;var Helper;sunflowerIsDefined?Helper={...Sunflower}:tokenDataIsDefined&&(Helper={seed:tokenData.hash}),Helper?.seed||throwAndStop("To run, call 'seedForToken(...)' on this contract to get the seed. Then prefix this js code with 'tokenData = {hash: <seed>}', where <seed> is the seed as a string starting with '0x...'.");let cun,cw,ch,rs,ccount,lcount,bg,ashapes=[];function setup(){rs=Number(BigInt(Helper.seed)%BigInt("9007199254740991")),randomSeed(rs),noiseSeed(rs),angleMode(DEGREES),frameRate(28),ch=min(windowWidth,windowHeight),cw=.9*ch,cun=ch/1e3,createCanvas(cw,ch),bg=random(100)>95?"#000":"#fff",background(bg);let e=random(10,300),t=100===parseInt(random(100))?null:random(pal),s=parseInt(random(500))>498?0:1,a=random(500)>490;if(0===s)for(i=0;i<e;i++)ashapes.push(new Shape(0,createVector(random(cw),random(ch)),random(10,80)*cun,t,a));else for(i=0;i<e;i++)ashapes.push(new Shape(parseInt(random(100))>90?0:1,createVector(random(cw),random(ch)),random(10,80)*cun,t,a));Helper.setMetadata?.("Background",bg),Helper.setMetadata?.("Ease",a),Helper.setMetadata?.("Random Colors",!t),Helper.setMetadata?.("All Circles",1===s),Helper.setMetadata?.("Number of Shapes",e)}function draw(){clear(),background(bg);for(let e of ashapes)e.move()}function windowResized(){ch=min(windowWidth,windowHeight),cw=.9*ch,cun=ch/1e3,resizeCanvas(cw,ch),this.setup()}class Shape{constructor(e,t,s,i,a){this.st=e,this.p=t,this.r=s,this.pal=i,this.sw=cun*random(1,50),this.sw2=cun*random(5,15),this.bm=random([MULTIPLY,DIFFERENCE,LIGHTEST,DARKEST,ADD]),this.col=color(this.pal?random(this.pal):`#${parseInt(random(16777214)).toString(16)}`),this.counter=0,this.rm=random(-.5,.5),this.rm2=random(-.5,.5),this.beating=a,this.steps=parseInt(random(50,100)),this.setup()}setup(){1===this.st?(strokeWeight(this.sw),stroke(this.col),blendMode(this.bm),line(this.p.x,this.p.y,this.p.x+this.r,this.p.y+this.r)):(stroke(this.col),strokeWeight(this.sw2),blendMode(MULTIPLY),circle(this.p.x,this.p.y,this.r))}move(){this.beating?this.counter<this.steps?(this.counter++,this.p.x=this.p.x+this.rm,this.rm=this.rm/1.1,this.p.y=this.p.y+this.rm2,this.rm2=this.rm2/1.1,this.setup()):(this.counter=0,this.rm=random(-.5,.5),this.rm2=random(-.5,.5),this.p.x=this.p.x+this.rm,this.p.y=this.p.y+this.rm2,this.setup()):this.counter<this.steps?(this.counter++,this.p.x=this.p.x+this.rm,this.p.y=this.p.y+this.rm2,this.setup()):(this.counter=0,this.rm=random(-.5,.5),this.rm2=random(-.5,.5),this.p.x=this.p.x+this.rm,this.p.y=this.p.y+this.rm2,this.setup())}}const pal=[["#f9f3df","#fdfce5","#d7e9f7","#f4d19b"],["#212121","#323232","#0d7377","#14ffec"],["#f9fd50","#85ef47","#00bd56","#207dff"],["#851de0","#aa26da","#c355f5","#f1fa3c"],["#ffd5e5","#ffffdd","#a0ffe6","#81f5ff"],["#8c0000","#bd2000","#fa1e0e","#Ffbe0f"],["#ffe227","#eb596e","#4d375d","#121013"],["#f7fd04","#f9b208","#f98404","#fc5404"],["#f8f1f1","#a3d2ca","#5eaaa8","#db6400"],["#cdf0ea","#f9f9f9","#f6c6ea","#c490e4"],["#000000","#150050","#f8f0df","#610094"],["#52006a","#cd113b","#ff7600","#ffa900"],["#362222","#171010","#423f3e","#2b2b2b"],["#f1ecc3","#c9d8b6","#57837b","#515e63"],["#faad80","#ff6767","#ff3d68","#a73489"],["#64c9cf","#fde49c","#ffb740","#df711b"],["#fdefef","#f4dfd0","#dad0c2","#cdbba7"],["#e7e0c9","#c1cfc0","#6b7aa1","#11324d"],["#865439","#c68b59","#fcdec0","#8fc1d4"],["#79b4b7","#fefbf3","#f8f0df","#9d9d9d"]];[{"name":"p5@1.4.0","keccak256":"0xcef1df742d5237151854b6ccd3d7769c7bcb2cf987e4f8f6ca1ad69afdac3dcc"}]Curvy Dancers was developed as an appreciation project, free for Geometria Holders.
This project consists of randomly generated dancing figures similar to Geometria, but unique in its own way.
This project consists of randomly generated dancing figures similar to Geometria, but being also unique in its own way.
Every design and animation is completely unique and cannot be repeated.
Deployed on Sunflower Industries.