0x9cb707b9…1c06sent to0x99a9b7c1…b069·#18,243,717·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 hash=tokenData.hash,id=tokenData.tokenId;console.log("hash: "+hash),console.log("id: "+id);let rad,offset=0,blurShader,pix=2,w=1500,angle,tick,sunX1,sunX2,sunY1,sunY2,sunRad1,sunRad2,sunS1,sunH2,sunB1,sunB2,sunH1,sunS2,uRadC2,randomCanvas,uRandStr,uMult,ar,swirlShader,swW,shapeC,dir,h1,h2,uDir1,uDir2,uScale,spaBuf,spaShader,uSc,uRound,radMult,compNames,tanC,tanC2,rotCh,rotChY,seedChooser,nSeed,rSeed,asChooser,asBool,prm,uPi=1,theVertex=`
#ifdef GL_ES
precision highp float;
#endif
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;
}
`,blurFrag=`
precision highp float;
#define PI 3.14159265359
varying vec2 vTexCoord;
uniform sampler2D uTexture0;
uniform vec2 uResolution;
uniform float u_amp;
uniform float u_octave;
uniform float u_fbmAmp;
uniform float u_roundness;
uniform float u_angleC;
uniform float u_dir1;
uniform float u_dir2;
uniform float u_randStr;
uniform float u_mult;
uniform sampler2D randomTex;
uniform float u_scale;
const float PHI = 1.61803398874989484820459;
const float SEED = 43758.0;
vec3 rgb2hsv(vec3 c) {
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float random(vec2 co){
return texture2D(randomTex, mod(co.xy/0.7,0.2) * PI).y;
}
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;
}
#define OCTAVES 12
float fbm (in vec2 st) {
float value = 0.0;
float amplitude = u_amp;
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,u_roundness) ),
fbm( p + vec2(u_dir1,2.0) ) );
vec2 r = vec2( fbm( p + 4.0*q + vec2(4.0,u_dir2)),
fbm( p + 4.0*q + vec2(u_angleC * 4.0,0.0)));
return fbm( p + u_fbmAmp * r );
}
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 = u_scale;
float offset2 = 0.1;
float angle;
angle = noise(st + uv * 0.2) * PI * 2.0;
float radius = offset2;
st *= scale;
st *= radius * vec2(fract(angle * st.x), fract(angle / st.y)) + random(uv/1.0)/u_randStr;
offset = texelSize * vec2(40.0,40.0) - fbm6(uv) + 0.18;
vec4 color = vec4(0.0);
float div;
float mult = u_mult;
color -= texture2D(uTexture0, uv + vec2(offset.y, st.y)*mult);
color += texture2D(uTexture0, uv + vec2(-offset.y, st.y)*mult);
color += texture2D(uTexture0, uv + vec2(-offset.x, st.x)*mult);
color -= texture2D(uTexture0, uv + vec2(offset.x, st.x)*mult);
color += texture2D(uTexture0, uv + vec2(offset.y, -st.y)*mult);
color += texture2D(uTexture0, uv + vec2(-offset.y, -st.y)*mult);
color += texture2D(uTexture0, uv + vec2(-offset.x, -st.x)*mult);
color += texture2D(uTexture0, uv + vec2(offset.x, -st.x)*mult);
vec3 hsv = rgb2hsv(color.rgb);
hsv.y *= 1.4;
color.rgb = hsv2rgb(hsv);
color.rgb = ((color.rgb - vec3(0.5)) * 1.1 + vec3(0.5));
div = 2.5;
color /= div;
gl_FragColor = color;
}
`,spaFrag=`
#ifdef GL_ES
precision highp float;
#endif
#define PI 3.14159265359
const float PHI = 1.61803398874989484820459;
const float SEED = 43758.0;
varying vec2 vTexCoord;
uniform sampler2D randomTex;
uniform vec2 resolution;
uniform sampler2D img;
uniform float u_angleC;
uniform float u_radC;
uniform float u_dirR;
uniform float uScale;
uniform float uRound;
uniform float u_radC2;
uniform float u_tanC;
uniform float utime;
uniform float u_tanC2;
uniform float uPi;
float random(in vec2 co)
{return texture2D(randomTex, mod(co.xy/0.7,0.2) * PI).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/resolution.xy;
vec2 uv = vTexCoord;
uv.y = 1.0 - uv.y;
vec2 texelSize = 1.0 / resolution;
vec2 offset;
float scale = uScale;
float offset2 = uRound;
float angle;
if(u_angleC > 0.75){
angle = noise(st / uv * 0.2) * PI * uPi;
}else if(u_angleC > 0.50){
angle = noise(st * uv * 0.2) * PI * uPi;
}else if(u_angleC > 0.25){
angle = noise(st - uv * 0.2) * PI * uPi;
}else{
angle = noise(st + uv * 0.2) * PI * uPi;
}
float radius = offset2;
st *= scale;
if(u_radC > 0.85){
if(u_tanC > 0.50){
st *= radius * vec2(tan(angle * st.x), fract(angle * st.y));
}else{
if(u_tanC2 < 0.50){
st *= radius * vec2(tan(angle * st.x), sin(angle * st.y));
}else{
st *= radius * vec2(sin(angle * st.x), tan(angle * st.y));
}
}
}else if(u_radC > 0.68){
st *= radius * vec2(fract(angle / st.x), fract(angle / st.y));
}else if(u_radC > 0.51){
st *= radius * vec2(tan(angle * st.x), fract(angle / st.y));
}else if(u_radC > 0.34){
st *= radius * vec2(sin(angle * mod(st.x,st.y)), sin(angle / st.y *sin(st.x)));
}else if(u_radC > 0.17){
st *= radius * noise(vec2(sin(angle), cos(angle)) / st * fract(uv));
}else{
st *= radius * vec2(fract(angle * st.x), fract(angle / st.y));
}
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.85){
color += texture2D(img, uv + vec2(st.x,st.y));//"Sağ"
}else if(u_dirR > 0.68){
color += texture2D(img, uv + vec2(-st.y,-st.x));//"Sağ2"
}else if(u_dirR > 0.51){
color += texture2D(img, uv + vec2(st.y,st.x));//"Norm"
}else if(u_dirR > 0.34){
color += texture2D(img, uv + vec2(st.y,-st.x));//"Norm2"
}else if(u_dirR > 0.17){
color += texture2D(img, uv + vec2(st.y*uv.y, st.x));//"SinsizUst"
}else{
color += texture2D(img, uv + vec2(st.x,mod(uv.y,st.y)));// "AlttanTarama"
}
color -= texture2D(img, uv - noise(vec2(st.x, st.y)) / random(uv));
div = 0.45;
color /= div;
color += vec4(0.03,0.03,0.03,1.0);
gl_FragColor = color;
}
`,swFrag=`
precision highp float;
#define PI 3.14159265359
varying vec2 vTexCoord;
uniform sampler2D uTexture0;
uniform vec2 uResolution;
uniform vec2 uCenter;
uniform float uRad;
uniform float uAngle;
uniform float uTick;
uniform float uShape;
uniform float uDir;
uniform float utime;
uniform float uRadMult;
void main()
{
float effectRadius = uRad/uRadMult;
float effectAngle = uAngle * PI * uDir;
vec2 center = uCenter.xy / uResolution.xy;
vec2 uv = gl_FragCoord.xy / uResolution.xy - center;
float len = length(uv * vec2(uResolution.x / uResolution.y, 1.));
float angle = atan(uv.x, uv.y) + effectAngle * smoothstep(effectRadius, uTick, len);
float radius = length(uv);
vec4 color = vec4(0.0);
color = texture2D(uTexture0, vec2(radius * sin(angle), radius * cos(angle)) + center);
gl_FragColor = color;
}
`;function drawRandomTexture($,e){(randomCanvas=createImage(e,9*e/16)).loadPixels();for(let o=0;o<randomCanvas.width;o++)for(let r=0;r<randomCanvas.height;r++)randomCanvas.set(o,r,color(random(255)));randomCanvas.updatePixels(),randomSeed(rSeed)}function setup(){let $=window.location.search;5==(resPrm=(prm=new URLSearchParams($)).get("density"))&&(pix=5),4==resPrm&&(pix=4),3==resPrm&&(pix=3),2==resPrm&&(pix=2),nSeed=5198510*(R=new Random).random_dec(),rSeed=158191418*R.random_dec(),console.log("randomSeed: "+rSeed),ar=9/16,noiseSeed(nSeed),randomSeed(rSeed),asChooser=random(1),tanC=random(1),tanC2=random(1);let e=R.random_dec();rotCh=R.random_choice([0,1]),rotChY=0,uRadC2=random(1),random(1);let o=R.random_dec();e>.93?(compNames="comp1",1==(seedChooser=random([1,2,3,4]))?randomSeed(124999210.33866358):2==seedChooser?randomSeed(20088393.962960925):3==seedChooser?randomSeed(102738549.64695875):randomSeed(144955035.23758054),o=0):e>.77?(compNames="comp2",seedChooser=random([1,2,4,5,1,4]),rotChY=random([0,1]),uRadC2=R.random_choice([0,0,0,0,1,1,1]),1==seedChooser?randomSeed(3880058.2605842287):2==seedChooser?randomSeed(18913671.86441485):4==seedChooser?randomSeed(155879.87955448776):5==seedChooser&&randomSeed(150902325.960804)):e>.68?(compNames="comp3",1==(seedChooser=random([1,2,8,1,2]))?randomSeed(109467394.53931598):2==seedChooser?randomSeed(101085646.42482981):randomSeed(9221765.304619182),o=0):e>.63?(compNames="comp4",seedChooser=random([1,1,2,4,2,2,3,3,4,3]),rotChY=random([0,1]),1==seedChooser?randomSeed(24288482.1603664):2==seedChooser?randomSeed(136895108.30131546):3==seedChooser?randomSeed(59956919.715252206):randomSeed(103037819.1500985),o=0):e>.47?(compNames="comp5",2==(seedChooser=random([2,3,4,6,7,8,9,3,7,8,9]))?randomSeed(62106201.516337566):3==seedChooser?randomSeed(15846824.234565198):4==seedChooser?randomSeed(133712810.95889445):6==seedChooser?randomSeed(78641511.83008125):7==seedChooser?randomSeed(127411789.00883949):8==seedChooser?randomSeed(122433972.10454836):randomSeed(45379661.40439634)):e>.35?(compNames="comp6",2==(seedChooser=random([2,3,4,5,2,4]))?randomSeed(86855412.08410487):3==seedChooser?randomSeed(865155.5263759163):4==seedChooser?randomSeed(44013099.49922091):randomSeed(70071837.39923896)):e>.2?(compNames="comp7",uRadC2=0,seedChooser=random([1,2,1]),rotChY=random([0,1]),1==seedChooser?randomSeed(85488884.24835339):2==seedChooser&&randomSeed(117427648.37402885)):e>.16?(compNames="comp8",rotChY=random([0,1,0,0]),randomSeed(7655796.202862505),o=0):(compNames="comp9",rotChY=random([0,1]),randomSeed(29867063.522541113),o=0),createCanvas(w*ar,w),pg=createGraphics(w*ar,w),blurPg=createGraphics(w*ar,w,WEBGL),bg=createGraphics(w*ar,w),blurPg2=createGraphics(w*ar,w,WEBGL),spaBuf=createGraphics(w*ar,w,WEBGL),pixelDensity(pix),colorMode(HSB,360,100,100,1),blurPg.imageMode(CENTER),pg.colorMode(HSB,360,100,100,1),bg.pixelDensity(pix),pg.pixelDensity(pix),spaBuf.pixelDensity(pix),spaBuf.noStroke(),blurPg.colorMode(HSB,360,100,100,1),blurPg.background(30,8,90),blurPg.pixelDensity(pix),blurPg2.colorMode(HSB,360,100,100,1),blurPg2.background(30,8,90),blurPg2.pixelDensity(pix),bg.colorMode(HSB,360,100,100,1),drawRandomTexture(ar,w),blurShader=blurPg2.createShader(theVertex,blurFrag),swirlShader=blurPg.createShader(theVertex,swFrag),spaShader=spaBuf.createShader(theVertex,spaFrag),background(0,0,2),pg.background(0,0,2),bg.background(0,0,2);let r=w/3.333;sunX1=random(width/2-r,width/2-50),sunY1=height/2,sunX2=random(width/2+w/20,width/2+r),sunY2=height/2;let a;a=1,sunRad1=random(w/4.34,w/3.03)/a,sunRad2=random(w/4.34,w/3.03)/a;let t=color(20,30,35),s=color(40,30,35),u=color(150,15,30),n=color(190,30,35),_=color(210,30,35),i=color(230,30,35),c=color(250,30,35),d=color(340,15,30),l=color(360,30,35),m=R.random_choice([t,s,u,n,_,i,c,d,l]),f=R.random_choice([t,s,u,n,_,i,c,d,l]);m==f&&(o=0),sunH1=hue(m),sunH2=hue(f),sunS1=saturation(m),sunS2=saturation(f),sunB1=brightness(m),sunB2=brightness(f),h1=random([20,40,30,340,180,200,150,0]),h2=random([20,40,30,340,180,200,150,0]),seaH2=random(1),alp=random(.2,.8),alp2=random(.3,.7);let h=random(1),v=random(1),p=random(1);if(uSc=1,h=h>.75?.76:h>.5?.51:h>.25?.26:0,v=v>.85?.86:v>.68?.69:v>.51?.52:v>.34?.35:v>.17?.18:0,uRadC2=uRadC2>.5?1:0,p=p>.85?.86:p>.68?.69:p>.51?.52:p>.34?.35:p>.17?.18:0,sky(sunH1,sunH2),sun(sunX1,sunY1,sunRad1,50,alp,sunH1,sunS1,sunB1,random([1,1.1,1.2,1.2,1.2,1.3]),2),sun(sunX2,sunY2,sunRad2,50,alp2,sunH2,sunS2,sunB2,random([1,1.1,1.2,1.2,1.2,1.3]),2),o<.85){pg.beginShape();for(let x=0;x<100;x++){let g=random(0,width-0),C=random(height),S=map(noise(C/20),0,1,-50,50),y=g+S,b=random(30,50),D=random(30,50),P=dist(y,C,sunX1,sunY1);P<sunRad1&&P>sunRad1/2&&(pg.fill(h1,b,random(30,60),alp+.1),pg.stroke(h1,D,random(30,60),alp+.1),pg.curveVertex(y,C))}pg.endShape(),pg.beginShape();for(let T=0;T<100;T++){let k=random(0,width-0),U=random(height),N=map(noise(U/20),0,1,-50,50),B=k+N,Y=random(30,50),A=random(30,50),M=dist(B,U,sunX2,sunY2);M<sunRad2&&M>sunRad2/2&&(pg.fill(h2,Y,random(30,60),alp+.1),pg.stroke(h2,A,random(30,60),alp+.1),pg.curveVertex(B,U))}pg.endShape()}roundInt=4,uOctave=round(random(3,4.5),roundInt),uFbmAmp=round(random(40,80),roundInt),uAmp=.15,uRoundness=round(4*random(1),roundInt),uDir1=round(4*random(1),roundInt),uDir2=round(4*random(1),roundInt),uRandStr=.5,uMult=random(1.5,2),uScale=random([.05,.2,.07,.1]),dir=random([1,-1]),"comp1"==compNames?(uRadC2=1,h=.51,v=.35,p=.69,shapeC=.41,uPi=random(1,1.5),uSc=random(1,1.5),uRound=random(.2,.4),rad=R.random_choice([.5,.6,.7,.8])/1.25,angle=R.random_choice([1,2]),tick=R.random_choice([0,.1])):"comp2"==compNames?(h=.51,v=0,p=random([0,.35]),shapeC=.41,uPi=1,1==uRadC2&&(p=.35),0==uRadC2&&(uPi=random([.65,1.4])),uSc=random(.7,1.5),uRound=random(.2,.35),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,1,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp3"==compNames?(uRadC2=0,h=random([.76,0,.26,.51,0,0]),v=.18,p=.18,shapeC=.41,uPi=random(1,2),uSc=random(.7,1.2),uRound=random(.1,.25),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,1,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.2,.1,0,.1,.2,0])):"comp4"==compNames?(uRadC2=1,h=random([.26,0]),v=.86,p=random([.69,.18]),tanC=random([0,0,0,0,1,1,1]),tanC2=random([1,1,1,0,0]),uPi=1,shapeC=.41,uSc=1,uRound=random(.05,.35),rad=R.random_choice([.6,.7,.8])/1.25,angle=R.random_choice([1,2]),tick=R.random_choice([0,.1,.2])):"comp5"==compNames?(uRadC2=0,h=random([.76,.26,0]),v=random([.52,.52,.52,.86,.86]),p=random([.52,.18,.69,.25,0,.35]),shapeC=.41,tanC=0,tanC2=random([0,1,1]),uPi=random([1,1,1,2,1,2,1,2,1,2]),uSc=random(.8,1.2),uRound=random(.1,.2),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp6"==compNames?(uRadC2=0,h=random([.26,.26,.26,.76,.51]),v=.35,p=random([.18,.52,0,.69,.86,.35]),shapeC=.41,uPi=random(.75,1.5),uSc=random(.5,1.5),uRound=random(.2,.45),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp7"==compNames?(h=random([0,.26]),v=0,p=random([.69,.35,.86,.52]),shapeC=.41,uPi=1,1==uRadC2&&(uPi=random(1,2)),uSc=random(.5,1.5),uRound=random(.2,.4),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])):"comp8"==compNames?(uRadC2=1,h=.76,v=.86,p=random([.25,.35,.35]),shapeC=.41,tanC=0,tanC2=0,uPi=1,0==p&&(tanC2=random([0,1]),uPi=random(1,1.5)),uSc=random(1,1.2),uRound=.2,rad=R.random_choice([.7,.8])/1.25,angle=2,tick=R.random_choice([.2,.1])):"comp9"==compNames&&(uRadC2=0,h=0,v=.69,p=.69,shapeC=.41,uPi=random(1,2),uSc=random(.74,1.5),uRound=random(.2,.5),rad=R.random_choice([.5,.5,.5,.5,.6,.6,.7,.8,.6,.8,.7,.8,.8])/1.25,angle=R.random_choice([1,1,2,1,1,2,1,2,1,1,1,1]),tick=R.random_choice([0,0,0,.1,.2,.3,.3,.2,.1,.3,0,.1,.2,0])),swW=random(1.5,3),shapeC=.41,radMult="comp1"==compNames||"comp4"==compNames||"comp8"==compNames?R.random_choice([1.75,1.5,1.75,1.5,1.75]):R.random_choice([2,2,2,1.75,1.5,1.75,2]);for(let F=0;F<2;F++)blurShader.setUniform("uTexture0",pg),blurShader.setUniform("randomTex",randomCanvas),blurShader.setUniform("u_amp",uAmp),blurShader.setUniform("uResolution",[width*pix,height*pix]),blurShader.setUniform("u_octave",uOctave),blurShader.setUniform("u_fbmAmp",uFbmAmp),blurShader.setUniform("u_roundness",uRoundness),blurShader.setUniform("u_dir1",uDir1),blurShader.setUniform("u_dir2",uDir1),blurShader.setUniform("u_randStr",uRandStr),blurShader.setUniform("u_mult",uMult),blurShader.setUniform("u_scale",uScale),blurPg2.noStroke(),blurPg2.shader(blurShader),blurPg2.translate(-width/2,-height/2),blurPg2.rect(0,0,width,height),bg.push(),bg.noStroke(),bg.imageMode(CENTER),bg.translate(width/2,height/2),bg.image(blurPg2,0,0,width,height),bg.pop(),starsBg(swW),swirlShader.setUniform("uTexture0",bg),swirlShader.setUniform("uResolution",[width*pix,height*pix]),swirlShader.setUniform("uCenter",[width/swW*pix,height/2*pix]),swirlShader.setUniform("uRad",rad),swirlShader.setUniform("uAngle",angle),swirlShader.setUniform("uTick",tick),swirlShader.setUniform("uShape",shapeC),swirlShader.setUniform("uDir",dir),swirlShader.setUniform("uRadMult",radMult),blurPg.noStroke(),blurPg.shader(swirlShader),blurPg.translate(-width/2,-height/2),blurPg.rect(0,0,width,height),spaShader.setUniform("resolution",[width*pix,height*pix]),spaShader.setUniform("randomTex",randomCanvas),spaShader.setUniform("img",blurPg),spaShader.setUniform("u_radC",v),spaShader.setUniform("u_angleC",h),spaShader.setUniform("u_dirR",p),spaShader.setUniform("uScale",uSc),spaShader.setUniform("uRound",uRound),spaShader.setUniform("u_radC2",uRadC2),spaShader.setUniform("u_tanC",tanC),spaShader.setUniform("u_tanC2",tanC2),spaShader.setUniform("uPi",uPi),spaBuf.shader(spaShader),spaBuf.rect(0,0,width,height),push(),0==rotCh?(translate(0,0),scale(1,1)):(translate(width,0),scale(-1,1)),1==rotChY&&(translate(0,height),scale(1,-1)),image(spaBuf,0,0),pop();stars(swW,1,2),stars(swW,.25,2.5)}function draw(){noLoop()}function keyPressed(){"s"==key&&saveCanvas("DistCollective_Lumina","png")}function sun($,e,o,r,a,t,s,u,n,_){for(let i=0;i<r;i++){let c=random(1);c>.6?pg.beginShape(LINES):c>.4?.7>random(1)?100==r?pg.beginShape():pg.beginShape(TRIANGLE_FAN):pg.beginShape():pg.beginShape(TRIANGLES);for(let d=0;d<TAU;d+=.01){let l=map(noise(offset,.001*d),0,1,-50,50);offset+=.001;let m=o-i*o/20,f=o-i*o/20,h=$+cos(d/n)*m+l/2,v=e+sin(d/_)*f+l;pg.noFill(),pg.strokeWeight(1.2*random(1,2)),pg.stroke(t,s,u,random(a)),pg.curveVertex(h^d,v^d)}pg.endShape()}}function sky($,e){pg.push();let o=random([50,50,100,100,100,80])/2;for(let r=0;r<450;r++){var a=random(width),t=random(height),s=random(width),u=random(height),n=map(t,0,height/2,200,10);pg.noFill();var _=dist(sunX1,sunY1,a,t),i=dist(sunX2,sunY2,s,u),c=map(_,0,3.5*sunRad1,100,0),d=map(i,0,3.5*sunRad2,100,0);pg.stroke($,o,c,random(.1)),pg.strokeWeight(random(.5,1.2)*w/250),pg.line(a,t,a-random(-n,n),t),pg.stroke(e,o,d,random(.1)),pg.line(s,u,s-random(-n,n),u)}pg.pop()}function stars($,e,o){for(let r=0;r<w*o;r++){let a=random(width),t=random(height);noStroke(),beginShape(),drawingContext.shadowOffsetX=0,drawingContext.shadowOffsetY=0,drawingContext.shadowBlur=7,drawingContext.shadowColor="white";let s=random(.001,1)*e;for(let u=0;u<TAU;u+=PI/10){let n=a+sin(u)*s+random(-.5,.5),_=t+cos(u)*s+random(-.5,.5);fill(random([0,20,340,280]),random(7,20),random(90,100)/1,random(.01,.8)/1.2),curveVertex(n,_)}endShape()}}function starsBg($){for(let e=0;e<w/2;e++){let o=random(width),r=random(height);bg.noStroke(),bg.beginShape();let a=random(.01,2);for(let t=0;t<TAU;t+=PI/10){let s=o+sin(t)*a+random(-.5,.5),u=r+cos(t)*a+random(-.5,.5),n=dist(o,r,width/$,height/2);bg.fill(random([0,20,340,280]),random(10,30),random(90,100)/1,random(.01,.8)/1.2),n<width/3&&bg.curveVertex(s,u)}bg.endShape()}}class Random{constructor(){this.useA=!1;let $=function($){let e=parseInt($.substr(0,8),16),o=parseInt($.substr(8,8),16),r=parseInt($.substr(16,8),16),a=parseInt($.substr(24,8),16);return function(){r|=0;let $=((e|=0)+(o|=0)|0)+(a|=0)|0;return a=a+1|0,e=o^o>>>9,o=r+(r<<3)|0,r=(r=r<<21|r>>>11)+$|0,($>>>0)/4294967296}};this.prngA=new $(tokenData.hash.substr(2,32)),this.prngB=new $(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num($,e){return $+(e-$)*this.random_dec()}random_int($,e){return Math.floor(this.random_num($,e+1))}random_choice($){return $[this.random_int(0,$.length-1)]}}