0x9cb707b9…1c06sent to0x32d4be5e…f436·#16,676,463·view on Etherscan
var styles=`
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
overflow: hidden;
touch-action: none;
background: #252525;
}
main {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
canvas {
width: auto !important;
height: auto !important;
max-width: 100% !important;
max-height: 100% !important;
/* box-shadow: 0px 0px 40px #000000;*/
}
`,styleSheet=document.createElement("style");styleSheet.innerText=styles,document.head.appendChild(styleSheet);let particles=[],particles2=[],particles3=[],particles4=[],particles5=[],particles6=[],particles7=[],particles8=[],particles9=[],mult=.03,vec,vec2,vec3,vec4,vec5,vec6,vec7,vec8,vec9,hash=tokenData.hash,id=tokenData.tokenId;console.log(hash),console.log(id);let rSeed,nSeed,nSeed1,nSeed2,nSeed3,progress1,progress2,progress3,progress,rSeed1=12.49414,rSeed2=78.233,rSeed3=43758.5453123,strokesSc,blurSc,drawAngle,uSqr,stC,uRand,uRand2,speed,sek,counter=0,sw,flag1=!1,flag2=!1,flag3=!1,flag4=!1,bolBol=!1,colPic,colPic2,colPic3,yatayChooser,yataStr,bol1,bol2,bol3,fr,pg,blurBg,blurShader,c=0,c2=0,noiseRandom1,noiseRandom2,noiseRandom3,xoff1=0,xoff2=0,xoff3=0,uvChooser,uvChooser2,intensityC,roundnessC,angleC,radC,darkC,denC,sinC,max,wi,fbmShader,strokeShader,strokePg,fbmPg,uRoundness,uAngleC,shaderC,pgPg,dirR,randRan,dirCr,noiseC,soloChooser,rotateC,rotCh,angleC2,radC2,dirR2,col1,col2,col3,colV1,colV2,colV3,col1Smin,col1Smax,col2Smin,col2Smax,col3Smin,col3Smax,col1Bmin,col1Bmax,col2Bmin,col2Bmax,col3Bmin,col3Bmax,colV1Bmin,colV1Bmax,colV2Bmin,colV2Bmax,colV3Bmin,colV3Bmax,colV1Smin,colV1Smax,colV2Smin,colV2Smax,colV3Smin,colV3Smax,briMult,briMult2,uniRand1,uniRand2,fbmC,pix=2,kalCh,combinationC,combName,granPg,dirdir,fig,genel,stars=[],fvertexsh=`
attribute vec3 aPosition;
attribute vec2 aTexCoord;
varying vec2 vTexCoord;
void main() {
vTexCoord = aTexCoord;
vec4 positionVec4 = vec4(aPosition, 1.0);
positionVec4.xy = positionVec4.xy * 2.0 - 1.0;
gl_Position = positionVec4;
}`,ffragsh=`
precision mediump float;
#define PI 3.14159265359
varying vec2 vTexCoord;
uniform sampler2D uTexture0;
uniform float u_time;
uniform vec2 uResolution;
uniform float u_amp;
uniform float u_octave;
uniform float u_fbmAmp;
uniform float uvChooser;
uniform float u_intensity;
uniform float u_roundness;
uniform float u_angleC;
uniform float u_sqr;
uniform float u_darkC;
uniform float u_fbmC;
const float PHI = 1.61803398874989484820459;
const float SEED1 = 12.0;
const float SEED2 = 78.0;
const float SEED3 = 437.0;
float random (in vec2 st) {
return fract(sin(dot(st.xy,
vec2(SEED1,SEED2)))*SEED3);
}
float noise (in vec2 st) {
vec2 i = floor(st);
vec2 fu = fract(st);
float a = random(i);
float b = random(i + vec2(1.0, u_sqr));//1.0
float c = random(i + vec2(0.0, 1.0));
float d = random(i + vec2(1.0, 1.0));
vec2 u = fu * fu * (3.0 - 2.0 * fu);
return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) +(d - b) * u.x * u.y;
}
#define OCTAVES 24
float fbm (in vec2 st) {
float value = 0.0;
float amplitude = 0.2;//u_amp;//0.1,0.24
float frequency = 0.1;
for (int i = 0; i < OCTAVES; i++) {
value += amplitude * noise(st);
st *= u_octave;
amplitude *= .45;
}
return value;
}
float fbm6( in vec2 p )
{
vec2 q = vec2( fbm( p + vec2(0.0,0.0) ),
fbm( p + vec2(0.0,2.0) ) );
vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,3.0)),
fbm( p + 4.0*q + vec2(0.0,0.0)));
return fbm( p + 1.0 * r ); // 2.0, 6.0
}
void main() {
vec2 st = gl_FragCoord.xy/uResolution.xy;
vec2 uv = vTexCoord;
uv.y = 1.0 - uv.y;
vec2 texelSize = 1.0 / uResolution;
vec2 offset;
float scale = 0.1;
float offset2 = 0.1;
float angle;
angle = noise(st / uv * 0.2) * PI * 1.0;
float radius = offset2;
st *= scale;
offset = texelSize * vec2(0.0,0.0) - fbm6(uv) + 0.15;
vec4 color = vec4(0.0);
float div;
float mult = 1.0;
color += texture2D(uTexture0, uv + vec2(offset.x, offset.y));
if(u_fbmC < 0.65){
color += texture2D(uTexture0, uv + vec2(offset.x, offset.y) * 4.0);
mult = 2.0;
}
color += fbm(uv*2.0);
div = 1.1*mult;
color /= div;
color += vec4(0.0,-0.01,-0.02,0.0);
gl_FragColor = color;
}
`,bvertexsh=`
attribute vec3 aPosition;
attribute vec2 aTexCoord;
varying vec2 vTexCoord;
void main() {
vTexCoord = aTexCoord;
vec4 positionVec4 = vec4(aPosition, 1.0);
positionVec4.xy = positionVec4.xy * 2.0 - 1.0;
gl_Position = positionVec4;
}`,bfragsh=`
precision mediump float;
#define PI 3.14159265359
varying vec2 vTexCoord;
uniform sampler2D uTexture0;
uniform float u_time;
uniform vec2 uResolution;
uniform vec2 uScale;
uniform float u_rand;
uniform vec2 u_mouse;
uniform float u_blurSel1;
uniform float u_blurSel2;
uniform float uvChooser;
uniform float uvChooser2;
uniform float u_intensity;
uniform float u_roundness;
uniform float u_angleC;
uniform float u_radC;
uniform float u_darkC;
uniform float u_dirR;
uniform float u_noiseC;
uniform float u_blurSc;
uniform float u_random;
uniform float u_rSeed1;
uniform float u_rSeed2;
uniform float u_rSeed3;
uniform float u_angleC2;
uniform float u_radC2;
uniform float u_dirR2;
const float PHI = 1.61803398874989484820459;
const float SEED = 43758.0;
float random(in vec2 st)
{
return fract(tan(distance(st*PHI*1.0, st * PI*1.0)*SEED)*st.x);
}
float noise (in vec2 st) {
vec2 i = floor(st);
vec2 fu = fract(st);
float a = random(i);
float b = random(i + vec2(1.0, 0.0));
float c = random(i + vec2(0.0, 1.0));
float d = random(i + vec2(1.0, 1.0));
vec2 u = fu * fu * (3.0 - 2.0 * fu);
return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
}
void main() {
vec2 st = gl_FragCoord.xy/uResolution.xy;
vec2 uv = vTexCoord;
if(uvChooser > 0.60){
uv.y = 1.0 - uv.y;
}
vec2 texelSize = 1.0 / uResolution;
vec2 offset;
float scale = u_intensity;
float offset2 = u_roundness;
float angle;
if(u_angleC > 0.90){
angle = noise(st / uv * u_random) * PI * 1.0;
}else if(u_angleC > 0.65){
angle = noise(st + uv * u_random) * PI * 1.0;
}else if(u_angleC > 0.40){
angle = noise(st - uv * u_random) * PI * 1.0;
}else{
angle = noise(st / mod(uv, st) * u_random) * PI * 1.0;
}
float radius = offset2;
st *= scale;
if(u_radC > 0.90){
st *= radius * vec2(fract(angle * st.x), fract(angle / st.y));
}else if(u_radC > 0.70){
st *= radius * vec2(fract(angle / st.x), fract(angle / st.y));
}else if(u_radC > 0.45){
st *= radius * vec2(tan(angle * st.x), fract(angle / st.y));
}else if(u_radC > 0.25){
st *= radius * vec2(sin(angle * mod(st.x,st.y)), sin(angle / st.y *sin(st.x)));
}else{
st *= radius * noise(vec2(sin(angle), cos(angle)) / st * fract(uv));
}
if(u_radC2 < 0.50){
st *= radius * vec2(tan(angle/st.x) * cos(angle * st.x), sin(angle * st.y) + fract(st.y/angle));
}else{
}
vec4 color = vec4(0.0);
float div;
if(u_dirR > 0.90){
color += texture2D(uTexture0, uv + vec2(-st.y,st.x));//"Sağ"
}else if(u_dirR > 0.70){
color += texture2D(uTexture0, uv + vec2(-st.y,-st.x));//"Sağ2"
}else if(u_dirR > 0.65){
color += texture2D(uTexture0, uv + vec2(st.y,st.x));//"Norm"
}else if(u_dirR > 0.50){
color += texture2D(uTexture0, uv + vec2(st.y,-st.x));//"Norm2"
}else if(u_dirR > 0.30){
color += texture2D(uTexture0, uv + vec2(st.y*uv.y, st.x));//"SinsizUst"
}else{
color += texture2D(uTexture0, uv + vec2(st.x,uv.y));// "AlttanTarama"
}
color -= texture2D(uTexture0, uv + noise(vec2(st.x, st.y) / random(uv)));
div = 0.40;
color /= div;
color += vec4(0.12,0.12,0.12,1.0);
gl_FragColor = color;
}
`;function setup(){let e=16/9;createCanvas(1e3,1e3*e),pg=createGraphics(1e3,1e3*e),fbmPg=createGraphics(1e3,1e3*e,WEBGL),blurBg=createGraphics(1e3,1e3*e,WEBGL),granPg=createGraphics(1e3,1e3*e),fbmShader=fbmPg.createShader(fvertexsh,ffragsh),blurShader=blurBg.createShader(bvertexsh,bfragsh),pixelDensity(pix),colorMode(HSB,360,100,100,1),background(20,10,80),rectMode(CENTER),pg.pixelDensity(pix),pg.colorMode(HSB,360,100,100,1),pg.background(20,10,80),pg.rectMode(CENTER),blurBg.pixelDensity(pix),blurBg.colorMode(HSB,360,100,100,1),blurBg.background(20,10,80),blurBg.rectMode(CENTER),fbmPg.pixelDensity(pix),fbmPg.colorMode(HSB,360,100,100,1),fbmPg.background(20,10,80),fbmPg.rectMode(CENTER),granPg.pixelDensity(pix),granPg.colorMode(HSB,360,100,100,1),granPg.rectMode(CENTER);let $=new Random;rSeed=999999*$.random_dec(),nSeed=999999*$.random_dec(),nSeed1=1874915*$.random_dec(),nSeed2=158719*$.random_dec(),nSeed3=527915*$.random_dec(),randomSeed(rSeed),noiseSeed(nSeed);for(let t=0;t<13e3;t++)granPg.stroke(0,0,random(40,80),random(.7)),granPg.strokeWeight(random(.5)),granPg.point(random(width),random(height));colPic=random(1);let r=random(1);colPic>.6?r<.4?(col1=190,col2=10,col3=30):(col1=30,col2=190,col3=10):colPic>.2?(col1=220,col2=20,col3=180):(col1=20,col2=220,col3=180),briMult=1,briMult2=1,sw=1.5*map(pix,1,7,2,2.35),yatayChooser=random(1),shaderC=random(1),soloChooser=random(1),noiseRandom1=random(45,55),noiseRandom2=random(45,55),noiseRandom3=random(45,55),wi=random(15,20),drawAngle=random(1),colPic2=random(1),uvChooser=random([0,1,1]),uvChooser2=random([0,0,0,1]),rotCh=random([0,1,2,3,0,0]),randRan=random(1),denC=random(1),sinC=random(1),dirCr=random(1),uAmp=random(.15,.24),uOctave=random(2.1,5),uFbmAmp=random(1,4),uRoundness=random(1),uAngleC=random(1),uSqr=0,stC=random(1),uRand=random(1),uRand2=random(1),rotateC=random(1),strokesSc=random([.5,1,1]),blurSc=random([.5,1,1]),uniRand1=round(random(.2,.4),2),uniRand2=round(random(.1,.4),2),fbmC=random(1),noiseC=1,kalCh=random(1),angleC=random(1),radC=random(1),dirR=random(1),angleC2=random(1),radC2=random(1),dirR2=random(1),intensityC=round(random(.1,2),4),roundnessC=round(random(.05,.16),4),"Eye"==(combName=(combinationC=random(1))>.93?"Eye":combinationC>.8?"LeftEye":combinationC>.7?"LightSaber":combinationC>.64?"AltSaber":combinationC>.55?"Relief":combinationC>.51?"Fractured":combinationC>.47?"BigBend":combinationC>.35?"Tim":combinationC>.28?"Mag":combinationC>.2?"Tim2":combinationC>.1?"RectDrift":"Rect")&&(angleC=.66,radC=.46,dirR=0,radC2=1,intensityC=round(random(.9,1.35),4),roundnessC=round(random(.05,.22),4),soloChooser=random([1,1,0]),kalCh=random([0,0,1,1,0]),0==soloChooser&&1==kalCh&&(drawAngle=1,sinC=1),uvChooser=1,yatayChooser=0,fbmC=0),"LeftEye"==combName&&(angleC=.41,radC=.46,dirR=0,radC2=random([1,1,0]),intensityC=round(random(1,1.75),4),roundnessC=round(random(.05,.22),4),soloChooser=random([1,1,0,1]),kalCh=random([0,0,1]),0==soloChooser&&1==kalCh&&(drawAngle=1,sinC=1),intensityC=1,yatayChooser=0,fbmC=0),"LightSaber"==combName&&(angleC=.66,radC=.46,dirR=0,radC2=1,intensityC=round(random(.1,.4),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,fbmC=random([0,0,1])),"AltSaber"==combName&&(angleC=.66,radC=.95,dirR=0,radC2=1,intensityC=round(random(.1,2),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,fbmC=random([0,0,1])),"Relief"==combName&&(angleC=.41,radC=random([.26,.56,.96]),radC2=0,dirR=0,intensityC=round(random(1.8,2),4),roundnessC=round(random(.11,.16),4),uniRand1=.3,yatayChooser=0,soloChooser=random([1,0,1]),kalCh=0,uvChooser=random([0,1]),fbmC=0),"Fractured"==combName&&(angleC=.41,radC=.26,dirR=random([0,0,.71,0]),radC2=1,intensityC=round(random(1.5,2),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,uvChooser=0,fbmC=0),"BigBend"==combName&&(angleC=.66,radC=.46,dirR=random([.91,.51,.66,.71]),radC2=random([1,1,0]),intensityC=round(random(.7,1.2),4),roundnessC=round(random(.05,.14),4),yatayChooser=1,shaderC=0,fbmC=0),"Tim"==combName&&(angleC=.41,radC=.46,dirR=.71,radC2=1,intensityC=round(random(1.5,2),4),roundnessC=round(random(.05,.14),4),uvChooser=random([0,0,1]),yatayChooser=0,0==(soloChooser=random([0,1,1]))&&(kalCh=0),fbmC=random([0,0,1])),"Mag"==combName&&(angleC=.41,radC=.46,dirR=.71,radC2=1,intensityC=round(random(.8,1.1),4),roundnessC=round(random(.1,.16),4),yatayChooser=0,soloChooser=random([1,1,0]),kalCh=random([0,0,1]),0==soloChooser&&1==kalCh&&(drawAngle=1,sinC=1),uvChooser=0,fbmC=random([0,1])),"Tim2"==combName&&(angleC=.66,radC=.46,dirR=.51,radC2=1,intensityC=round(random(1,1.5),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,uvChooser=0,soloChooser=1,fbmC=0),"RectDrift"==combName&&(angleC=.91,radC=.46,dirR=0,radC2=random([0,1,1]),intensityC=round(random(1.5,2),4),roundnessC=round(random(.05,.16),4),0==(uvChooser=random([0,1,1,0]))&&(yatayChooser=random([0,1,0])),1==uvChooser&&(yatayChooser=random([0,1,0]),rotCh=0),1==yatayChooser&&(shaderC=0,fbmC=0,kalCh=1),fbmC=0),"Rect"==combName&&(angleC=.91,radC=.46,dirR=.71,radC2=1,intensityC=round(random(1.5,3.2),4),roundnessC=round(random(.05,.16),4),yatayChooser=0,uvChooser=0,fbmC=0),shaderC="fbm",yataStr=0==yatayChooser?"ver":"hor",darkC=0,soloChooser<.5?(soloChooser="Solo","hor"==yataStr&&(soloChooser="Triplet")):soloChooser="Triplet",max=drawAngle<.8?random(.1,.3):PI/2,placements(),console.log(combName);for(var o=0;o<1800;o++){let l=random(1);stars[o]=new Star(l)}}function draw(){noStroke(),pg.noStroke();let e,$,t;frameRate(60),"ver"==yataStr&&(sek=0),"hor"==yataStr&&(sek=-PI/2),sinC<.7?(noiseSeed(nSeed1),e=map(noise(xoff1/noiseRandom1,frameCount/noiseRandom1/1),0,1,-max,max),noiseSeed(nSeed2),$=map(noise(xoff1/noiseRandom2,frameCount/noiseRandom2/1),0,1,-max,max),noiseSeed(nSeed3),t=map(noise(xoff1/noiseRandom3,frameCount/noiseRandom3/1),0,1,-max,max)):(noiseSeed(nSeed1),e=map(sin(frameCount/50),-1,1,-max,max),noiseSeed(nSeed2),$=map(sin(frameCount/75),-1,1,-max,max),noiseSeed(nSeed3),t=map(sin(frameCount/noiseRandom3),-1,1,-max,max)),xoff1+=.1,xoff2+=.2,xoff3+=.3;let r=e,o=e,l=e,a=$,s=$,i=$,_=t,n=t,u=t;counter+=1,noiseSeed(nSeed1);let f=2.5*map(noise(frameCount/(1e3/random(.8,1.1))/.5),0,1,.1,.7),d=2.5*map(noise(frameCount/(1050/random(.9,1.2))/.5),0,1,.1,.7),m=2.5*map(noise(frameCount/(950/random(.8,1.2))/.5),0,1,.1,.7);noiseSeed(nSeed2);let p=2.5*map(noise(frameCount/(950/random(.9,1.2))/.5),0,1,.1,.7),C=2.5*map(noise(frameCount/(1050/random(.8,1.2))/.5),0,1,.1,.7),h=2.5*map(noise(frameCount/(1e3/random(.8,1.1))/.5),0,1,.1,.7);noiseSeed(nSeed3);let g=2.5*map(noise(frameCount/(1050/random(.9,1.2))/.5),0,1,.1,.7),v=2.5*map(noise(frameCount/(1e3/random(.8,1.2))/.5),0,1,.1,.7),b=2.5*map(noise(frameCount/(950/random(.8,1.1))/.5),0,1,.1,.7);noiseSeed(nSeed),pg.push();for(let y=0;y<particles.length;y+=1){let x=map(sin(particles[y].y*mult/particles[y].x*mult),0,1,-sek,sek),S=map(sin(particles2[y].y*mult/particles2[y].x*mult),0,1,-sek,sek),w=map(sin(particles3[y].y*mult/particles3[y].x*mult),0,1,-sek,sek);x+=r,S+=o,w+=l,vec=createVector(sin(1*x),cos(x)),vec2=createVector(sin(1*S),cos(S)),vec3=createVector(sin(1*w),cos(w)),vec.setMag(f*(sw/2)),vec2.setMag(d*(sw/2)),vec3.setMag(m*(sw/2)),particles[y].add(vec),particles2[y].add(vec2),particles3[y].add(vec3);let R=map(noise(particles[y].x*mult,particles[y].y*mult*100,frameCount*mult*20),0,1,0,1),k=map(noise(particles2[y].x*mult,particles2[y].y*mult*92,frameCount*mult*20),0,1,0,1),P=map(noise(particles3[y].x*mult,particles3[y].y*mult*92,frameCount*mult*20),0,1,0,1);if("ver"==yataStr&&(bol1=particles[y].y<height&&particles[y].y>0,bol2=particles2[y].y<height&&particles2[y].y>0,bol3=particles3[y].y<height&&particles3[y].y>0),"hor"==yataStr&&(bol1=particles[y].x<width&&particles[y].x>0,bol2=particles2[y].x<width&&particles2[y].x>0,bol3=particles3[y].x<width&&particles3[y].x>0),bol1&&(pg.fill(col1,random(60,80),random(30,50)*briMult,R),pg.ellipse(particles[y].x+5*R*random(-1,1),particles[y].y,sw)),bol2&&(pg.fill(col2,random(10,40)*briMult,random(5,20)*briMult2,k),pg.ellipse(particles2[y].x,particles2[y].y,sw)),bol3&&(pg.fill(col3,random(60,80),random(40,80),P),"ver"==yataStr&&particles3[y].y>=height-5&&(flag1=!0,fr=frameCount),"hor"==yataStr&&particles3[y].x>=width-5&&(flag1=!0,fr=frameCount),pg.ellipse(particles3[y].x,particles3[y].y,1*sw)),0==yatayChooser){let T=min(particles[y].y,particles2[y].y),U=min(particles2[y].y,particles3[y].y);progress=min(T,U)}else{let B=min(particles[y].x,particles2[y].x),M=min(particles2[y].x,particles3[y].x);progress=min(B,M)}}if("Triplet"==soloChooser){for(let D=0;D<particles4.length;D+=1){let V=map(sin(particles4[D].y*mult/particles4[D].x*mult),0,1,-sek,sek),A=map(sin(particles5[D].y*mult/particles5[D].x*mult),0,1,-sek,sek),E=map(sin(particles6[D].y*mult/particles6[D].x*mult),0,1,-sek,sek);V+=a,A+=s,E+=i,vec4=createVector(sin(1*V),cos(V)),vec5=createVector(sin(1*A),cos(A)),vec6=createVector(sin(1*E),cos(E)),vec4.setMag(p*(sw/2)),vec5.setMag(C*(sw/2)),vec6.setMag(h*(sw/2)),particles4[D].add(vec4),particles5[D].add(vec5),particles6[D].add(vec6);let z=map(noise(particles4[D].x*mult,particles4[D].y*mult*100,frameCount*mult*20),0,1,0,1),N=map(noise(particles5[D].x*mult,particles5[D].y*mult*92,frameCount*mult*20),0,1,0,1),I=map(noise(particles6[D].x*mult,particles6[D].y*mult*92,frameCount*mult*20),0,1,0,1);if("ver"==yataStr&&(bol1=particles4[D].y<height&&particles4[D].y>0,bol2=particles5[D].y<height&&particles5[D].y>0,bol3=particles6[D].y<height&&particles6[D].y>0),"hor"==yataStr&&(bol1=particles4[D].x<width&&particles4[D].x>0,bol2=particles5[D].x<width&&particles5[D].x>0,bol3=particles6[D].x<width&&particles6[D].x>0),bol1&&(pg.fill(col1,random(60,80),random(30,50)*briMult,z),pg.ellipse(particles4[D].x+5*z*random(-1,1),particles4[D].y,sw)),bol2&&(pg.fill(col2,random(10,40)*briMult,random(5,20)*briMult2,N),pg.ellipse(particles5[D].x,particles5[D].y,sw)),bol3&&(pg.fill(col3,random(60,80),random(40,80),I),"ver"==yataStr&&particles6[D].y>=height-5&&(flag2=!0,fr=frameCount),"hor"==yataStr&&particles6[D].x>=width-5&&(flag2=!0,fr=frameCount),pg.ellipse(particles6[D].x,particles6[D].y,1*sw)),0==yatayChooser){let q=min(particles4[D].y,particles5[D].y);progress2=min(q,particles6[D].y)}else{let F=min(particles4[D].x,particles5[D].x);progress2=min(F,particles6[D].x)}}for(let L=0;L<particles7.length;L+=1){let H=map(sin(particles7[L].y*mult/particles7[L].x*mult),0,1,-sek,sek),O=map(sin(particles8[L].y*mult/particles8[L].x*mult),0,1,-sek,sek),j=map(sin(particles9[L].y*mult/particles9[L].x*mult),0,1,-sek,sek);H+=_,O+=n,j+=u,vec7=createVector(sin(1*H),cos(H)),vec8=createVector(sin(1*O),cos(O)),vec9=createVector(sin(1*j),cos(j)),vec7.setMag(g*(sw/2)),vec8.setMag(v*(sw/2)),vec9.setMag(b*(sw/2)),particles7[L].add(vec7),particles8[L].add(vec8),particles9[L].add(vec9);let G=map(noise(particles7[L].x*mult,particles7[L].y*mult*100,frameCount*mult*20),0,1,0,1),W=map(noise(particles8[L].x*mult,particles8[L].y*mult*92,frameCount*mult*20),0,1,0,1),J=map(noise(particles9[L].x*mult,particles9[L].y*mult*92,frameCount*mult*20),0,1,0,1);if("ver"==yataStr&&(bol1=particles7[L].y<height&&particles7[L].y>0,bol2=particles8[L].y<height&&particles8[L].y>0,bol3=particles9[L].y<height&&particles9[L].y>0),"hor"==yataStr&&(bol1=particles7[L].x<width&&particles7[L].x>0,bol2=particles8[L].x<width&&particles8[L].x>0,bol3=particles9[L].x<width&&particles9[L].x>0),bol1&&(pg.fill(col1,random(60,80),random(30,50)*briMult,G),pg.ellipse(particles7[L].x+5*G*random(-1,1),particles7[L].y,sw)),bol2&&(pg.fill(col2,random(10,40)*briMult,random(5,20)*briMult2,W),pg.ellipse(particles8[L].x,particles8[L].y,sw)),bol3&&(pg.fill(col3,random(60,80),random(40,80),J),"ver"==yataStr&&particles9[L].y>=height-5&&(flag3=!0,fr=frameCount),"hor"==yataStr&&particles9[L].x>=width-5&&(flag3=!0,fr=frameCount),pg.ellipse(particles9[L].x,particles9[L].y,1*sw)),0==yatayChooser){let K=min(particles7[L].y,particles8[L].y);progress3=min(K,particles9[L].y)}else{let Q=min(particles7[L].x,particles8[L].x);progress3=min(Q,particles9[L].x)}}}if(pg.pop(),push(),background(0,0,10,.5),"Triplet"==soloChooser){let X=min(progress,progress2);progress=min(X,progress3)}let Y;Y=0==yatayChooser?height:width;let Z=floor(map(progress,0,Y,0,100));fill(0,0,80),noStroke(),textSize(25),textAlign(CENTER,CENTER),text("%"+Z,width/2,height/2),speed=progress/50,translate(width/2,height/2);for(var ee=0;ee<stars.length;ee++)stars[ee].update(),stars[ee].show();if(translate(-width/2,-height/2),image(granPg,0,0),pop(),bolBol="Triplet"==soloChooser?flag1&&flag2&&flag3:flag1){fbmShader.setUniform("uTexture0",pg),fbmShader.setUniform("u_time",millis()/1e3),fbmShader.setUniform("u_middle",[mouseX,mouseY]),fbmShader.setUniform("u_amp",uAmp),fbmShader.setUniform("uResolution",[width,height]),fbmShader.setUniform("uPla",[width,height]),fbmShader.setUniform("u_octave",uOctave),fbmShader.setUniform("u_fbmAmp",uFbmAmp),fbmShader.setUniform("u_roundness",uRoundness),fbmShader.setUniform("u_angleC",uAngleC),fbmShader.setUniform("u_sqr",uSqr),fbmShader.setUniform("u_fbmC",fbmC),fbmPg.noStroke(),fbmPg.shader(fbmShader),fbmPg.rect(0,0,width,height),frameRate(1);for(let e$=0;e$<125;e$++){let et=random(1);et>.66?pg.fill(col3,random(60,80)/1,random(40,80),1):et>.33?pg.fill(col2,random(10,40)/1,random(0,20),1):pg.fill(col1,random(60,80)/1,random(30,50),1),el(random(width),random(height),randomGaussian(2,7),e$)}(c+=1)>2&&(flag4=!0,frameRate(60))}if(flag4&&(blurShader.setUniform("uTexture0",fbmPg),blurShader.setUniform("u_time",millis()/1e3),blurShader.setUniform("uScale",[4,4]),blurShader.setUniform("u_middle",[mouseX,mouseY]),blurShader.setUniform("u_rand",random(0,2)),blurShader.setUniform("uResolution",[width,height]),blurShader.setUniform("uPla",[width,height]),blurShader.setUniform("uvChooser",uvChooser),blurShader.setUniform("uvChooser2",uvChooser2),blurShader.setUniform("u_intensity",intensityC),blurShader.setUniform("u_roundness",roundnessC),blurShader.setUniform("u_angleC",angleC),blurShader.setUniform("u_radC",radC),blurShader.setUniform("u_darkC",darkC),blurShader.setUniform("u_dirR",dirR),blurShader.setUniform("u_noiseC",noiseC),blurShader.setUniform("u_blurSc",blurSc),blurShader.setUniform("u_random",uniRand1),blurShader.setUniform("u_rSeed1",rSeed1),blurShader.setUniform("u_rSeed2",rSeed2),blurShader.setUniform("u_rSeed3",rSeed3),blurShader.setUniform("u_angleC2",angleC2),blurShader.setUniform("u_radC2",radC2),blurShader.setUniform("u_dirR2",dirR2),blurBg.noStroke(),blurBg.shader(blurShader),blurBg.rect(0,0,width,height),push(),0==rotCh?(translate(0,0),scale(1,1)):1==rotCh?(translate(width,0),scale(-1,1)):2==rotCh?(translate(width,height),scale(-1,-1)):3==rotCh&&(translate(0,height),scale(1,-1)),image(blurBg,0,0),pop(),(c2+=1)>2)){for(let er=0;er<150;er++){let eo=random(1);eo>.66?fill(col3,random(60,80)/2,random(40,80),1):eo>.33?fill(col2,random(10,40)/2,random(0,20),1):fill(col1,random(60,80)/2,random(30,50),1),elN(random(width),random(height),random(2,7),er)}granulate(25),frame(),noLoop()}}function frame(){push(),rectMode(CORNER),fill(0,0,87),beginShape(),vertex(0,0);for(let e=0;e<width/wi;e++)vertex(e*wi+random(-wi/10,wi/10),wi+random(-wi/10,wi/10));vertex(width,wi),vertex(width,0),endShape(),beginShape(),vertex(0,0);for(let $=0;$<height/wi;$++)vertex(wi+random(-wi/10,wi/10),$*wi+random(-wi/10,wi/10));vertex(wi,height),vertex(0,height),endShape(),beginShape(),vertex(0,height-wi);for(let t=0;t<width/wi;t++)vertex(t*wi+random(-wi/10,wi/10),height-wi+random(-wi/10,wi/10));vertex(width,height),vertex(0,height),endShape(),beginShape(),vertex(width-wi,0);for(let r=0;r<height/wi;r++)vertex(width-wi+random(-wi/10,wi/10),r*wi+random(-wi/10,wi/10));vertex(width,height),vertex(width,0),endShape(),pop()}function el(e,$,t,r){pg.beginShape();for(let o=0;o<TAU;o+=PI/60){let l=map(noise(1*o,1*r),0,1,0,7),a=e+cos(o)*t/1.5+l,s=$+sin(o)*t/1.5+l;pg.vertex(a,s)}pg.endShape(CLOSE)}function elN(e,$,t,r){beginShape();for(let o=0;o<TAU;o+=PI/60){let l=map(noise(1*o,1*r),0,1,0,7),a=e+cos(o)*t/1.5+l,s=$+sin(o)*t/1.5+l;vertex(a,s)}endShape(CLOSE)}function placements(){if("ver"==yataStr){let e=random([200,100,100,200,500]),$=200,t=400,r=200,o=700;"Solo"==soloChooser&&(kalCh<.25?(t=200,r=600):(t=400,r=200));let l=2-e/5,a=2-e/5,s=2-e/5;for(let i=t;i<t+r;i+=2){let _=l+noise(.04*i,.02*frameCount)*e,n=createVector(i,_);particles.push(n)}for(let u=t;u<t+r;u+=2){let f=l+noise(.08*u,.03*frameCount)*e,d=createVector(u,f);particles2.push(d)}for(let m=t;m<t+r;m+=2){let p=l+noise(.038*m,.01*frameCount)*e,C=createVector(m,p);particles3.push(C)}for(let h=$;h<$+100;h+=2){let g=a+noise(.034*h,.097*frameCount)*e,v=createVector(h,g);particles4.push(v)}for(let b=$;b<$+100;b+=2){let y=a+noise(.045*b,.034*frameCount)*e,x=createVector(b,y);particles5.push(x)}for(let S=$;S<$+100;S+=2){let w=a+noise(.042*S,.046*frameCount)*e,R=createVector(S,w);particles6.push(R)}for(let k=o;k<o+100;k+=2){let P=s+noise(.04*k,.02*frameCount)*e,T=createVector(k,P);particles7.push(T)}for(let U=o;U<o+100;U+=2){let B=s+noise(.027*U,.067*frameCount)*e,M=createVector(U,B);particles8.push(M)}for(let D=o;D<o+100;D+=2){let V=s+noise(.045*D,.08*frameCount)*e,A=createVector(D,V);particles9.push(A)}}if("hor"==yataStr){let E=random([200,100,100,200,500]),z=200,N=400,I=200,q=700,F=1e3,L=1200,H=1500;kalCh<.2?(N=200,I=600,L=976):(N=400,I=200,L=1200);for(let O=N;O<N+I;O+=2){let j=5+noise(.04*O,.02*frameCount)*E,G=createVector(j,O);particles.push(G)}for(let W=N;W<N+I;W+=2){let J=5+noise(.08*W,.03*frameCount)*E,K=createVector(J,W);particles2.push(K)}for(let Q=N;Q<N+I;Q+=2){let X=5+noise(.038*Q,.08*frameCount)*E,Y=createVector(X,Q);particles3.push(Y)}for(let Z=z;Z<z+100;Z+=2){let ee=5+noise(.04*Z,.02*frameCount)*E,e$=createVector(ee,Z);particles4.push(e$)}for(let et=z;et<z+100;et+=2){let er=5+noise(.08*et,.03*frameCount)*E,eo=createVector(er,et);particles5.push(eo)}for(let ea=z;ea<z+100;ea+=2){let es=5+noise(.038*ea,.08*frameCount)*E,ei=createVector(es,ea);particles6.push(ei)}for(let e_=q;e_<q+100;e_+=2){let en=5+noise(.04*e_,.02*frameCount)*E,ec=createVector(en,e_);particles7.push(ec)}for(let eu=q;eu<q+100;eu+=2){let e0=5+noise(.08*eu,.03*frameCount)*E,ef=createVector(e0,eu);particles8.push(ef)}for(let ed=q;ed<q+100;ed+=2){let em=5+noise(.038*ed,.08*frameCount)*E,ep=createVector(em,ed);particles9.push(ep)}for(let eC=L;eC<L+I;eC+=2){let eh=5+noise(.04*eC,.02*frameCount)*E,eg=createVector(eh,eC);particles.push(eg)}for(let ev=L;ev<L+I;ev+=2){let eb=5+noise(.08*ev,.03*frameCount)*E,ey=createVector(eb,ev);particles2.push(ey)}for(let ex=L;ex<L+I;ex+=2){let e3=5+noise(.038*ex,.08*frameCount)*E,e2=createVector(e3,ex);particles3.push(e2)}for(let eS=F;eS<F+100;eS+=2){let e1=5+noise(.04*eS,.02*frameCount)*E,e4=createVector(e1,eS);particles4.push(e4)}for(let e6=F;e6<F+100;e6+=2){let e8=5+noise(.08*e6,.03*frameCount)*E,e7=createVector(e8,e6);particles5.push(e7)}for(let ew=F;ew<F+100;ew+=2){let eR=5+noise(.038*ew,.08*frameCount)*E,e5=createVector(eR,ew);particles6.push(e5)}for(let ek=H;ek<H+100;ek+=2){let eP=5+noise(.04*ek,.02*frameCount)*E+10,eT=createVector(eP,ek);particles7.push(eT)}for(let eU=H;eU<H+100;eU+=2){let eB=5+noise(.08*eU,.03*frameCount)*E+10,eM=createVector(eB,eU);particles8.push(eM)}for(let eD=H;eD<H+100;eD+=2){let eV=5+noise(.038*eD,.08*frameCount)*E+10,eA=createVector(eV,eD);particles9.push(eA)}}}function granulate(e){loadPixels();let $=pixelDensity(),t=4*(width*$)*(height*$);for(let r=0;r<t;r+=4){let o=random(-e,e);pixels[r]=pixels[r]+o,pixels[r+1]=pixels[r+1]+o,pixels[r+2]=pixels[r+2]+o}updatePixels()}function granulateGran(e){granPg.loadPixels();let $=pixelDensity(),t=4*(width*$)*(height*$);for(let r=0;r<t;r+=4){let o=random(-e,e);pixels[r]=pixels[r]+o,pixels[r+1]=pixels[r+1]+o,pixels[r+2]=pixels[r+2]+o}granPg.updatePixels()}function keyPressed(){("s"==key||"S"==key)&&saveCanvas("DistCollective_SpatialCurvatures","png")}class Random{constructor(){this.useA=!1;let e=function(e){let $=parseInt(e.substr(0,8),16),t=parseInt(e.substr(8,8),16),r=parseInt(e.substr(16,8),16),o=parseInt(e.substr(24,8),16);return function(){r|=0;let e=(($|=0)+(t|=0)|0)+(o|=0)|0;return o=o+1|0,$=t^t>>>9,t=r+(r<<3)|0,r=(r=r<<21|r>>>11)+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let $=0;$<1e6;$+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}}class Star{constructor(e){this.x=random(-width,width),this.y=random(-height,height),this.z=random(width),this.pz=this.z,this.co=e}update(){this.z=this.z-speed,this.z<1&&(this.z=width,this.x=random(-width,width),this.y=random(-height,height),this.pz=this.z)}show(){this.co>.66?fill(col3,random(60,80)/1,random(40,80),1):this.co>.33?fill(col2,random(10,40)/1,random(50,60),1):fill(col1,random(60,80)/1,random(30,50),1),noStroke();var e=map(this.x/this.z,0,1,0,width),$=map(this.y/this.z,0,1,0,height),t=map(this.z,0,width,16,0);ellipse(e,$,t,t);var r=map(this.x/this.pz,0,1,0,width),o=map(this.y/this.pz,0,1,0,height);this.pz=this.z,this.co>.66?stroke(col3,random(60,80)/1,random(40,80),1):this.co>.33?stroke(col2,random(10,40)/1,random(50,60),1):stroke(col1,random(60,80)/1,random(30,50),1),line(r,o,e,$)}}