0x35ed1634…9501sent to0xa7d8d9ef…d270·#14,633,951·view on Etherscan
iplier) {vec2 mult = texCoord * resolution;float offset = sn3d(vec3(mult / multiplier, frame));float n1 = pnoise3d(vec3(mult, offset), vec3(1.0/texCoord * resolution, 1.0));return n1 / 2.0 + 0.5;}float grain(vec2 texCoord, vec2 resolution, float frame) {return grain(texCoord, resolution, frame, 2.5);}float grain(vec2 texCoord, vec2 resolution) {return grain(texCoord, resolution, 0.0);}",Le="vec4 perm(vec4 x){return mod289(((x * 34.0) + 1.0) * x);}float noise(vec3 p){vec3 a = floor(p);vec3 d = p - a;d = d * d * (3.0 - 2.0 * d);vec4 b = a.xxyy + vec4(0.0, 1.0, 0.0, 1.0);vec4 k1 = perm(b.xyxy);vec4 k2 = perm(k1.xyxy + b.zzww);vec4 c = k2 + a.zzzz;vec4 k3 = perm(c);vec4 k4 = perm(c + 1.0);vec4 o1 = fract(k3 * (1.0 / 41.0));vec4 o2 = fract(k4 * (1.0 / 41.0));vec4 o3 = o2 * d.z + o1 * (1.0 - d.z);vec2 o4 = o3.yw * d.x + o3.xz * (1.0 - d.x);return o4.y * d.y + o4.x * (1.0 - d.y);}",Ne=`#define OCTAVES 6\nfloat random(vec2 co){highp float a = 12.9898;highp float b = 78.233;highp float c = 43758.5453;highp float dt= dot(co.xy ,vec2(a,b));highp float sn= mod(dt,3.14);return fract(sin(sn) * c);}float noise (in vec2 st) {vec2 i = floor(st);vec2 f = 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 = f * f * (3.0 - 2.0 * f);return mix(a, b, u.x) +(c - a)* u.y * (1.0 - u.x) +(d - b) * u.x * u.y;}float fm1 (in vec2 st) {float value = 0.0;float amplitude = .5;float frequency = 0.;for (int i = 0; i < OCTAVES; i++) {value += amplitude * noise(st);st *= 2.;amplitude *= .5;}return value;}`,ke="vec3 bldav(vec3 base, vec3 blend) {return (base+blend)/2.0;}vec3 bldav(vec3 base, vec3 blend, float opacity) {return (bldav(base, blend) * opacity + base * (1.0 - opacity));}float blendColorBurn(float base, float blend) {return (blend==0.0)?blend:max((1.0-((1.0-base)/blend)),0.0);}vec3 blendColorBurn(vec3 base, vec3 blend) {return vec3(blendColorBurn(base.r,blend.r),blendColorBurn(base.g,blend.g),blendColorBurn(base.b,blend.b));}vec3 blendColorBurn(vec3 base, vec3 blend, float opacity) {return (blendColorBurn(base, blend) * opacity + base * (1.0 - opacity));}float bldovl(float base, float blend) {return base<0.5?(2.0*base*blend):(1.0-2.0*(1.0-base)*(1.0-blend));}vec3 bldovl(vec3 base, vec3 blend) {return vec3(bldovl(base.r,blend.r),bldovl(base.g,blend.g),bldovl(base.b,blend.b));}vec3 bldovl(vec3 base, vec3 blend, float opacity) {return (bldovl(base, blend) * opacity + base * (1.0 - opacity));}vec3 bldmt(vec3 base, vec3 blend) {return base*blend;}vec3 bldmt(vec3 base, vec3 blend, float opacity) {return (bldmt(base, blend) * opacity + base * (1.0 - opacity));}float bldscn(float base, float blend) {return 1.0-((1.0-base)*(1.0-blend));}vec3 bldscn(vec3 base, vec3 blend) {return vec3(bldscn(base.r,blend.r),bldscn(base.g,blend.g),bldscn(base.b,blend.b));}vec3 bldscn(vec3 base, vec3 blend, float opacity) {return (bldscn(base, blend) * opacity + base * (1.0 - opacity));}float bldsftlgt(float base, float blend) {return (blend<0.5)?(2.0*base*blend+base*base*(1.0-2.0*blend)):(sqrt(base)*(2.0*blend-1.0)+2.0*base*(1.0-blend));}vec3 bldsftlgt(vec3 base, vec3 blend) {return vec3(bldsftlgt(base.r,blend.r),bldsftlgt(base.g,blend.g),bldsftlgt(base.b,blend.b));}vec3 bldsftlgt(vec3 base, vec3 blend, float opacity) {return (bldsftlgt(base, blend) * opacity + base * (1.0 - opacity));}float blendLighten(float base, float blend) {return max(blend,base);}vec3 blendLighten(vec3 base, vec3 blend) {return vec3(blendLighten(base.r,blend.r),blendLighten(base.g,blend.g),blendLighten(base.b,blend.b));}vec3 blendLighten(vec3 base, vec3 blend, float opacity) {return (blendLighten(base, blend) * opacity + base * (1.0 - opacity));}",Se="vec2 mod289(vec2 x) {return x - floor(x * (1.0 / 289.0)) * 289.0;}vec3 mod289(vec3 x) {return x - floor(x * (1.0 / 289.0)) * 289.0;}vec4 mod289(vec4 x) {return x - floor(x * (1.0 / 289.0)) * 289.0;}vec3 permute(vec3 x) {return mod289(((x*34.0)+1.0)*x);}vec4 permute(vec4 x) {return mod289(((x*34.0)+1.0)*x);}vec4 taylorInvSqrt(vec4 r){return 1.79284291400159 - 0.85373472095314 * r;}",Oe="float threshold(in float thr1, in float thr2 , in float val) {if (val < thr1) {return 0.0;}if (val > thr2) {return 1.0;}return val;}float diff(in vec4 pix1, in vec4 pix2) {return (abs(pix1.r - pix2.r) +abs(pix1.g - pix2.g) +abs(pix1.b - pix2.b)) / 3.0;}float edge(in sampler2D tex, in vec2 coords, in vec2 renderSize){float dx = 1.0 / renderSize.x;float dy = 1.0 / renderSize.y;vec4 pix[9];pix[0] = texture2D(tex, coords + vec2( -1.0 * dx, -1.0 * dy));pix[1] = texture2D(tex, coords + vec2( -1.0 * dx , 0.0 * dy));pix[2] = texture2D(tex, coords + vec2( -1.0 * dx , 1.0 * dy));pix[3] = texture2D(tex, coords + vec2( 0.0 * dx , -1.0 * dy));pix[4] = texture2D(tex, coords + vec2( 0.0 * dx , 0.0 * dy));pix[5] = texture2D(tex, coords + vec2( 0.0 * dx , 1.0 * dy));pix[6] = texture2D(tex, coords + vec2( 1.0 * dx , -1.0 * dy));pix[7] = texture2D(tex, coords + vec2( 1.0 * dx , 0.0 * dy));pix[8] = texture2D(tex, coords + vec2( 1.0 * dx , 1.0 * dy));float delta = (diff(pix[1],pix[7])+diff(pix[5],pix[3]) +diff(pix[0],pix[8])+diff(pix[2],pix[6]))/4.;return threshold(0.25,.4,clamp(3.0*delta,0.0,1.0));}",Xe="vec3 brhtnss(vec3 color, float value) {return color + value;}vec3 cntrst(vec3 color, float value) {return 0.5 + value * (color - 0.5);}vec3 xpsr(vec3 color, float value) {return (1.0 + value) * color;}vec3 hsft(vec3 color, float hue) {const vec3 k = vec3(0.57735, 0.57735, 0.57735);float cosAngle = cos(hue);return vec3(color * cosAngle + cross(k, color) * sin(hue) + k * dot(k, color) * (1.0 - cosAngle));}vec3 strtn(vec3 color, float value) {const vec3 luminosityFactor = vec3(0.2126, 0.7152, 0.0722);vec3 grayscale = vec3(dot(color, luminosityFactor));return mix(grayscale, color, 1.0 + value);}",U=e.form;let x=Fe;x=x.replace("#crlchnk1",U.crlchnk1);x=x.replace("#crlchnks",U.crlchnks);x=x.replace("#crlchnks1",U.crlchnks1);x=x.replace("#crlchnks2",U.crlchnks2);x=x.replace("#crlchnk2",U.crlchnk2);x=x.replace("#crlbse",U.crlbse);x=x.replace("#curlExp0",U.crlxps[0]);x=x.replace("#curlExp1",U.crlxps[1]);x=x.replace("#curlExp2",U.crlxps[2]);let m=Pt;m=m.replace("${curl}",x);m=m.replace("${noisecommon}",Se);m=m.replace("${pnoise}",We);m=m.replace("${snoise}",we);m=m.replace("${grain}",Ae);m=m.replace("${noise}",Le);m=m.replace("${fm}",Ne);m=m.replace("${edge}",Oe);m=m.replace("${rtfmla}",U.rtfmla);m=m.replace("${rtaddfmla}",U.rtaddfmla);m=m.replace("${rtswlfmla}",U.rtswlfmla);m=m.replace("${wrapx}",U.wrapx);let G=Ct;G=G.replace("${blend}",ke);G=G.replace("${adjust}",Xe);let Ee=_t;Ee=Ee.replace("${blend}",ke);const M=e.nbShapes,Dt=()=>{const c=[],l=[],s=[],o=[],n=[],t=[],i=[];let u=null;const p=[],b=e.palette;for(let a=0;a<b.length;a++){b[a].f&&r.random()>.5&&(b[a].c="#000000");const E=b[a],q=E.c,_=re(q),ce=te(_.h,_.s,_.l);let j=E.i||.2;p.push({c:ce,i:j})}let k,R,C,v,S,T,A,P=null;const Y=()=>{const a=e.width,E=e.height/2,q=e.artdens;for(let _=0;_<M;_++){let ce=r.random()<.7?.1:.08;ce+=r.random()*.1;let j=e.width*ce,se=.01425313569*e.height,pt=.01425313569*e.height,J=a*(Math.floor(r.random()*q)/q),K=E;{J+=r.random()>.7?r.random()*a*.05:0;const ht=e.artdens==10?0:.6;K+=r.random()>ht?r.range(-1,1)*se*.125:0}_>20&&(e.strongStrokes||(se*=.1),J=r.random()*a,(e.strongStrokes||e.density>6)&&(K=r.random()*E));const ne=_%b.length,ze=p[ne],L=ze.c;let Ue=ze.i;const mt=r.random()*Math.PI*2;t[ne]||(t[ne]=[]),t[ne].push(J/e.width,K/e.height,j/e.width,se/e.height),l.push(J/e.width,K/e.height,j/e.width,se/e.height),o.push(J/e.width,K/e.height,j/e.width,pt/e.height),s.push(L.r/255,L.g/255,L.b/255,Ue),n.push(L.r/255,L.g/255,L.b/255,Ue),i.push(mt)}},$=()=>{for(let a=0;a<6;a++){const E=ye();c.push(E)}c[5].setSize(64,64),c[4].setSize(64,64),u=ye()},Je=()=>{let a=b.filter(E=>E.sh!==void 0);a.length?a=a[0].sh:a=0,v=new THREE.ShaderMaterial({defines:{nbshp:M,nbshprot:M==400?M:2},uniforms:{ures:{value:new THREE.Vector2(e.width,e.height)},ucntr:{value:new THREE.Vector2(0,e.contourWidth)},uskptsh:{value:e.skipThreshold},uhgtml:{value:2},ushp:{value:l},ushpcl:{value:s},uRotations:{value:i},uStep:{value:e.step},ugrdlmt:{value:new THREE.Vector2(e.artgrdlmt.x,e.artgrdlmt.y)},uRenderRot:{value:0},uShift:{value:a}},vertexShader:W,fragmentShader:G})},Ke=()=>{A=new THREE.ShaderMaterial({uniforms:{ures:{value:new THREE.Vector2(e.width,e.height)},tInput:{value:c[0].texture},tContourInput:{value:c[1].texture},uptuvtrlt:{value:new THREE.Vector2(e.pertubUVTranslateX,e.pertubUVTranslateY)},unblns:{value:new THREE.Vector2(e.nbLinesX,e.nbLinesY)},ucrl:{value:new THREE.Vector4(e.curl.pos.x,e.curl.pos.y,e.curl.scl.x,e.curl.scl.y)},ucrlscl:{value:e.form.crlsck2},uswl:{value:new THREE.Vector3(e.swl[0],e.swl[1],e.swl[2])},ucrlwrp:{value:new THREE.Vector2(e.curl.wrap.x,e.curl.wrap.y)},ucllff:{value:new THREE.Vector2(e.ucllff.x,e.ucllff.y)},ucntr:{value:0}},vertexShader:W,fragmentShader:m})},Ze=()=>{T=new THREE.ShaderMaterial({defines:{nbshp:M,nbshprot:M==400?M:2},uniforms:{ures:{value:new THREE.Vector2(e.width,e.height)},uskptsh:{value:e.skipThreshold},uhgtml:{value:2},ushp:{value:o},ushpcl:{value:n},ucntr:{value:new THREE.Vector2(0,0)},ugrdlmt:{value:new THREE.Vector2(e.artgr