0x18b75119…b783sent to0x381233d5…7acd·#19,616,076·view on Etherscan
[1,()=>{console.log("Artist 54. Aranda\Lasch -- platform 1");function patchP5jsForWebGL2(){const n=p5.RendererGL.prototype._initContext;p5.RendererGL.prototype._initContext=function(){this.drawingContext=this.canvas.getContext("webgl2",{alpha:!0,depth:!0,stencil:!0,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,failIfMajorPerformanceCaveat:!0}),this.drawingContext?console.log("WebGL 2.0 context successfully created."):(console.warn("WebGL 2.0 is not supported by your browser. Falling back to WebGL 1.0."),n.call(this))}}patchP5jsForWebGL2();
function n(n,t=1.1,e=1){return t*e/(e-n*(e-t))}const SEED=n.random_num;function t(n,t){for(let e=0;e<l.length;e++)n.setUniform(l[e],r[t][e])}function e(n,t){for(let[e,o]of Object.entries(N[t]))n.setUniform(e,o)}function o(n=0,t=1){let e=(t-n)*R.random_dec()+n;return e}function a(n){return n[Math.floor(o()*n.length)]}function c(n){return n.reduce((n,t,e,o)=>{const a=o.slice(0,e+1),i=a.reduce((n,t)=>n+t,0);return[...n,i]},[])}this.seed=SEED;let l=["LF1","LF2","LR1","LR2","dA1","dA2","df1","df2","wb1","wb2","bb1","bb2","Nf1","Nf2","Nn1","Nn2","Nx1","Nx2","indx","Ld","cBlend"],r=[],m={seed:o(-1e3,1e3),mult1:o(2,18),mult2:o(5,12),horizon:.1,hengeHighlight:1e3,shadowStrength:6,ground:.5,lineWeightMult:1,clear:2,night:2};const h="#version 300 es\n in vec3 aPosition;\n in vec2 aTexCoord;\n out vec2 vTexCoord;\n void main() { \n vTexCoord = aTexCoord;\n vTexCoord.x *= 9./16.;\n vec4 positionVec4 = vec4(aPosition, 1.0);\n positionVec4.xy = positionVec4.xy * 2.0 - 1.0;\n gl_Position = positionVec4;\n }\n ",f="#version 300 es // Author:Jesse Bassett\nprecision highp float;\nin vec2 vTexCoord;\nout vec4 fragColor ; uniform vec4 LF1; uniform vec2 LF2; uniform vec4 LR1; uniform vec2 LR2; uniform vec4 dA1; uniform vec2 dA2; uniform vec4 df1; uniform vec2 df2; uniform vec4 wb1; uniform vec2 wb2; uniform vec4 bb1; uniform vec2 bb2; uniform vec4 Nf1; uniform vec2 Nf2; uniform vec4 Nn1; uniform vec2 Nn2; uniform vec4 Nx1; uniform vec2 Nx2; uniform float indx; uniform vec4 Ld; uniform float cBlend; uniform float cloudSeed; uniform float N1; uniform float N2; uniform float horizon; uniform float ground; uniform float clear; uniform float night; uniform vec2 rez; uniform float isBase; uniform vec2 v1U; uniform vec2 v2U; uniform float thU; uniform float r1U; uniform float r2U;\nconst int Len = 5;\nint sel = 2;\nfloat time = -0.04;\nconst int N_Octaves = 8;\n#define BlendScreen(base, blend) (1.0 - ((1.0 - base) * (1.0 - blend)))\nuint pcg(uint v) {\n\tuint state = v * uint(747796405) + uint(2891336453);\n\tuint word = ((state >> ((state >> uint(28)) + uint(4))) ^ state) * uint(277803737);\n\treturn (word >> uint(22)) ^ word;\n}\nfloat prng (float p) {\n\treturn float(pcg(uint(p))) / float(uint(0xffffffff));\n}\nfloat prng (vec2 p) {\n\treturn float(pcg(pcg(uint(p.x)) + uint(p.y))) / float(uint(0xffffffff));\n}\nfloat prng (vec3 p) {\n\treturn float(pcg(pcg(uint(p.x)) + uint(p.y) + uint(p.z))) / float(uint(0xffffffff));\n}\nfloat prng (vec4 p) {\n\treturn float(pcg(pcg(uint(p.x)) + uint(p.y) + uint(p.z) + uint(p.w))) / float(uint(0xffffffff));\n}\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187,0.366025403784439,-0.577350269189626,0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1;\n i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec2 x1 = x0.xy + C.xx - i1;\n vec2 x2 = x0.xy + C.zz;\n float n0 = prng(vec3(i, 0.0));\n float n1 = prng(vec3(i + i1, 1.0));\n float n2 = prng(vec3(i + vec2(1.0), 2.0));\n vec3 x = vec3(n0, n1, n2) * 2.0 - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), 0.0);\n m = m * m;\n m = m * m;\n a0 = vec3(n0, n1 - n0, n2 - n0); \n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * vec2(x1.x, x2.x) + h.yz * vec2(x1.y, x2.y);\n return 130.0 * dot(m, g);\n}\nfloat noise3d(vec3 p){\n vec3 a = floor(p);\n vec3 d = p - a;\n d = d * d * (3.0 - 2.0 * d);\n float n000 = prng(a + vec3(0.0, 0.0, 0.0));\n float n100 = prng(a + vec3(1.0, 0.0, 0.0));\n float n010 = prng(a + vec3(0.0, 1.0, 0.0));\n float n110 = prng(a + vec3(1.0, 1.0, 0.0));\n float n001 = prng(a + vec3(0.0, 0.0, 1.0));\n float n101 = prng(a + vec3(1.0, 0.0, 1.0));\n float n011 = prng(a + vec3(0.0, 1.0, 1.0));\n float n111 = prng(a + vec3(1.0, 1.0, 1.0));\n float n00 = mix(n000, n100, d.x);\n float n10 = mix(n010, n110, d.x);\n float n01 = mix(n001, n101, d.x);\n float n11 = mix(n011, n111, d.x);\n float n0 = mix(n00, n10, d.y);\n float n1 = mix(n01, n11, d.y);\n float n = mix(n0, n1, d.z);\n return n;\n}\nvec2 rotateUV(vec2 uv, float rotation){ \n float rotation2 = rotation * (isBase+1.) * 0.261799 * 2.;\n return vec2( \n cos(rotation2) * (uv.x - 0.5) + sin(rotation2) * (uv.y - 0.5) + 0.5, \n cos(rotation2) * (uv.y - 0.5) - sin(rotation2) * (uv.x - 0.5) + 0.5\n ); \n}\nfloat SmoothStep( float edge0, float edge1,float x ){\n float t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return t;\n}\nfloat sdOrientedBox( in vec2 p, in vec2 a, in vec2 b, float th )\n{\n float l = length(b-a);\n vec2 d = (b-a)/l;\n vec2 q = p-(a+b)*0.5;\n q = mat2(d.x,-d.y,d.y,d.x)*q;\n q = abs(q)-vec2(l*0.5,th);\n return length(max(q,0.0)) + min(max(q.x,q.y),0.0); \n}\nvec4 shadeCloud(vec2 v1,vec2 v2,float th,float r){\n vec4 R = vec4(0.0);\n vec2 V = v2-v1;\n V = V.yx;\n V.x= -V.x*sign(r);\n V.y= V.y*sign(r);\n r=abs(r);\n V = normalize(V)*(th-th*r);\n R.xy = v1 + V;\n R.yw = v2 + V;\n R.x = v1.x + V.x;\n R.y = v1.y + V.y;\n R.z = v2.x + V.x;\n R.w = v2.y + V.y;\n return R;\n}\nvec3 col3d ( in vec3 P, in vec2 st, in vec2 v1, in vec2 v2, in float th, in float r, in float r2) {\n vec3 x = P * N1 ;\n\tfloat v = 0.0;\n\tfloat a = 0.5;\n\tvec3 shift = vec3(100);\n\tfor (int i = 0; i < N_Octaves; ++i) {\n\t\tv += a * noise3d(x);\n\t\tx = x * 2.0 + shift;\n\t\ta *= 0.5;\n\t}\n st += vec2(v)*N2*(sin(time));\n vec4 SH;\n vec3 c;\n float mask1 = sdOrientedBox( st, v1, v2, th );\n mask1 = 0.0 + sign(mask1)*1.;\n SH = shadeCloud(v1,v2,th,abs(r));\n float mask2 = sdOrientedBox( st, SH.xy, SH.zw, th*r );\n mask2 = 0.0 + sign(mask2)*1.; \n SH = shadeCloud(v1,v2,th,-r2);\n float mask3 = sdOrientedBox( st, SH.xy, SH.zw, th*r2 );\n mask3 = 0.0 + sign(mask3)*1.;\n c = vec3(mask1,mask2,mask3);\n return c;\n}\nvec2 OP( vec2 st, float r, float w, float d, float s, float ww , float b, float n, float N, float X){ // from #3\n st = rotateUV(st,r);\n st.x += cos(st.y*w)/d;\n st.y += sin(st.x*w)/d;\n float pos = st.x * s;\n float L = ww*b*( (cos(pos*2.*3.14)+1.)/2. )-b+1.;\n float colLC = clamp(L,0.090,1.0);\n vec2 p = st * n;\n float colN = (snoise(p)*.5+.5);\n float colNC = smoothstep(N,X,colN);\n return vec2 ( colNC, colLC );\n}\nvoid main() {\n vec3 DEBUG = vec3(0.);\n vec2 st = vTexCoord;\n vec3 param = vec3(0.);\n vec3 C;\n vec3 aCheck = vec3(0.0);\n vec2 v1 = v1U;\n vec2 v2 = v2U;\n float th = thU;\n float r = r1U;\n float r2 = r2U;\n float a = 1.352;\n if(isBase >= 1.){\n a = 1.;\n }\n float th_o = th;\n r = a*r;\n th += (a-1.)*r;\n r2 = (th_o*r2)/(th);\n v1.y += (a-1.)*r;\n v2.y += (a-1.)*r;\n v1.y = -2.*((horizon+0.1)*v1.y-(horizon+0.1)-v1.y+0.5);\n v2.y = -2.*((horizon+0.1)*v2.y-(horizon+0.1)-v2.y+0.5);\n C = col3d( vec3( st.x, st.y, cloudSeed), st, v1, v2, th, r, r2 );\n DEBUG = vec3(C);\n aCheck = C;\n float mask1 = C.x;\n float mask2 = C.y;\n float mask3 = C.z;\n vec2 st_1 = st;\n vec2 st_2 = st;\n vec2 st_3 = st;\n vec2 st_4 = st;\n vec2 st_5 = st;\n vec2 st_6 = st;\n vec3 color = vec3(0.0);\n st_1 = rotateUV(st,LR1.x );\n st_1.x += cos(st_1.y*dA1.x)/df1.x;\n st_1.y += sin(st_1.x*dA1.x)/df1.x;\n float pos_1 = st_1.x * LF1.x;\n float y = 0.;\n float x = pos_1;\n y = sin( (x+Ld.z) *Ld.y);\n y += sin( (x+Ld.z) *Ld.y*2.1 + Ld.w)*4.5;\n y += sin( (x+Ld.z) *Ld.y*1.72 + Ld.w*1.121)*4.0;\n y += sin( (x+Ld.z) *Ld.y*2.221 + Ld.w*0.437)*5.0;\n y += sin( (x+Ld.z) *Ld.y*3.1122+ Ld.w*4.269)*2.5;\n y *= Ld.x*0.06;\n pos_1 = pos_1+y;\n float colL_1 = wb1.x*bb1.x*( (cos(pos_1*2.*3.14)+1.)/2. )-bb1.x+1.;\n float colLC_1 = clamp(colL_1,0.090,1.0);\n vec2 posN_1 = st * Nf1.x;\n float colN_1 = (snoise(posN_1)*.5+.5);\n float colNC_1 = smoothstep(Nn1.x,Nx1.x,colN_1);\n st_2 = rotateUV(st_2,LR1.y);\n st_2.x += cos(st_2.y*dA1.y)/df1.y;\n st_2.y += sin(st_2.x*dA1.y)/df1.y;\n float pos_2 = st_2.x * LF1.y;\n float colL_2 = wb1.y*bb1.y*( (cos(pos_2*2.*3.14)+1.)/2. )-bb1.y+1.;\n float colLC_2 = clamp(colL_2,0.090,1.0);\n vec2 posN_2 = st_2 * Nf1.y;\n float colN_2 = (snoise(posN_2)*.5+.5);\n float colNC_2 = smoothstep(Nn1.y,Nx1.y,colN_2);\n vec2 temp3 = OP(st_3,LR1.z,dA1.z,df1.z,LF1.z,wb1.z,bb1.z,Nf1.z,Nn1.z,Nx1.z); \n float colLC_3 = temp3.x;\n float colNC_3 = temp3.y;\n vec2 temp4 = OP(st_4,LR1.w,dA1.w,df1.w,LF1.w,wb1.w,bb1.w,Nf1.w,Nn1.w,Nx1.w); \n float colLC_4 = temp4.x;\n float colNC_4 = temp4.y;\n vec2 temp5 = OP(st_5,LR2.x,dA2.x,df2.x,LF2.x,wb2.x,bb2.x,Nf2.x,Nn2.x,Nx2.x); \n float colLC_5 = temp5.x;\n float colNC_5 = temp5.y;\n vec2 posN_6 = st_6 * Nf2.y;\n float colN_6 = (snoise(posN_6)*.5+.5);\n float colNC_6 = smoothstep(Nn2.y,Nx2.y,colN_6);\n if(isBase >= 1.){\n colNC_1 = -colNC_1+1.0;\n colNC_1 = colNC_1*(C.x);\n colNC_1 = -colNC_1+1.0;\n }\n colNC_2 = -colNC_2+1.0;\n colNC_2 = colNC_2*( (-C.x+1.0)- (-C.z+1.0));\n colNC_2 = -colNC_2+1.0;\n colNC_3 = -colNC_3+1.0;\n colNC_3 = colNC_3*(-C.x+1.0);\n colNC_3 = -colNC_3+1.0;\n colNC_4 = -colNC_4+1.0;\n colNC_4 = colNC_4*(-C.y+1.0);\n colNC_4 = -colNC_4+1.0;\n colNC_5 = -colNC_5+1.0;\n colNC_5 = colNC_5*(-C.y+1.0);\n colNC_5 = -colNC_5+1.0;\n float colB_1 = BlendScreen( colNC_1,colLC_1 );\n float colB_2 = BlendScreen( colNC_2,colLC_2 );\n float colB_3 = BlendScreen( colNC_3,colLC_3 );\n float colB_4 = BlendScreen( colNC_4,colLC_4 );\n float colB_5 = BlendScreen( colNC_5,colLC_5 );\n float colF_1 = SmoothStep( cBlend,1.,colB_1 );\n float colF_2 = SmoothStep( cBlend,1.,colB_2 );\n float colF_3 = SmoothStep( cBlend,1.,colB_3 );\n float colF_4 = SmoothStep( cBlend,1.,colB_4 );\n float colF_5 = SmoothStep( cBlend,1.,colB_5 );\n float colF = min( colF_1,colF_2 );\n colF = min( colF,colF_3 );\n colF = min( colF,colF_4 );\n colF = min( colF,colF_5 );\n color = vec3( colF );\n if(isBase == 0.){\n color = vec3(colF_1);\n }\n if (st.y >= clear){\n C = vec3(1.0);\n C.x = 1.0;\n C.y = 1.0;\n C.z = 1.0;\n color = vec3(1.0);\n }\n\n if (st.y <= horizon){\n color = vec3(ground);\n }\n if (night <= 1.0 ){\n if (st.y > horizon){\n color = mix(1.0-color,vec3(1.0-night),color);\n }\n }\n color*0.8;\n if(isBase >= 1.){\n if(aCheck == vec3(1.0)){\n fragColor = vec4(color,0.0);\n }else{\n fragColor = vec4(color,1.0);\n }\n }else if(isBase == 0.){\n fragColor = vec4(color,1.0);\n }\n}\n";class u{constructor(n=[{name:"temp",chance:1,amount:1,min:0,max:1}]){this.count=400,this.arr=n,this.select={}}setByAmount(){let n=0;for(let t=0;t<this.arr.length;t++)n+=this.arr[t].amount;this.count=n;for(let n=0;n<this.arr.length;n++)this.arr[n].chance=this.arr[n].amount/this.count}setByChance(n=this.count){let t=0;for(let n=0;n<this.arr.length;n++)t+=this.arr[n].chance;if(t>=.9999)for(let n=0;n<this.arr.length;n++)this.arr[n].amount=this.arr[n].chance*this.count;else console.log("Improper Sum: "+t)}sum(){let n=[],t=[];t.push(0);for(let e=0;e<this.arr.length;e++)n.push(this.arr[e].chance),t.push(this.arr[e].chance);t.pop(),n=c(n),t=c(t);for(let e=0;e<this.arr.length;e++)this.arr[e].min=t[e],this.arr[e].max=n[e]}pickCategory(){let n,t=o();for(let e=0;e<this.arr.length;e++)this.arr[e].min<=t&&t<this.arr[e].max&&(n=this.arr[e].name);return this.select={name:n,value:t},{name:n,value:t}}setCategory(n){let t,e=0;for(let e=0;e<this.arr.length;e++)n==this.arr[e].name&&(t=this.arr[e].name);return this.select={name:t,value:e},{name:t,value:e}}setCategoryValue(n){let t,e;for(let o=0;o<this.arr.length;o++)this.arr[o].min<=n&&n<this.arr[o].max&&(e=this.arr[o].name,t=n);return this.select={name:e,value:t},{name:e,value:t}}}let v=[{name:"Calm",chance:0,amount:4,min:0,max:0},{name:"Cloudy",chance:0,amount:0,min:0,max:0},{name:"Storm",chance:0,amount:0,min:0,max:0}],x=[{name:"Midnght Blue",chance:0,amount:0,min:0,max:0},{name:"Corb Blue",chance:0,amount:0,min:0,max:0},{name:"Pink",chance:0,amount:0,min:0,max:0},{name:"Orange",chance:0,amount:0,min:0,max:0},{name:"Burgundy",chance:0,amount:0,min:0,max:0},{name:"Taupe",chance:0,amount:28,min:0,max:0},{name:"Grey Blue",chance:0,amount:8,min:0,max:0},{name:"Baby Blue",chance:0,amount:11,min:0,max:0},{name:"Pool Green",chance:0,amount:0,min:0,max:0},{name:"Mint",chance:0,amount:11,min:0,max:0},{name:"Melon",chance:0,amount:0,min:0,max:0},{name:"White",chance:0,amount:3,min:0,max:0},{name:"Grey",chance:0,amount:38,min:0,max:0},{name:"Black",chance:0,amount:0,min:0,max:0}],d=new u(v),p=new u(x);d.setByAmount(),d.sum(),p.setByAmount(),p.sum();let _,y,g=d.pickCategory().name,C=p.pickCategory().name;console.log(g),console.log(C),m.horizon=0,g==v[0].name?(m.mult1=o(2,8),m.mult2=o(5,8.5),m.ground=1-o(0,.1),m.lineWeightMult=o(.5,1),m.clear=2,m.night=2):g==v[1].name?(m.mult1=o(10,14),m.mult2=o(9,11),m.ground=1-o(.2,.4),m.lineWeightMult=o(.8,1.2),m.clear=2,m.night=2):g==v[2].name?(m.mult1=o(14,18),m.mult2=o(11,13),m.ground=1-o(.2,.4),m.lineWeightMult=o(1.2,1.5),m.clear=2,m.night=2):g==v[3].name?(m.mult1=o(2,10),m.mult2=o(5,9),m.ground=1-o(0,.1),m.lineWeightMult=o(.5,1),m.clear=0,m.night=2):g==v[4].name&&(m.mult1=o(10,14),m.mult2=o(9,11),m.ground=1-o(.1,.2),m.lineWeightMult=o(.8,1.2),m.clear=2,m.night=o(.9,.987),cams[3].OrthGround=!0,cams[5].OrthGround=!0,cams[6].OrthGround=!0,sunlock=!0),C==x[0].name?(_=[0,28,113],y="000P"):C==x[1].name?(_=[43,125,225],y="001P"):C==x[2].name?(_=[254,188,203],y="002P"):C==x[3].name?(_=[255,92,54],y="003P"):C==x[4].name?(_=[153,24,46],y="004P"):C==x[5].name?(_=[206,200,186],y="005P"):C==x[6].name?(_=[162,178,201],y="006P"):C==x[7].name?(_=[191,227,237],y="007P"):C==x[8].name?(_=[0,105,84],y="008P"):C==x[9].name?(_=[237,253,220],y="009P"):C==x[10].name?(_=[236,190,92],y="010P"):C==x[11].name?(_=[255,255,255],y="011P"):C==x[12].name?(_=[240,240,240],y="012P"):C==x[13].name&&(_=[0,0,0],y="013P");let N=[{isBase:0,v1U:[-.29,.59],v2U:[1.88,.71],thU:.292,r1U:.362,r2U:.234,cloudSeed:m.seed}],w=7,b=1.2*9/16;for(i=0;i<w;i++){let t=o(-.25,.25),e=o(2,3),a=i/w,c=.9,l=c-.12;a=n(i,c,l),s=(a-n(i+1,c,l))/(c-l);let r=b*s,h=.28125-r/2+t-.2,f=.28125+r/2+t-.2;N.push({isBase:1+i,v1U:[h,a],v2U:[f,a],thU:.073*e*s,r1U:.3,r2U:.2,cloudSeed:o(-1e3,1e3),N1:2.5*m.mult1})}let L=N[0];N.reverse(),N.pop(),N.unshift(L);let B=m.lineWeightMult,z=a([0,Math.PI/2]),S=[[0,0,0,0,2.112627025969266,.796],[200,200,0,200,0,0],[z,z+Math.PI/4,z+2*Math.PI/4,z+2*Math.PI/4,3.59,4.131252138359817],[0,0,0,62.25,3.62,0],[20,423.46,502.63,610.87,390.81,0],[3.53*B,1.92*B,3.62*B,3.35*B,2.06*B,0*B],[.07*B,.06*B,.31*B,.04*B,.58*B,0*B],[20.61,41.24,32.59,26.67,3.6,-.2150600911194367],[.57,.57,-.23,.57,-.03,.05881764676913497],[1.812,1.812,.922,1.812,.492,1.0806698094796767]];r.push([S[1].slice(0,4),S[1].slice(4),S[2].slice(0,4),S[2].slice(4),S[3].slice(0,4),S[3].slice(4),S[4].slice(0,4),S[4].slice(4),S[5].slice(0,4),S[5].slice(4),S[6].slice(0,4),S[6].slice(4),S[7].slice(0,4),S[7].slice(4),S[8].slice(0,4),S[8].slice(4),S[9].slice(0,4),S[9].slice(4),S[0][4],S[0].slice(0,4),S[0][5]]),r[0][8][3]*=.5,r[0][10][3]*=1.85;class U{constructor(){this.x=1,this.y=1,this.min=1,this.max=1,this.aspect=1,this.wx=800,this.wy=800,this.wa=1,this.borderPercent=0,this.cam={l:-1,r:1,t:1,b:-1,n:0,f:1e3}}updateAspect(n){this.aspect=n,this.setCamAspect(),this.resize()}setCamAspect(){this.aspect<=1?(this.cam.l=-1*this.aspect,this.cam.r=1*this.aspect,this.cam.t=1,this.cam.b=-1):(this.cam.l=-1,this.cam.r=1,this.cam.t=1/this.aspect*1,this.cam.b=1/this.aspect*-1)}resize(){this.wx=window.innerWidth,this.wy=window.innerHeight,this.wa=this.wx/this.wy,this.wa<this.aspect?(this.min=this.wx,this.aspect,this.x=this.min,this.y=this.min*(1/this.aspect)):this.wa===this.aspect?(this.min=Math.min(this.wx,this.wy),this.aspect<=1?(this.x=this.min,this.y=this.min*(1/this.aspect)):(this.x=this.min*this.aspect,this.y=this.min)):this.aspect<this.wa&&(this.min=this.wy,this.aspect,this.x=this.min*this.aspect,this.y=this.min),this.x=Math.round(this.x),this.y=Math.round(this.y),this.max=Math.max(this.x,this.y)}}let F,k=new U;k.updateAspect(9/16),k.resize();let P=2,A=[],V=[];preload=function(){const n=new Blob([h],{type:"text/plain"}),t=new Blob([f],{type:"text/plain"}),e=URL.createObjectURL(n),o=URL.createObjectURL(t);for(let n=0;n<N.length;n++)A[n]=loadShader(e,o)},setup=function(){F=createCanvas(k.x,k.y,WEBGL),noStroke(),pixelDensity(P);for(let n=0;n<N.length;n++)V[n]=createGraphics(k.x,k.y,WEBGL),V[n].noStroke(),V[n].pixelDensity(P),V[n].shader(A[n]),A[n].setUniform("cloudSeed",m.seed),A[n].setUniform("N1",m.mult1),A[n].setUniform("N2",m.mult2),A[n].setUniform("horizon",m.horizon),A[n].setUniform("ground",m.ground),A[n].setUniform("clear",m.clear),A[n].setUniform("night",m.night),t(A[n],0),e(A[n],n);noLoop()},draw=function(){background(0,0,0),lightFalloff(.003,3e-4,0),ambientLight(_);for(let n=0;n<V.length;n++)V[n].shader(A[n]),V[n].rect(0,0,width,height),texture(V[n]),rect(-width/2,-height/2,width,height)},document.addEventListener("keydown",async function(n){"S"!==n.key&&"s"!==n.key||save(F,tokenData.hash+".png")});
}],