0x9114…dc5c

All memos sent from and to 0x9114…dc5c.

0x911463fa…dc5c·#18,020,726·0x30c7d60d…087cb5
[PPPPPPPPPPPPP[PPPPbAddress: delegate call to non-co`DRoGenerativeSeries`Address: delegate call to non-co`DAddress: low-level delegate call failedAddress: low-level delegate call failedhttps://arweave.net/NR3qqQi_sBwvGfAFQOgniEtaDeq5T8PtsUGaL_MAR_Ehttps://arweave.net/DbDkXIbMq99Fm3FM3SJHVapDvVPCsaCmcFacotrpposhttps://highlight-creator-assets.highlight.xyz/main/base-dir/31b1c8d3-6e99-4c34-8333-0e2a3cbb4058/onChainDir
«𝘌𝘷𝘦𝘳𝘺𝘵𝘩𝘪𝘯𝘨'𝘴 𝘳𝘶𝘯𝘯𝘪𝘯𝘨 𝘴𝘮𝘰𝘰𝘵𝘩𝘭𝘺, 𝘢𝘯𝘥 𝘺𝘰𝘶?»¹ In these formal studies, geometric figures are cut, broken, divided, subdivided, colorized and finally «set to drift»² in an endless scrolling motion. The elements in each composition vary over time without ever reaching a final form. Visual artifacts remind of analog electronics. Feedback loops undermine the accuracy of digital technology. As time passes, it is increasingly difficult to recognize the original composition: frame after frame, cycle after cycle, the image is dissolved into a landscape of liquid forms and oversaturated colors. After having pursued harmony and balance, it is liberating to surrender and witness the carefully crafted compositions blend into a chaotic interplay of lights and shapes. Drifting, la «dérive»³, is an ongoing dialogue with the machine, started as an exploration of an aesthetic system and turned into a journey of self–discovery. (1) 𝘚𝘶𝘱𝘦𝘳 𝘤𝘰𝘮𝘱𝘶𝘵𝘦𝘳 𝘏𝘈𝘓9000 𝘪𝘯 𝘤𝘰𝘯𝘷𝘦𝘳𝘴𝘢𝘵𝘪𝘰𝘯 𝘸𝘪𝘵𝘩 𝘋𝘢𝘷𝘦 𝘉𝘰𝘸𝘮𝘢𝘯 («2001: 𝘈 𝘚𝘱𝘢𝘤𝘦 𝘖𝘥𝘺𝘴𝘴𝘦𝘺», 𝘚. 𝘒𝘶𝘣𝘳𝘪𝘤𝘬, 1968). (2) «𝘋𝘳𝘪𝘧𝘵𝘪𝘯𝘨» 𝘪𝘴 𝘢𝘭𝘴𝘰 𝘢 𝘵𝘦𝘤𝘩𝘯𝘪𝘲𝘶𝘦 𝘶𝘴𝘦𝘥 𝘪𝘯 𝘦𝘢𝘳𝘭𝘺 𝘷𝘪𝘥𝘦𝘰 𝘢𝘳𝘵: “𝘣𝘺 𝘢𝘭𝘵𝘦𝘳𝘪𝘯𝘨 𝘵𝘩𝘦 𝘵𝘪𝘮𝘪𝘯𝘨 𝘱𝘶𝘭𝘴𝘦 𝘰𝘧 𝘵𝘩𝘦 𝘴𝘪𝘨𝘯𝘢𝘭, […] 𝘢𝘯 𝘪𝘮𝘢𝘨𝘦 𝘤𝘰𝘯𝘵𝘪𝘯𝘶𝘰𝘶𝘴𝘭𝘺 𝘥𝘳𝘪𝘧𝘵𝘦𝘥 𝘩𝘰𝘳𝘪𝘻𝘰𝘯𝘵𝘢𝘭𝘭𝘺” («𝘕𝘰𝘵𝘦𝘴 𝘵𝘰𝘸𝘢𝘳𝘥 𝘢 𝘩𝘪𝘴𝘵𝘰𝘳𝘺 𝘰𝘧 𝘪𝘮𝘢𝘨𝘦-𝘱𝘳𝘰𝘤𝘦𝘴𝘴𝘦𝘥 𝘷𝘪𝘥𝘦𝘰», 𝘓. 𝘍𝘶𝘳𝘭𝘰𝘯𝘨, 1970). (3) 𝘍𝘳𝘦𝘯𝘤𝘩 𝘸𝘰𝘳𝘥 𝘧𝘰𝘳 «𝘥𝘳𝘪𝘧𝘵» (𝘴𝘦𝘦 𝘢𝘭𝘴𝘰 «𝘛𝘩𝘦𝘰𝘳𝘪𝘦 𝘥𝘦 𝘭𝘢 𝘥𝘦𝘳𝘪𝘷𝘦», 𝘎. 𝘋𝘦𝘣𝘰𝘳𝘥, 1956).
reak;case"sampler":a.uniform1i(i,s);break;default:console.error("Uniform type is not valid.")}}),e(this,"setSampler",(t,e)=>{const s=this.context;s.activeTexture(s.TEXTURE0+t),s.bindTexture(s.TEXTURE_2D,e)}),e(this,"draw",(t=null,e=this.width,s=this.height)=>{const a=this.context;a.bindFramebuffer(a.FRAMEBUFFER,t),a.viewport(0,0,e,s),a.drawArrays(a.TRIANGLES,0,6)}),e(this,"loadCanvasToTexture",t=>{const e=this.context,s=e.createTexture();return this._bindTexture(e,s),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),s}),e(this,"createFBO",(t=this.width,e=this.height)=>{const s=this.context,a=s.createTexture();this._bindTexture(s,a),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,t,e,0,s.RGBA,s.UNSIGNED_BYTE,null);const i=s.createFramebuffer();return s.bindFramebuffer(s.FRAMEBUFFER,i),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,a,0),{getFramebuffer:()=>i,getTexture:()=>a,destroy:()=>{s.deleteFramebuffer(i),s.deleteTexture(a)}}}),e(this,"rgbToVec3",([t,e,s])=>[t/255,e/255,s/255]),e(this,"_bindTexture",(t,e)=>{t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)}),e(this,"_loadShaderFromSource",(t,e)=>{const s={};return s.name=t,s.fragment=e[t].frag,s.vertex="attribute vec4 a_position;void main(){gl_Position=vec4(a_position);}",s}),e(this,"_initPositionBuffer",()=>{if(!this.context)return!1;const t=this.context,e=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,e),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,1,1,-1,-1,-1]),t.STATIC_DRAW),e}),e(this,"_initTexcoordBuffer",()=>{if(!this.context)return!1;const t=this.context,e=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,e),t.bufferData(t.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),t.STATIC_DRAW),e}),e(this,"_initCanvas",(t=800,e=600,s=1,a)=>{this.width=t,this.height=e,this.time=0;const i=document.createElement("canvas");return i.id="cycles-canvas",(a||document.getElementById("root")).appendChild(i),i.width=this.width,i.height=this.height,s<=0?(i.style.width="100vw",i.style.height="100vh"):(i.style.width=this.width*(1/s)+"px",i.style.height=this.height*(1/s)+"px"),this.context=i.getContext("webgl",{preserveDrawingBuffer:!0,powerPreference:"high-performance"}),this.buffer=this._initPositionBuffer(),this.context.pixelStorei(this.context.UNPACK_FLIP_Y_WEBGL,!0),this.context.getExtension("OES_standard_derivatives"),this.canvas=i,!0})}},l={},o={},n=[],d={debug:!1,width:525,height:742.5,scale:1,ramps:{},cycles:{},gui:!1,download:!1,audio:!1,record:!1,presMode:!1,fps:{time:0,count:0},url:new URLSearchParams(window.location.search)},c=(t=!1)=>{let[e,s,a,i]=[window.innerHeight,window.innerWidth,1.5,1],r=Math.abs(e/s-1.414)<.1,l=d.static=/\bHeadlessChrome/.test(navigator.userAgent),o=/Android|webOS|iPhone|iPad|iPod/i.test(navigator.userAgent)&&r,n=d.url.has("fullscreen")?d.url.get("fullscreen"):null;s<450&&(a=1.5),1e3<e&&(a=l?1.5:.9),d.viewMode=t||(r||n||o||l?1:0),[d.height,d.width]={0:.7*e<s?[e,.707*e]:[1.414*s,s],1:[e,s]}[d.viewMode],document.body.style.backgroundColor=r||n||o?"transparent":"rgb(20,20,22)",a=d.url.has("upscale")&&d.url.get("upscale")&&!n?2:a,d.height=Math.floor(d.height*i*a),d.width=Math.floor(d.width*i*a),d.scale=a},h=()=>{c(),i.canvas.style.width=d.width*(1/d.scale)+"px",i.canvas.style.height=d.height*(1/d.scale)+"px",d.cahiers.draw(),n[0]=i.loadCanvasToTexture(d.cahiers.canvas)},u=t=>{"f"==t.key&&(document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen())},p=t=>{let e;d.fps.count<20&&(d.fps.count++,d.fps.now=t,d.fps.dt=d.fps.now-(d.fps.time||d.fps.now),d.fps.ratio=Math.round(120*d.fps.dt)/1e3||0,d.fps.time=d.fps.now),20==d.fps.count&&(d.fps.ratio=Math.floor(d.fps.ratio),d.ramp.loop(d.ramps,t=>t.ratio=d.fps.ratio),console.log("FPS:",1e3/d.fps.dt,"("+d.fps.ratio+")"),d.fps.count++),d.cycles.debug&&(i.setSampler(0,n[0]),i.startShader(l.display),i.endShader(),i.draw(null)),d.cycles.debug||(d.static||(d.cycles.feedback.ramps=[d.ramps.dissolve.brightness.run(),d.ramps.dissolve.contrast.run()+d.ramps.burst.contrast.run()+d.ramps.glitch.contrast.run(),d.ramps.dissolve.r.run(),d.ramps.dissolve.g.run(),d.ramps.dissolve.b.run(),d.ramps.burst.brightness.run()+d.ramps.glitch.flicker.run(),d.ramps.cosine.run(),1]),d.cycles.distort.ramps=[d.ramps.scroll.run(),d.ramps.transistion.x.run(),0,0,0,0],d.ramps.transistion.trigger.run(),d.ramps.controller.run(),e=d.cycles.distort,i.setSampler(0,n[0]),i.startShader(l.distort),i.setU("sampler","u_texture",0),0===i.time&&(i.setU("float","u_cm",e.colormode),i.setU("vec2","u_offset",e.offset)),i.setU("float[]","u_r",e.ramps),i.setU("float","u_amount",e.amount),i.setU("float","u_shape",e.shape),i.setU("float","u_freq",e.frequency),i.setU("vec3","u_color",i.rgbToVec3(e.color)),i.endShader(),i.draw(o.work[0].getFramebuffer()),e=d.cycles.feedback,i.setSampler(0,o.work[0].getTexture()),i.setSampler(1,o.channel[0].getTexture()),i.startShader(l.feedback),i.setU("sampler","u_original",0),i.setU("sampler","u_loop",1),i.setU("vec3","u_opacity",[e.opacityR,e.opacityG,e.opacityB]),i.setU("float","u_brightness",e.brightness),i.setU("float","u_contrast",e.contrast),i.setU("vec2","u_offset",e.offset),i.setU("vec2","u_scale",e.scale),i.setU("float","u_random",6.28*d.hash[26]),i.setU("float[]","u_r",e.ramps),i.endShader(),i.draw(o.channel[1].getFramebuffer()),i.setSampler(0,o.channel[1].getTexture()),i.startShader(l.display),i.endShader(),i.draw(o.channel[0].getFramebuffer()),i.setSampler(0,o.channel[1].getTexture()),i.setSampler(1,o.noise.getTexture()),i.startShader(l.post),i.setU("sampler","u_texture",0),i.setU("sampler","u_noise",1),i.setU("vec3","u_color",i.rgbToVec3(d.cycles.distort.color)),i.endShader(),i.draw(null)),d.request=requestAnimationFrame(p),i.time=d.url.get("offset")+performance.now()/1e3};document.addEventListener("DOMContentLoaded",async()=>{c(),window.addEventListener("resize",(e=>{let s;return t=>{s&&clearTimeout(s),s=setTimeout(e,500,t)}})(h)),document.addEventListener("keydown",u),console.log("Everything is running smoothly, and you?"),d.root=document.body,d.fullHash=tokenData.hash,d.hash=function(e){let s=[];for(let t=0;t<64;t+=2)s.push(parseFloat((parseInt(e.slice(t+2,t+4),16)/255).toFixed(4)));return s}(d.fullHash),d.random=new m(d.fullHash);let s=[];[{n:"layers",s:"hoist",p:18},{n:"layers",s:"neon",p:18},{n:"layers",s:"cross",p:9},{n:"lanes",s:"lanes",p:14},{n:"tiles",s:"tiles",p:14},{n:"tiles",s:"tiles2",p:15},{n:"tiles",s:"tiles3",p:6},{n:"cross",s:"cross",p:4},{n:"cross",s:"cross2",p:2}].forEach(e=>{for(let t=0;t<e.p;t++)s.push({n:e.n,s:e.s})}),d.style=d.style||s[Math.floor(99*d.hash[25]+.5)].n,d.substyle=d.substyle||s[Math.floor(99*d.hash[25]+.5)].s,"undefined"!=typeof tokenData&&([d.style,d.substyle]=0<parseInt(tokenData.tokenId)%1e6?[d.style,d.substyle]:["layers","hoist"]),d.reloadCahiers=()=>{a(d,!0),d.cahiers.draw(),n[0]=i.loadCanvasToTexture(d.cahiers.canvas)},d.rerollRamps=()=>{d.ramps.transistion.x.ramps[1].amount*=-1},d.cahiers=new t(d.width,d.height,d.random,d.root),a(d),d.cahiers.draw(),i.create(d.width,d.height,d.scale,d.root),l.display=await i.loadShader("cy_display"),l.distort=await i.loadShader("cy_distort"),l.feedback=await i.loadShader("cy_feedback"),l.noise=await i.loadShader("cy_noise"),l.post=await i.loadShader("cy_post"),o.noise=i.createFBO(),o.channel=[i.createFBO(),i.createFBO()],o.work=[i.createFBO(),i.createFBO()],i.startShader(l.noise),i.endShader(),i.draw(o.noise.getFramebuffer()),n.push(i.loadCanvasToTexture(d.cahiers.canvas)),i.context.disable(i.context.DEPTH_TEST),p()});class m{constructor(t){this.useA=!1;function e(t){let e=parseInt(t.substr(0,8),16),s=parseInt(t.substr(8,8),16),a=parseInt(t.substr(16,8),16),i=parseInt(t.substr(24,8),16);return function(){e|=0,s|=0,a|=0,i|=0;var t=(e+s|0)+i|0;return i=i+1|0,e=s^s>>>9,s=a+(a<<3)|0,a=a<<21|a>>>11,a=a+t|0,(t>>>0)/4294967296}}this.prngA=new e(t.substr(2,32)),this.prngB=new e(t.substr(34,32));for(let t=0;t<1e6;t+=2)this.prngA(),this.prngB()}float(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}}})();
«𝘌𝘷𝘦𝘳𝘺𝘵𝘩𝘪𝘯𝘨'𝘴 𝘳𝘶𝘯𝘯𝘪𝘯𝘨 𝘴𝘮𝘰𝘰𝘵𝘩𝘭𝘺, 𝘢𝘯𝘥 𝘺𝘰𝘶?»¹ In these formal studies, geometric figures are cut, broken, divided, subdivided, colorized and finally «set to drift»² in an endless scrolling motion. Since the elements in each composition vary over time, these studies never reach a final form. Visual artifacts remind of analog electronics. Feedback loops interfere with the sharp precision of digital technology. As time passes, it is increasingly difficult to recognize the original composition: frame after frame, cycle after cycle, the image is dissolved into a landscape of liquid forms and oversaturated colors. After having pursued harmony and balance, it is liberating to surrender and witness the carefully crafted compositions blend into a chaotic interplay of lights and shapes. Drifting, la «dérive»³, is an ongoing dialogue with the machine, started as an exploration of an aesthetic system and turned into a journey of self–discovery. (1) 𝘚𝘶𝘱𝘦𝘳 𝘤𝘰𝘮𝘱𝘶𝘵𝘦𝘳 𝘏𝘈𝘓9000 𝘪𝘯 𝘤𝘰𝘯𝘷𝘦𝘳𝘴𝘢𝘵𝘪𝘰𝘯 𝘸𝘪𝘵𝘩 𝘋𝘢𝘷𝘦 𝘉𝘰𝘸𝘮𝘢𝘯 («2001: 𝘈 𝘚𝘱𝘢𝘤𝘦 𝘖𝘥𝘺𝘴𝘴𝘦𝘺», 𝘚. 𝘒𝘶𝘣𝘳𝘪𝘤𝘬, 1968). (2) «𝘋𝘳𝘪𝘧𝘵𝘪𝘯𝘨» 𝘪𝘴 𝘢𝘭𝘴𝘰 𝘢 𝘵𝘦𝘤𝘩𝘯𝘪𝘲𝘶𝘦 𝘶𝘴𝘦𝘥 𝘪𝘯 𝘦𝘢𝘳𝘭𝘺 𝘷𝘪𝘥𝘦𝘰 𝘢𝘳𝘵: “𝘣𝘺 𝘢𝘭𝘵𝘦𝘳𝘪𝘯𝘨 𝘵𝘩𝘦 𝘵𝘪𝘮𝘪𝘯𝘨 𝘱𝘶𝘭𝘴𝘦 𝘰𝘧 𝘵𝘩𝘦 𝘴𝘪𝘨𝘯𝘢𝘭, […] 𝘢𝘯 𝘪𝘮𝘢𝘨𝘦 𝘤𝘰𝘯𝘵𝘪𝘯𝘶𝘰𝘶𝘴𝘭𝘺 𝘥𝘳𝘪𝘧𝘵𝘦𝘥 𝘩𝘰𝘳𝘪𝘻𝘰𝘯𝘵𝘢𝘭𝘭𝘺” («𝘕𝘰𝘵𝘦𝘴 𝘵𝘰𝘸𝘢𝘳𝘥 𝘢 𝘩𝘪𝘴𝘵𝘰𝘳𝘺 𝘰𝘧 𝘪𝘮𝘢𝘨𝘦-𝘱𝘳𝘰𝘤𝘦𝘴𝘴𝘦𝘥 𝘷𝘪𝘥𝘦𝘰», 𝘓. 𝘍𝘶𝘳𝘭𝘰𝘯𝘨, 1970). (3) 𝘍𝘳𝘦𝘯𝘤𝘩 𝘸𝘰𝘳𝘥 𝘧𝘰𝘳 «𝘥𝘳𝘪𝘧𝘵» (𝘴𝘦𝘦 𝘢𝘭𝘴𝘰 «𝘛𝘩𝘦𝘰𝘳𝘪𝘦 𝘥𝘦 𝘭𝘢 𝘥𝘦𝘳𝘪𝘷𝘦», 𝘎. 𝘋𝘦𝘣𝘰𝘳𝘥, 1956).
«𝘌𝘷𝘦𝘳𝘺𝘵𝘩𝘪𝘯𝘨'𝘴 𝘳𝘶𝘯𝘯𝘪𝘯𝘨 𝘴𝘮𝘰𝘰𝘵𝘩𝘭𝘺, 𝘢𝘯𝘥 𝘺𝘰𝘶?»¹ In these formal studies, geometric figures are cut, broken, divided, subdivided, colorized and finally «set to drift»² in an endless scrolling motion. New compositions are constantly generated and revealed at specific time intervals: by incorporating infinite permutations, each video work has no end and will never crystallize into a final form. Visual artifacts remind of analog electronics, imperfections interfere with the sharp precision of digital technology. The system is fragile and beyond a critical point, instability takes over: when the machine is «set in a self-meditative state»³ any attempt at control is irrelevant. Frame after frame, cycle after cycle, the computer mind dissolves the image into a landscape of liquid forms and oversaturated colors. After having pursued harmony and balance, it is liberating to surrender and witness the carefully crafted compositions blend into a chaotic interplay of lights and shapes. Giving up control becomes a way to overcome the vicious cycle of perfectionism. Drifting, la «dérive»⁴, is an ongoing dialogue with the machine, started as an exploration of an aesthetic system and turned into a journey of self–discovery. (1) 𝘚𝘶𝘱𝘦𝘳 𝘤𝘰𝘮𝘱𝘶𝘵𝘦𝘳 𝘏𝘈𝘓9000 𝘪𝘴 𝘦𝘷𝘢𝘭𝘶𝘢𝘵𝘪𝘯𝘨 𝘋𝘢𝘷𝘦 𝘉𝘰𝘸𝘮𝘢𝘯'𝘴 𝘥𝘳𝘢𝘸𝘪𝘯𝘨 𝘴𝘬𝘪𝘭𝘭𝘴 («2001: 𝘈 𝘚𝘱𝘢𝘤𝘦 𝘖𝘥𝘺𝘴𝘴𝘦𝘺», 𝘚. 𝘒𝘶𝘣𝘳𝘪𝘤𝘬, 1968). (2) «𝘋𝘳𝘪𝘧𝘵𝘪𝘯𝘨» 𝘪𝘴 𝘢𝘭𝘴𝘰 𝘢 𝘵𝘦𝘤𝘩𝘯𝘪𝘲𝘶𝘦 𝘶𝘴𝘦𝘥 𝘪𝘯 𝘦𝘢𝘳𝘭𝘺 𝘷𝘪𝘥𝘦𝘰 𝘢𝘳𝘵: “𝘣𝘺 𝘢𝘭𝘵𝘦𝘳𝘪𝘯𝘨 𝘵𝘩𝘦 𝘵𝘪𝘮𝘪𝘯𝘨 𝘱𝘶𝘭𝘴𝘦 𝘰𝘧 𝘵𝘩𝘦 𝘴𝘪𝘨𝘯𝘢𝘭, […] 𝘢𝘯 𝘪𝘮𝘢𝘨𝘦 𝘤𝘰𝘯𝘵𝘪𝘯𝘶𝘰𝘶𝘴𝘭𝘺 𝘥𝘳𝘪𝘧𝘵𝘦𝘥 𝘩𝘰𝘳𝘪𝘻𝘰𝘯𝘵𝘢𝘭𝘭𝘺” («𝘕𝘰𝘵𝘦𝘴 𝘵𝘰𝘸𝘢𝘳𝘥 𝘢 𝘩𝘪𝘴𝘵𝘰𝘳𝘺 𝘰𝘧 𝘪𝘮𝘢𝘨𝘦-𝘱𝘳𝘰𝘤𝘦𝘴𝘴𝘦𝘥 𝘷𝘪𝘥𝘦𝘰», 𝘓. 𝘍𝘶𝘳𝘭𝘰𝘯𝘨, 1970). (3) 𝘋𝘦𝘧𝘪𝘯𝘪𝘵𝘪𝘰𝘯 𝘰𝘧 𝘷𝘪𝘥𝘦𝘰 𝘧𝘦𝘦𝘥𝘣𝘢𝘤𝘬 𝘣𝘺 𝘢𝘳𝘵𝘪𝘴𝘵 𝘚𝘵𝘦𝘱𝘩𝘦𝘯 𝘉𝘦𝘤𝘬 («𝘝𝘪𝘥𝘦𝘰 𝘚𝘺𝘯𝘵𝘩𝘦𝘴𝘪𝘴», 𝘋. 𝘋𝘢𝘷𝘪𝘴 & 𝘈. 𝘚𝘪𝘮𝘮𝘰𝘯𝘴, 1977). (4) 𝘍𝘳𝘦𝘯𝘤𝘩 𝘸𝘰𝘳𝘥 𝘧𝘰𝘳 «𝘥𝘳𝘪𝘧𝘵» (𝘴𝘦𝘦 𝘢𝘭𝘴𝘰 «𝘛𝘩𝘦𝘰𝘳𝘪𝘦 𝘥𝘦 𝘭𝘢 𝘥𝘦𝘳𝘪𝘷𝘦», 𝘎. 𝘋𝘦𝘣𝘰𝘳𝘥, 1956).
,thin:{...R.thinlines,background:.3<n()?"#111100":g},split:{angle:c(8)?2.2:1.8,ext:k.full.leftright,palette:()=>_,background:"#111100"}})},R.tiles2={name:"tiles2",ch:R.tiles.ch,style:t=>({base:{...R.reset,ext:k.full.topbottom,angle:u(t,.25),palette:()=>[g,x,!1,!1][r.i.side-1],background:"#660000"},type_2:{angle:b(t,.08),palette:()=>[x,"#008800"][r.i.piece%2],background:"#222200"},stripes_odd:{angle:h,stripes:()=>!0,background:_},thin:{...R.thinlines,background:"#111100"},split:{angle:c(8)?2.2:1.8,ext:k.full.leftright,palette:()=>_}})},R.tiles3={name:"tiles3",ch:{variations:{color:()=>c(11)?x:g,spacing:()=>6}},style:t=>({base:{...R.reset,ext:k.full.leftright,padding:()=>!1,angle:m(t,3<t.m.w?.3:.1),palette:()=>_,background:"#660000"},type_1:{palette:()=>[!1,!1,x,x][r.i.side-1]},divided_odd:{...R.thinlines,background:.2<n()?g:"#660000"},type_2:{palette:()=>[!1,!1,_,_][r.i.side-1]},stripes_odd:{angle:h,stripes:()=>!0},type_3:{palette:()=>[!1,!1,x,x][r.i.side-1]},type_0:{palette:()=>[!1,!1,_,_][r.i.side-1]},split:{angle:m(t,.035),palette:()=>[g,g,g,g][r.i.side-1]},thin:{...R.thinlines}})},r.variants=R[i.substyle];let s,a={i:0,r:y()},t=T.class("base").subs({m:7,th:s=[n(.05,.35),n(.05,.35),n(.05,.35),n(.05,.35)],fill:!0,class:"base"}).subs((t,e)=>"middle"===e.label?{m:2,y:n(.4,.6)}:[{m:2,y:s[2]+.2},{m:1,x:n(.5,.8)},{m:2,y:.8-s[0]},{m:1,x:n(.2,.5)}][t]).class(t=>"type_"+(t+c(19)+c(18))%4).subs((t,e)=>t%2==c(10)&&1.5<e.w&&.2<n()?{m:4,x:[.25/e.w,.25/e.w]}:{m:0,class:2<e.w&&a.i++==c(18,1,5)?"split":null});("tiles"===i.substyle||"tiles3"===i.substyle||"tiles2"===i.substyle&&.7<d(12))&&t.subs((t,e)=>!e._("split")&&.3<n()?{m:4,x:[.1-.15/e.w,.9-.15/e.w]}:{m:0}),t.subs((t,e)=>e._("type_2")&&!e._("split")&&.3<e.w?{m:2,y:.38/e.h,class:"stripes"}:{m:0}),t.class((t,e)=>e.w<=.4?"thin":null),t.subs((t,e)=>e._("thin")&&.5<n()?{m:2}:{m:0}),"tiles"!==i.substyle&&"tiles3"!==i.substyle||t.subs((t,e)=>!e._("split")&&!e._("thin")&&(e._("type_0")||e._("type_1"))&&1<e.h?{m:5,y:Array(2).fill(.38/e.h),class:"divided"}:{m:0}),[...Array(3)].forEach(()=>t.subs((t,e)=>e._("split")?{m:1,x:.5}:{m:0})),r.grid.data=t.out()}if("cross"===i.style){o.scrollmode=c(20)?"tri2I":"tri3N",o.offset=[.5,.5],o.transistion=-1,R.cross={name:"cross",ch:{variations:{color:()=>.5<n()?g:_,spacing:()=>[5,9][a()]}},style:t=>({base:{...R.reset,palette:()=>(r.i.side-1==E[0]||r.i.side-1==E[1]?f:y)(100),ext:k.full.topbottom,angle:3,padding:t=>t==["bottom","top"][a()]},tcol_odd:{...R.thinlines,background:.5<n()?"#002200":g},l1_middle:{padding:()=>!1,...s.s1&&{palette:()=>"#112200"}},l2_even:{angle:b(t,.05),background:["#112200",g][!c(18)]},l2_odd:{angle:b(t,.05),background:["#112200",g][!c(18)]},l2_middle:{angle:1.8,palette:()=>"#660000",background:w},l1_column_even:{padding:()=>!1,angle:[b(t,.05),p(t,.08)][s.s2],background:!1,...s.s3&&{palette:()=>"#660000"}},l1_column_odd:{background:[x,!1][a()],ext:k.full.topbottom,stripes:()=>!0},l1_even:{palette:()=>[f(180,230),_,y(100,230),!1][r.i.side-1],ext:k.full.topbottom,background:()=>"#111100"},l1_row_even:{palette:()=>f(),stripes:()=>2==r.i.side}})},R.cross2={name:"cross2",ch:{variations:{color:()=>.5<n()?g:_,spacing:()=>[6,10][a()]}},style:t=>({base:{...R.reset,ext:k.full.topbottom,angle:b(t,.08),padding:t=>!1,palette:()=>s.col,background:!1},tcol_odd:{...R.thinlines},l1_row_even:{angle:h,stripes:()=>!0,background:"#770000"},l1_row_odd:{angle:c(18)?p(t,.11):h},l2_even:{angle:h,stripes:()=>!0,background:"#770000"},l2_middle:{palette:()=>.2<d(18)?"#112200":x,angle:1.9}})},r.variants=R[i.substyle];let s={th1:.5<n()?a()?[...Array(4)].map((t,e)=>d(e%2?6:7,.15,.2)):[...Array(4)].map((t,e)=>e%2?d(7,.1,.2):d(6,.1,.15)):Array(4).fill(d(7,.1,.2)),th2:.65<n()?0:n(.08,.15),col:y(100,150)};s.s1=c(11)&&.2<s.th2?1:0,s.s1=!1,s.s2=c(19)&&.1<s.th1[0]&&.1<s.th1[2]?1:0,s.s3=.75<d(20),s.s4=.1<s.th1[0]&&.1<s.th1[2]&&c(8)?1:0,s.thin=t=>Array(2).fill(s.s4?.24/t.w:12*d(10,.02,.032)/t.w),r.grid.data=T.class("base").subs({m:7,th:s.th1,fill:!0,class:"l1"}).subs((t,e)=>e._("l1_middle")?{m:6,th:s.th2,fill:!0,class:"l2"}:e.h>e.w?{m:4,x:s.thin(e),class:"tcol"}:{m:0}).subs((t,e)=>e._((()=>{let a=[];return["none","l2_even","l1_even","l2_odd"].reverse().map((e,s)=>{for(let t=0;t<=s;t++)a.push(e)}),a[Math.floor(Math.max(.001,Math.min(.999,l[17]))*a.length)]})())&&"cross"==r.variants.style.name?{m:6,th:n(.15,.25),class:"l3"}:{m:0}).subs((t,e)=>e._("tcol_even")?{m:5}:{m:0}).subs((t,e)=>e._("tcol_even")?{m:5,y:[.1,.1],class:"l1_column"}:{m:0}).subs((t,e)=>e._("tcol_odd")?{m:5}:{m:0}).subs((t,e)=>e._("l1_even")?{m:2,y:.8,class:"l1_row"}:{m:0}).out()}if(r.each=e=>e.m.class.slice().reverse().forEach(t=>r.i.style=t?{...r.i.style||{},...r.variants.style(e)[t]}:r.i.style),r.style={...r.style,padding:t=>r.i.style.padding(t),extension:()=>r.i.style.ext,angle:()=>r.i.style.angle,palette:()=>r.i.style.palette(),background:()=>r.i.style.background,gradient:()=>r.i.style.gradient(),variations:{orientation:"horizontal",type:"stripes",spacing:()=>.5<n()?6:12,thickness:t=>6==t?t.spacing-2:t.spacing-4,color:()=>null,...r.variants.ch.variations,density:()=>r.i.style.stripes()}},!o.reload){e.distort={R:0,G:0,B:0,offset:o.offset||[0,0],colormode:o.colormode},e.feedback={offset:[0,c(10)?.5:-.5],scale:[1,1]},[e.distort.frequency,e.distort.amount,e.distort.shape]={tri2I:[2,.25,1],tri2N:[2,.245,1],tri3I:[3,.168,1],tri3N:[3,.163,1]}[o.scrollmode],{col:e.distort.color,o:[e.feedback.opacityR,e.feedback.opacityG,e.feedback.opacityB],ramps:t,brightness:e.feedback.brightness,contrast:e.feedback.contrast,title:o.colorname,id:o.colorId}=((e=!1,t)=>{let s=[];return[{id:"D",title:"Dawn",p:11,col:[52,129,180],o:[1,.95,.92],r:[.01,1.24,1.06,.98,.96]},{id:"K",title:"Rubin",p:9,col:[225,67,130],o:[.98,.95,.97],r:[.03,1.24,.99,.9,1.09]},{id:"LL",title:"Rayon Vert",p:8,col:[255,66,32],o:[.95,1,.96],r:[.02,1.22,1.07,.97,.96]},{id:"RR",title:"Afterglow",p:14,col:[13,200,225],o:[1,.88,.89],r:[.01,1.21,1.06,.86,.91]},{id:"E",title:"Aurora",p:10,col:[252,79,68],o:[.94,1,.99],r:[.03,1.24,1.06,.96,.9]},{id:"I",title:"Nebula",p:9,col:[54,195,130],o:[1,.94,1],r:[0,1.23,1.07,.96,1.01]},{id:"Z2",title:"Black and White",p:5,col:[110,110,110],o:[.95,.95,.96],r:[0,1.22,.97,1.03,1.07]},{id:"Z1",title:"Black and White",p:5,col:[110,110,110],o:[.95,.95,.96],r:[-.01,1.21,1.04,.97,1.1]},{id:"G",title:"Dusk",p:10,col:[205,97,38],o:[1,.89,.97],r:[.01,1.24,1.01,.89,1.05]},{id:"QQ",title:"Emerald",p:10,col:[48,195,169],o:[1.02,.95,.95],r:[.02,1.19,1.1,.98,1.01]},{id:"I22",title:"Nitro",p:9,col:[116,63,203],o:[.97,1.01,.97],r:[.08,1.15,1.03,1.11,.96]}].forEach(e=>{e.brightness=.02,e.contrast=1.08,e.ramps=[e.r[0]-e.brightness,e.r[1]-e.contrast,e.r[2]-e.o[0],e.r[3]-e.o[1],e.r[4]-e.o[2]];for(let t=0;t<e.p;t++)s.push(e)}),e?s.find(t=>t.id==e):s[Math.floor(100*Math.min(.99,t))]})(i.palette,d(26)),i.ramp=S,i.ramps.burst={brightness:(new S).w(1600).w(200,{id:"p1"}).a(.02,10).a(-.05,10).a(.1,25).a(-.07,255).a(.02,10).a(-.05,10).a(.16,25).a(-.13,255),contrast:(new S).w(1600).w(200,{id:"p1"}).w(20).a(.03,25).a(-.03,255).w(20).a(.02,25).a(-.02,255)},i.ramps.glitch={flicker:new S({start:.06}).w(400).a(-.06,200).w(1780,{id:"p1"}).a(.06,20),contrast:new S({start:.02}).w(400).a(-.02,200).w(900,{id:"p1"}).a(.02,200).w(700)},i.ramps.cosine=new S({start:1.7}).w(400).a(-1.7,200).w(900,{id:"p1"}).a(1.7,200).w(700),i.ramps.dissolve={brightness:(new S).w(400).a(-.5*t[0],200).w(200).a(-.5*t[0],200).w(500,{id:"p1"}).a(t[0],200).w(700),contrast:(new S).w(400).a(t[1],200).w(900,{id:"p1"}).a(-t[1],200).w(700),r:(new S).w(550).a(t[2],50).w(900,{id:"p1"}).a(-t[2],200).w(700),g:(new S).w(550).a(t[3],50).w(900,{id:"p1"}).a(-t[3],200).w(700),b:(new S).w(550).a(t[4],50).w(900,{id:"p1"}).a(-t[4],200).w(700)},i.ramps.transistion={trigger:(new S).w(1e3).w(12,{callback:i.reloadCahiers}).w(1388,{id:"p1"}),x:(new S).w(1e3).a(o.transistion,40,{easing:"quintic"}).w(1360,{id:"p1"})},i.ramps.controller=(new S).w(100,{id:"p1"}).w(2300,{callback:i.rerollRamps}),i.ramps.scroll=new S({name:"scroll"}).wait(0).a(c(10)?-1:1,2e3,{easing:"linear"}),o.delays=c(15)?[50*c(18,1,5),50*c(19,5,10)]:[50*c(19,5,10),50*c(18,1,5)],i.ramp.iterate(i.ramps,t=>"scroll"!=t.name&&t.offset(o.delays[0])),i.ramp.iterate(i.ramps,t=>"scroll"!=t.name&&t.offset(o.delays[1],"p1")),i.static&&(e.distort.amount=0,e.feedback.offset=[0,0],S.disable(i.ramps),e.feedback.ramps=[-.015,["LL","E","I22","QQ","I"].some(t=>t===o.colorId)?.015:.025,.02,.02,.02,["LL","E","I22","QQ","I"].some(t=>t===o.colorId)?.1:.14,1.8,d(11,.95,1.05)]);const r={};r.style=i.style,r.color=o.colorname,r.colorstyle=o.colorstyle,r.scrollmode=o.scrollmode,r.hash=i.fullHash,r.delays="p0:"+o.delays[0]+", p1:"+o.delays[1]}},i=new class{constructor(){e(this,"create",(t=800,e=600,s=1,a)=>{this._initCanvas(t,e,s,a)}),e(this,"clear",()=>{const t=this.context;t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)}),e(this,"loadShader",async t=>{const e="undefined"!=typeof shadersSource?this._loadShaderFromSource(t,shadersSource):await this._loadShaderSource(t),s={},a=this.context;return s.frag=a.createShader(a.FRAGMENT_SHADER),a.shaderSource(s.frag,e.fragment),a.compileShader(s.frag),s.vert=a.createShader(a.VERTEX_SHADER),a.shaderSource(s.vert,e.vertex),a.compileShader(s.vert),s.prog=a.createProgram(),a.attachShader(s.prog,s.vert),a.attachShader(s.prog,s.frag),a.linkProgram(s.prog),a.detachShader(s.prog,s.vert),a.detachShader(s.prog,s.frag),s.uniforms={},s.uniforms.u_resolution=a.getUniformLocation(s.prog,"u_resolution"),s.uniforms.u_time=a.getUniformLocation(s.prog,"u_time"),s.attributes={},s.attributes.a_position=a.getAttribLocation(s.prog,"a_position"),s}),e(this,"startShader",(t,e=this.width,s=this.height)=>{this.shader=t;const a=this.context;a.useProgram(this.shader.prog),a.uniform2f(this.shader.uniforms.u_resolution,e,s),this.shader.uniforms.u_time&&a.uniform1f(this.shader.uniforms.u_time,this.time)}),e(this,"endShader",()=>{const t=this.context;t.enableVertexAttribArray(this.shader.attributes.a_position),t.bindBuffer(t.ARRAY_BUFFER,this.buffer),t.vertexAttribPointer(this.shader.attributes.a_position,2,t.FLOAT,!1,0,0),this.shader=null}),e(this,"setU",(t,e,s)=>{const a=this.context,i=a.getUniformLocation(this.shader.prog,e);if(!i)return!1;switch(t){case"float":a.uniform1f(i,s);break;case"float[]":a.uniform1fv(i,s);break;case"vec2":a.uniform2f(i,s[0],s[1]);break;case"vec3":a.uniform3f(i,s[0],s[1],s[2]);break;case"vec3[]":a.uniform3fv(i,s);b
unds.br]]},g.rect.left={start:[[{x:g.bounds.tl.x,y:g.circle.tl.y},g.circle.tl],[g.bounds.tl,{x:g.bounds.tl.x,y:g.bounds.tl.y}]],end:[[g.circle.bl,{x:g.bounds.tl.x,y:g.circle.bl.y}],[{x:g.circle.bl.x,y:g.bounds.bl.y},g.bounds.bl]]},g.rect.right={start:[[g.circle.tr,{x:g.bounds.tr.x,y:g.circle.tr.y}],[{x:g.circle.tr.x,y:g.bounds.tr.y},g.bounds.tr]],end:[[{x:g.bounds.br.x,y:g.circle.br.y},g.circle.br],[g.bounds.br,{x:g.circle.tr.x,y:g.bounds.br.y}]]},g}),this.debug=!1,this.each=()=>!0,this.width=t,this.height=e,this.vh=e/100,this.vw=t/100,this.ratio=t/e,this.background="rgb(230, 225, 218)",this.hideTinyRect=!1,this.style={variations:{}},this.grid={data:null,padding:{x:0,y:0},fullflip:"both"},this.i={striped:0,piece:0,side:0},this.random=s||{float:()=>Math.random()},this.pickFromArray=t=>t[Math.floor(this.random.float()*t.length)];const i=this.canvas=document.createElement("canvas");[i.id,i.width,i.height,i.style.display]=["texture-canvas",this.width,this.height,"none"],(a||document.getElementById("root")).appendChild(i),this.ctx=i.getContext("2d"),this.background="#000000"}}function e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}class s{constructor(t,e){this.cahiers=t,this.random=e,this._data=[{x:0,y:0,w:12,h:12}]}_appendClass(e,t){return null==e?null==t?null:t:null==t?[e]:t.some(t=>t===e)?t:[e,...t]}subs(a){const i=this.random,r=t=>{this._data=[...this._data.slice(1),...t]};let l=[],o=[],n=0;return this._data.slice(0).forEach((s,t)=>{s._=e=>!!s.class&&s.class.some(t=>t==e);let e="function"==typeof a?a(t,s):a;switch(e.m){case 0:r([{x:s.x,y:s.y,w:s.w,h:s.h}].map(t=>({...t,class:this._appendClass(e.class,s.class)})));break;case-1:r([]);break;case 1:l[0]=(e.x||i(.2,.8))*s.w,r([{x:s.x,y:s.y,w:l[0],h:s.h,label:"odd"},{x:s.x+l[0],y:s.y,w:s.w-l[0],h:s.h,label:"even"}].map(t=>({...t,class:this._appendClass(t.label&&e.class?e.class+"_"+t.label:e.class,s.class)})));break;case 2:o[0]=(e.y||i(.2,.8))*s.h,r([{x:s.x,y:s.y,w:s.w,h:o[0],label:"odd"},{x:s.x,y:s.y+o[0],w:s.w,h:s.h-o[0],label:"even"}].map(t=>({...t,class:this._appendClass(t.label&&e.class?e.class+"_"+t.label:e.class,s.class)})));break;case 3:case 6:case 7:case 8:l=e.x||Array(2).fill(i(.3,.8)),o=e.y||[i(.2,.8),i(.2,.8)],6===e.m&&(n=e.th||.1,l=[e.th,1-e.th],o=[1-e.th,e.th]),7===e.m&&(n=e.th||Array(4).fill(.1),l=[n[3],1-n[1]],o=[1-n[0],n[2]]),8===e.m&&(l=[e.x,e.x+e.w],o=[1-e.y,1-e.y-e.h]),r([{x:s.x,y:s.y,w:s.w*l[0],h:s.h*o[0],label:"odd"},{x:s.x,y:s.y+s.h*o[0],w:s.w*l[1],h:s.h-s.h*o[0],label:"even"},{x:s.x+s.w*l[1],y:s.y+s.h*o[1],w:s.w-s.w*l[1],h:s.h-s.h*o[1],label:"odd"},{x:s.x+s.w*l[0],y:s.y,w:s.w-s.w*l[0],h:s.h*o[1],label:"even"},{x:s.x+s.w*l[0],y:s.y+s.h*o[1],w:Math.abs(s.w*l[0]-s.w*l[1]),h:Math.abs(s.h*o[1]-s.h*o[0]),label:"middle"}].splice(0,e.fill?5:4).map(t=>({...t,class:this._appendClass(t.label&&e.class?e.class+"_"+t.label:e.class,s.class)})));break;case 4:l=e.x||[i(.1,.3),i(.1,.3)],r([{x:s.x,y:s.y,w:s.w*l[0],h:s.h,label:"odd"},{x:s.x+s.w-s.w*l[1],y:s.y,w:s.w*l[1],h:s.h,label:"odd"},{x:s.x+s.w*l[0],y:s.y,w:s.w-s.w*l[1]-s.w*l[0],h:s.h,label:"even"}].map(t=>({...t,class:this._appendClass(t.label&&e.class?e.class+"_"+t.label:e.class,s.class)})));break;case 5:o=e.y||[i(.1,.3),i(.1,.3)],r([{x:s.x,y:s.y,w:s.w,h:s.h*o[0],label:"odd"},{x:s.x,y:s.y+s.h-s.h*o[1],w:s.w,h:s.h*o[1],label:"odd"},{x:s.x,y:s.y+s.h*o[0],w:s.w,h:s.h-s.h*o[0]-s.h*o[1],label:"even"}].map(t=>({...t,class:this._appendClass(t.label&&e.class?e.class+"_"+t.label:e.class,s.class)})))}}),this}class(s,a=!0){return this._data.slice(0).forEach((t,e)=>{t._=e=>!!t.class&&t.class.some(t=>t==e);e="function"==typeof s?s(e,t):s;t.class=a?this._appendClass(e,t.class):e}),this}out(){return this._data.map((t,e)=>({...this.cahiers.grid,type:"module",...t}))}}class S{constructor({start:t=0,name:e=null}={}){this.type="ramp",this.name=e,this.ratio=1,this.length=0,this.ramps=[],this.start=t,this.time=0,this.value=0,this.rid=-1,this.accumulator=0,this.enabled=!0}static iterate(t,e){if(t.type)return e(t);Object.values(t).forEach(t=>"ramp"===t.type?e(t):Object.values(t).forEach(t=>e(t)))}static disable(t){this.iterate(t,t=>t.disable())}static enable(t){this.iterate(t,t=>t.enable())}static loop(t,e){this.iterate(t,e)}static loopRamps(t,s){this.iterate(t,t=>t.ramps.forEach((t,e)=>s(t,e)))}__quart(t){return t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2}__linear(t){return t}__quint(t){return 1-Math.pow(1-t,5)}disable(){this.enabled=!1}enable(){this.enabled=!0}offset(s,e="p0"){let a=this.ramps.findIndex(t=>t.id==e);a<0||(this.ramps.forEach((t,e)=>{e>a&&(t.start+=s,t.end+=s),e==a&&(t.end+=s,t.duration+=s)}),this.length+=s)}add(t,e,{callback:s=()=>!1,easing:a="quartic",id:i=null}={}){return this.ramps.push({id:0==this.ramps.length?"p0":i,amount:t,start:this.length,end:this.length+e,duration:e,callback:s,easing:{quartic:this.__quart,linear:this.__linear,quintic:this.__quint}[a]}),this.length+=e,this}wait(t,e){return this.add(0,t,e)}a(t,e,s=()=>!1){return this.add(t,e,s)}w(t,e=()=>!1){return this.add(0,t,e)}run(){this.time=(this.time+ +this.ratio)%this.length;var t=this.ramps.findIndex(t=>this.time>=t.start&&this.time<t.end);t!=this.rid&&(this.accumulator+=this.value,0<=this.rid&&this.enabled&&this.ramps[this.rid].callback(),this.rid=t);let e=this.ramps[t];return this.value=e.easing((this.time-e.start)/e.duration)*e.amount,this.enabled?parseFloat((this.value+this.start+this.accumulator).toFixed(4)):0}}const a=(i,t=!1)=>{const{cahiers:r,cycles:e,hash:l}=i;r.debug=e.debug=i.debug;const o={colormode:21,scrollmode:"tri3N",reload:t,offset:[0,0],transistion:-1},n=(t=0,e=1)=>i.random.float()*(e-t)+t,a=(t=0,e=1)=>Math.floor(i.random.float()*(e-t)+.5+t),d=(t,e=0,s=1)=>(l[t]*(s-e)+e).toFixed(4),c=(t,e=0,s=1)=>Math.floor(l[t]*(s-e)+.5+e),h=Math.PI,u=(t,e)=>r.afh(e,t.m.h),p=(t,e)=>h-r.afh(.5*t.m.h+e,t.m.h),m=(t,e)=>r.afw(e,t.m.w),b=(t,e)=>h-r.afw(.5*t.m.w+e,t.m.w),y=(t=50,e=255)=>"rgb("+n(t,e)+",0,0)",f=(t=50,e=255)=>"rgb(0,"+n(t,e)+",0)",[g,x,w]=["#ff0000","#00ff00","#000000"],[_,v]=["#880000","#005500"],k={alt:{topbottom:(t=[c(10),c(12)])=>({top:{start:t[0],end:1-t[0]},bottom:{start:t[1],end:1-t[1]},left:{start:0,end:0},right:{start:0,end:0}}),leftright:(t=[c(10),c(12)])=>({top:{start:0,end:0},bottom:{start:0,end:0},left:{start:t[0],end:1-t[0]},right:{start:t[1],end:1-t[1]}})},full:{topbottom:{top:{start:1,end:1},bottom:{start:1,end:1},left:{start:0,end:0},right:{start:0,end:0}},leftright:{top:{start:0,end:0},bottom:{start:0,end:0},left:{start:1,end:1},right:{start:1,end:1}}},fit:{top:{start:0,end:0},bottom:{start:0,end:0},left:{start:0,end:0},right:{start:0,end:0}},loop:(t=c(10))=>({top:{start:t,end:1-t},bottom:{start:1-t,end:t},left:{start:1-t,end:t},right:{start:t,end:1-t}})},E=[[1,4],[2,3]][c(19)],T=new s(r,n),R={reset:{padding:()=>!1,gradient:()=>!1,stripes:()=>!1},thinlines:{angle:2.5,ext:k.full.leftright,stripes:()=>!1,padding:()=>!1,palette:()=>(r.i.side-1==E[0]||r.i.side-1==E[1]?f:y)(100)}};if(r.grid.fullflip=!!c(27)&&"y",r.grid.padding=i.static?{x:.015,y:.015}:{x:.025,y:.025},"layers"===i.style&&(o.scrollmode=.3<d(28)?"tri2I":"tri3N",R.hoist={name:"hoist",ch:{variations:{color:()=>x,spacing:()=>8}},style:t=>({rows:{...R.reset,background:.3<n()&&"#111100",angle:.75<c(18)?.1:c(10)?3:2.8,palette:()=>[f(180,230),_,y(100,230),!1][r.i.side-1],ext:k.full.topbottom},grad:{gradient:()=>2==r.i.side&&"#220000"},rows_even:{angle:.75<c(18)?3:.1},slices_odd:{...R.thinlines},stripes_odd:{stripes:()=>.6<n()&&1==r.i.side}})},R.neon={name:"neon",ch:R.hoist.ch,style:t=>({rows:{...R.reset,angle:u(t,r.i.piece%2?.16:.32),palette:()=>[[x,_,!1,!1],["#005500",g,!1,!1]][r.i.piece%2][r.i.side-1],ext:k.full.topbottom,background:.8<n()?.5<n()?y():x:(r.i.piece%2==1?y:f)(60,70)}})},R.cross={name:"cross2",ch:{variations:{color:()=>g,spacing:()=>[5,9][a()]}},style:t=>({rows:{...R.reset,ext:k.full.topbottom,angle:b(t,.08),padding:t=>!1,palette:()=>[g,x,_,_][r.i.side-1]},slices_odd:{...R.thinlines},stripes_even:{},rows_even:{angle:p(t,.08)},grad:{stripes:()=>4==r.i.side}})},r.variants=R[i.substyle],r.grid.data=T.class("rows").subs({m:5,y:[[n(.6,.7),n(.1,.2)],[n(.1,.25),n(.1,.25)],[n(.1,.2),n(.6,.7)]][a(0,2)],class:"rows"}).subs((t,e)=>({m:1,x:[n(.6,.85),n(.15,.4)]["odd"==e.label?c(20):1-c(20)]})).subs(t=>({m:4,x:[n(.03,.1),n(.03,.05)],class:"slices"})).subs((t,e)=>e._("slices_odd")&&.5<n()?{m:[2,5][a()]}:{m:0}).subs((t,e)=>e._("slices_even")&&6<e.w?{m:1,x:.2,class:"stripes"}:{m:0}).subs((t,e)=>e._("slices_even")&&.4<n()?{m:2,y:.1}:{m:0}).class((t,e)=>6<e.w?"grad":null).out()),"lanes"===i.style){o.scrollmode=c(20)?"tri3N":"tri3I",o.transistion=-1,R.lanes={name:"lanes",ch:{grid:{padding:i.static?{x:.015,y:0}:{x:.025,y:0}},variations:{color:()=>.5<n()?g:v}},style:t=>({base:{...R.reset,palette:()=>(r.i.side-1==E[0]||r.i.side-1==E[1]?f:y)(100)},base_even:{angle:3.1,ext:k.full.leftright,background:"#002200"},cols_odd:{...R.thinlines},stripes:{angle:h,background:[x,!1][a()],stripes:()=>!0},base_odd:{angle:1.8,...c(10)&&{palette:()=>_,background:g},...!c(10)&&{palette:()=>[g,x][c(22)],background:"#660000"},ext:k.full.topbottom,padding:()=>!1},...s.isDark&&{base_even:{angle:p(t,.06),ext:k.full.leftright,palette:()=>.3<n()?"#112200":"#660000",background:y(120,240)},base_odd:{angle:1.8,ext:k.full.leftright,palette:()=>c(28)?"#660000":x,background:c(28)?x:"#660000"}}})},r.variants=R[i.substyle],r.grid={...r.grid,...r.variants.ch.grid};let s={};s.isDark=.7<d(18),s.columns=n()>(s.isDark?.75:.6)?[0,0]:.5<n()?[0,n(.05,.2)]:[n(.05,.2),0],s.hasBorder=.3<d(28);let t=T.class("base");t.subs({m:1,x:.5}).subs(t=>({m:4,x:t%2?s.columns:[s.columns[1],s.columns[0]],class:"base"})).subs((t,e)=>e._("base_even")?s.hasBorder?{m:4,x:[.24/e.w,.24/e.w],class:"cols"}:{m:0,class:"cols_even"}:{m:0}).subs({m:5}).subs((t,e)=>e._("cols_even")?{m:5,class:"rows"}:{m:2,y:n(.7,.9)}).class((t,e)=>e._("rows_odd")&&e.h<1?"stripes":null),r.grid.data=t.out()}if("tiles"===i.style){o.scrollmode=c(20)?"tri2N":"tri3N",R.tiles={name:"tiles",ch:{variations:{color:()=>c(11)?x:g,spacing:()=>6}},style:t=>({base:{...R.reset,ext:k.full.leftright,angle:h},type_0:{palette:()=>_},type_1:{palette:()=>["#00cc00","#ff0000"][r.i.piece%2==c(18)?1:0]},divided_odd:{palette:()=>"#660000"},divided_even:{palette:()=>c(16)?g:"#00cc00"},type_2:{palette:()=>["#a40000","#00a400"][r.i.piece%2==c(18)?1:0]},type_3:{palette:()=>"#660000"},stripes_odd:{stripes:()=>!0,background:_}
const shadersSource = {"cy_display":{"frag":"precision mediump float;uniform vec2 u_resolution;uniform sampler2D u_texture;void main(){gl_FragColor=vec4(texture2D(u_texture,gl_FragCoord.st/u_resolution).rgb,1.);}"},"cy_distort":{"frag":"#extension GL_OES_standard_derivatives:enable\nprecision highp float;uniform sampler2D u_texture;uniform vec2 u_resolution,u_offset;uniform vec3 u_color;uniform float u_time,u_amount,u_freq,u_r[6];const vec3 i=vec3(0.),j=vec3(1.);vec2 k(vec2 d,float a){float b=sin(a),c=cos(a);mat2 e=mat2(c,-b,b,c);return e*d;}float g(float b,float c,float d){float a=mod((b+d)*c,1.);a=cos(a*3.141593*2.)*.5+.5;return a;}float l(float b,float c,float d){float a=mod((b+d)*c,1.);a=abs(a-.5)*2.;return a;}vec2 m(vec2 a){float b=l(a.y,u_freq,0.);return mod(a+vec2(0.,b*u_amount)+vec2(u_r[1],u_r[0])+u_offset,vec2(1.));}float o(vec2 a,float b){float d=sin(b)*.5+.5,e=cos(b)*.5+.5,c=clamp(length(vec2(a.x-d,a.y-e)),0.,1.);c=smoothstep(0.,1.,c);return 1.-c;}float p(float d,float c){float a=c,b=c,e=pow(a+b,a+b)/(pow(a,a)*pow(b,b));return e*pow(d,a)*pow(1.-d,b);}vec3 h(vec3 c,vec3 d,float e){const mat3 a=mat3(.412166,.211859,.08831,.536275,.680719,.281847,.051458,.107407,.630261),q=mat3(4.076725,-1.268144,-.004112,-3.307217,2.609332,-.703476,.230759,-.341134,1.706863);vec3 f=pow(a*c,vec3(.333333)),n=pow(a*d,vec3(.333333)),b=mix(f,n,e);return q*(b*b*b);}float r(float b){vec2 a=gl_FragCoord.xy/u_resolution.xy-.5+vec2(.015,0.);a=a*vec2(.95,.95)+.5,a*=1.-a;return pow(a.x*a.y*12.,b+.1);}void main(){float e=u_time*.2;vec3 f=u_color;vec2 a=gl_FragCoord.xy/u_resolution.xy;vec3 c=texture2D(u_texture,m(a)).rgb;float b[4];b[0]=p(mod(a.y,1.),1.5),b[1]=o(a,0.),b[2]=g(k(a,g(a.y,.2,e*-.1)).x,1.,e*.5)*.7+.3,b[3]=g(k(a,g(a.x,.2,(1.57+e)*.1)).y,1.,e*.5)*.7+.3;vec3 d=i;d+=c.r*.8*h(f,j,b[3]),d+=c.g*.8*h(f,j,b[2]),d-=(1.-c.r-c.b-c.g)*h(f,i,b[1])*.3,d*=h(1.-f,j,r(.1)*1.3),gl_FragColor=vec4(d,1.);}"},"cy_feedback":{"frag":"#extension GL_OES_standard_derivatives:enable\nprecision highp float;uniform sampler2D u_original,u_loop;uniform vec3 u_opacity;uniform vec2 u_resolution,u_scale,u_offset;uniform float u_time,u_brightness,u_contrast,u_random,u_r[8];vec3 j(vec3 a,float b,float c){return (a-.5)*c+.5+b;}vec3 h(vec2 a,vec2 c,sampler2D d){vec3 b=vec3(0.);b+=texture2D(d,c+vec2(-1.*a.x,0.*a.y)).rgb,b+=texture2D(d,c+vec2(0.*a.x,-1.*a.y)).rgb,b+=texture2D(d,c+vec2(0.*a.x,0.*a.y)).rgb,b+=texture2D(d,c+vec2(0.*a.x,1.*a.y)).rgb,b+=texture2D(d,c+vec2(1.*a.x,0.*a.y)).rgb,b*=.2;return b;}float i(vec2 a,float b){float c=length(vec2(a.x+.25-(cos(b)*.5+.5)*1.5,a.y+.25-(sin(b)*.5+.5)*1.5));return clamp(1.-smoothstep(0.,1.,c),0.,1.);}float k(float c,float b,float a){a=abs(a-c);if(a>b)return 0.;a/=b;return 1.-a*a*(3.-2.*a);}void main(){float b=u_time;vec2 a=gl_FragCoord.st/u_resolution,e=1./u_resolution;float f=clamp(u_resolution.y/742.,1.,2.);vec2 c=a;c-=.5,c*=u_scale,c+=u_offset*e*f*k(cos(b*.2)*.5+.5,(cos(b*.5)*.5+.5)*.3+.3,a.x),c+=.5;vec3 g=h(e*f,c,u_loop).rgb*(u_opacity+vec3(u_r[2],u_r[3],u_r[4]));float l=cos(a.x*3.14+b*35.)*-.05,m=i(a,u_random+b*.2);g=j(g,u_brightness+u_r[0]+u_r[5]*(m+l),u_contrast+u_r[1]);float d=abs(a.x-.5)*abs(a.x-.5);d=d*.25+.22;float n=cos(a.x*6.28*u_r[7])*.5+.5;d-=n*.1*u_r[6],gl_FragColor=vec4(mix(g,texture2D(u_original,a).rgb,vec3(d)),1.);}"},"cy_noise":{"frag":"precision mediump float;uniform vec2 u_resolution;vec2 d(vec2 b){vec3 a=fract(vec3(b.xyx)*vec3(.1031,.103,.0973));a+=dot(a,a.yzx+33.33);return fract((a.xx+a.yz)*a.zy);}float e(vec2 a){const vec2 c=1.-vec2(.754878,.56984);vec2 b=floor(a/4.);float f=mod(b.x+b.y,2.);a=mix(a,a.yx,f);float g=fract(dot(c,a)+d(b).x);return g;}void main(){vec2 a=gl_FragCoord.xy/u_resolution.xy*vec2(u_resolution.x/u_resolution.y,1.)*u_resolution.x*2.;gl_FragColor=vec4(vec3(e(a)*.1+.5),1.);}"},"cy_post":{"frag":"precision mediump float;uniform vec2 u_resolution;uniform sampler2D u_texture,u_noise;uniform vec3 u_color;float e(float a,float b){return a<.5?2.*a*b:1.-2.*(1.-a)*(1.-b);}vec3 g(vec3 a,vec3 b){return vec3(e(a.r,b.r),e(a.g,b.g),e(a.b,b.b));}vec3 h(vec3 a,vec3 c,float b){return g(a,c)*b+a*(1.-b);}float i(float a){return (a-1.)*-1.;}float j(vec2 a){a=(a-.5)*vec2(.97,.97)+.5,a*=1.-a;return i(pow(a.x*a.y*12.,.1)*1.2)*.5;}vec3 f(vec2 a,vec2 c,sampler2D d){vec3 b=vec3(0.);b+=texture2D(d,c+vec2(-1.*a.x,0.*a.y)).rgb,b+=texture2D(d,c+vec2(0.*a.x,-1.*a.y)).rgb,b+=texture2D(d,c+vec2(0.*a.x,0.*a.y)).rgb,b+=texture2D(d,c+vec2(0.*a.x,1.*a.y)).rgb,b+=texture2D(d,c+vec2(1.*a.x,0.*a.y)).rgb,b*=.2;return b;}float k(float b,float a){a=min(.99999,max(1e-5,a));return b<=.5?pow(2.*b,1./(1.-a))/2.:1.-pow(2.*(1.-b),1./(1.-a))/2.;}void main(){vec2 b=gl_FragCoord.st/u_resolution,c=1./u_resolution;vec3 a=f(c,b,u_texture);a.r=mix(a.r,smoothstep(0.,1.,a.r),.5),a.g=mix(a.g,smoothstep(0.,1.,a.g),.5),a.b=mix(a.b,smoothstep(0.,1.,a.b),.5);float d=dot(texture2D(u_noise,b).rgb,vec3(.299,.587,.114));a=h(a,vec3(k(d,.126)),1.),a=max(a,j(b)*u_color),gl_FragColor=vec4(a,1.);}"}}; (()=>{"use strict";function r(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}class t{constructor(t,e,s,a){r(this,"draw",()=>(this.i={striped:0,piece:0,side:0},this.ctx.fillStyle=this.background,this.ctx.fillRect(0,0,this.width,this.height),this.drawGrid(this.drawStyle),this.canvas)),r(this,"afh",(t,e)=>!!e&&Math.abs(-1*Math.asin((t/.5-e)/e))),r(this,"afw",(t,e)=>!!e&&Math.abs(-1*Math.acos((t/.5-e)/e))),r(this,"drawGrid",(s,t={x:0,y:0,w:this.width,h:this.height,i:0})=>{const a={...this.grid,steps:{x:12,y:12},module:{w:t.w/12,h:t.h/12},data:this.grid.data};a.fullflip&&("y"===a.fullflip&&(a.data=a.data.map(t=>({...t,y:12-t.y,h:-1*t.h,padding:{x:t.padding.x,y:-1*t.padding.y}}))),"x"===a.fullflip&&(a.data=a.data.map(t=>({...t,x:12-t.x,w:-1*t.w,padding:{x:-1*t.padding.x,y:t.padding.y}})))),a.data.forEach(t=>{var e=t.padding||{x:0,y:0};s({m:{w:Math.abs(t.w),h:Math.abs(t.h),x:t.x,y:t.y,class:t.class,label:t.label||"module"},x:t.x*a.module.w,y:t.y*a.module.h,w:(t.w-e.x)*a.module.w,h:(t.h-e.y)*a.module.h})})}),r(this,"drawStyle",(t={m:null,x:0,y:0,w:this.width,h:this.height})=>{const e={};t={...t,hasClass:e=>!!t.m.class&&t.m.class.some(t=>t==e)},this.each(t),e.angle="function"==typeof this.style.angle?this.style.angle(t):this.style.angle,e.padding={top:this.style.padding("top"),left:this.style.padding("left"),right:this.style.padding("right"),bottom:this.style.padding("bottom")},e.extension=this.style.extension(),e.position=t,e.variations=this.style.variations||{type:"none"},"function"==typeof this.style.background&&(e.backgroundColor=this.style.background(),e.backgroundColor&&(this.ctx.fillStyle=e.backgroundColor,this.ctx.fillRect(e.position.x,e.position.y,e.position.w,e.position.h)));var s=this._getPointsOnCircle(e.angle,e.padding,e.position);this.i.side=0,this.i.piece++;for(const a in s.rect)this.i.side++,e.start=s.rect[a].start[e.extension[a].start],e.end=s.rect[a].end[e.extension[a].end],"stripes"===e.variations.type&&e.variations.density(t)&&this._drawRectStripedByCoords(e.start,e.end)||this._drawRectFillByCoords(e.start,e.end);this.debug&&this._drawDebugRect(s.bounds.tl.x,s.bounds.tl.y,s.bounds.width,s.bounds.height)}),r(this,"_drawRectStripedByCoords",(t,e)=>{const i=this.ctx,r=this.style.variations,l={w:e[0].x>t[0].x?e[0].x-t[0].x:t[0].x-e[0].x,h:e[1].y>t[1].y?e[1].y-t[1].y:t[1].y-e[1].y,x:(e[0].x<t[0].x?e:t)[0].x,y:(e[1].y<t[1].y?e:t)[1].y};let o=this.style.palette();if(o="function"==typeof this.style.variations.color?this.style.variations.color():o,o){this.i.striped++,i.fillStyle=o,i.strokeStyle=i.fillStyle;let e,t,s=r.spacing?r.spacing():10,a=r.thickness?r.thickness({spacing:s}):5;if("horizontal"==r.orientation){s=Math.max(2,Math.floor(s*this.vw*.12)),a=Math.max(1,Math.floor(a*this.vw*.12)),e=Math.floor(l.w/s),t=l.w-e*s,s+=0<t?t/e:0;for(let t=0;t<e;t++)i.fillRect(l.x+s*t,l.y,a,l.h),i.strokeRect(l.x+s*t,l.y,a,l.h)}return!0}}),r(this,"_drawRectFillByCoords",(t,e,s=0)=>{var a=e[0].x-t[0].x,i=e[1].y-t[1].y;if(this.hideTinyRect&&(Math.abs(a)<5||Math.abs(i))<5)return!1;var r="function"==typeof this.style.palette&&this.style.palette();if(r){const l=this.ctx;l.fillStyle=r;e="function"==typeof this.style.gradient&&this.style.gradient();if(e){const o=l.createLinearGradient(t[0].x,t[1].y,t[0].x+a,t[1].y);o.addColorStop(0,r),o.addColorStop(1,e),l.fillStyle=o}l.strokeStyle=l.fillStyle,l.fillRect(t[0].x,t[1].y,a,i),l.strokeRect(t[0].x,t[1].y,a,i)}}),r(this,"_drawDebugRect",(t,e,s,a)=>{const i=this.ctx;i.strokeStyle="rgb(110, 110, 110)",i.strokeRect(t,e,s,a),i.beginPath(),i.moveTo(t,e),i.lineTo(s+t,a+e),i.moveTo(s+t,e),i.lineTo(t,a+e),i.stroke()}),r(this,"_getPointsOnCircle",(t,e={top:0,right:0,bottom:0,left:0},s={x:0,y:0,w:this.width,h:this.height})=>{const a=s.w,i=s.h,r=s.x,l=s.y,o=[];o[0]={x:.5*(a*Math.cos(-t)+a),y:.5*(i*Math.sin(-t)+i)},o[1]={x:a-o[0].x,y:o[0].y},o[2]={x:o[0].x,y:i-o[0].y},o[3]={x:a-o[0].x,y:i-o[0].y},o[4]={x:.5*(a*Math.cos(0)+a),y:.5*(i*Math.sin(3.14)+i)},o[5]={x:.5*(a*Math.cos(3.14)+a),y:.5*(i*Math.sin(3.14)+i)},o[6]={x:.5*(a*Math.cos(4.71)+a),y:.5*(i*Math.sin(4.71)+i)},o[7]={x:.5*(a*Math.cos(1.57)+a),y:.5*(i*Math.sin(1.57)+i)};const n={top:e.top?o[0].y:0,right:e.right?o[0].x:0,bottom:e.bottom?o[0].y:0,left:e.left?o[0].x:0},d=a/(a+n.right+n.left),c=i/(i+n.bottom+n.top),h=n.left||0,u=n.top||0;n.top*=c,n.bottom*=c,n.right*=d,n.left*=d;const p=n.left+r,m=n.top+l,b=a*d,y=i*c,f=o.map(t=>({x:(h+t.x)*d,y:(u+t.y)*c})).map(t=>({x:t.x+=r,y:t.y+=l}));f[8]={x:p-n.left,y:m-n.top},f[9]={x:p+b+n.right,y:m-n.top},f[10]={x:p-n.left,y:m+y+n.bottom},f[11]={x:p+b+n.right,y:m+y+n.bottom};const g={};return g.circle={tl:f[0],tr:f[1],bl:f[2],br:f[3],top:f[6],right:f[4],left:f[5],bottom:f[7],width:f[4].x-f[5].x,height:f[7].y-f[6].y},g.bounds={tl:f[8],tr:f[9],bl:f[10],br:f[11],top:{x:g.circle.top.x,y:f[8].y},right:{x:f[8].x,y:g.circle.right.y},left:{x:f[5].x,y:g.circle.left.y},bottom:{x:g.circle.bottom.x,y:f[10].y},width:f[9].x-f[8].x,height:f[11].y-f[9].y},g.rect={},g.rect.top={start:[[g.circle.tl,{x:g.circle.tl.x,y:g.bounds.tl.y}],[{x:g.bounds.tl.x,y:g.circle.tl.y},g.bounds.tl]],end:[[{x:g.circle.tr.x,y:g.bounds.top.y},g.circle.tr],[g.bounds.tr,{x:g.bounds.tr.x,y:g.circle.tr.y}]]},g.rect.bottom={start:[[{x:g.circle.bl.x,y:g.bounds.bl.y},g.circle.bl],[g.bounds.bl,{x:g.bounds.bl.x,y:g.circle.bl.y}]],end:[[g.circle.br,{x:g.circle.br.x,y:g.bounds.br.y}],[{x:g.bounds.br.x,y:g.circle.bottom.y},g.bo
This edition of video artworks is the result of my research in video art from the 60s and 70s, especially early analog video synthesizers. These were heavy hardware machines capable of generating shapes and patterns from the ground up, with no external visual input. How could these machines generate such complexity by just manipulating electronic voltage? I decided to investigate this process. Although with modern technologies, Spectron shares the procedural logic with its analog ancestors.
let shader={},gl,uniforms,attributes,values,time=0;const makeTable=e=>{e=e.substr(2);let r=[];for(let a=0;a<16;a++)r[a]=parseInt("0x"+(e.substr(a+8,1)+e.substr(a+24,1)+e.substr(a+40,1)),16)/4096;return r},init=()=>{shader={frag_code:spectronShader.fragment,vert_code:spectronShader.vertex},values=makeTable(tokenData.hash);let a=document.getElementsByTagName("canvas")[0];if(gl=a.getContext("webgl"),gl.canvas.width=window.innerWidth,gl.canvas.height=window.innerHeight,shader.frag=gl.createShader(gl.FRAGMENT_SHADER),gl.shaderSource(shader.frag,shader.frag_code),gl.compileShader(shader.frag),!gl.getShaderParameter(shader.frag,gl.COMPILE_STATUS))throw"Fragment shader:"+gl.getShaderInfoLog(shader.frag);if(shader.vert=gl.createShader(gl.VERTEX_SHADER),gl.shaderSource(shader.vert,shader.vert_code),gl.compileShader(shader.vert),!gl.getShaderParameter(shader.vert,gl.COMPILE_STATUS))throw"Vertex shader:"+gl.getShaderInfoLog(shader.vert);if(shader.prog=gl.createProgram(),gl.attachShader(shader.prog,shader.vert),gl.attachShader(shader.prog,shader.frag),gl.linkProgram(shader.prog),!gl.getProgramParameter(shader.prog,gl.LINK_STATUS))throw"Failed to link shaders:"+gl.getProgramInfoLog(shader.prog);gl.detachShader(shader.prog,shader.vert),gl.detachShader(shader.prog,shader.frag),gl.deleteShader(shader.frag),gl.deleteShader(shader.vert),gl.useProgram(shader.prog),uniforms={u_resolution:gl.getUniformLocation(shader.prog,"D"),u_time:gl.getUniformLocation(shader.prog,"m"),u_generating:gl.getUniformLocation(shader.prog,"I"),u_hash:gl.getUniformLocation(shader.prog,"c")},attributes={a_position:gl.getAttribLocation(shader.prog,"position")},shader.buffer=gl.createBuffer(),gl.bindBuffer(gl.ARRAY_BUFFER,shader.buffer),gl.bufferData(gl.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,1,1,-1,-1,-1]),gl.STATIC_DRAW),window.addEventListener("resize",function(){gl.canvas.width=window.innerWidth,gl.canvas.height=window.innerHeight}),render()},render=()=>{time+=.025,gl.uniform2f(uniforms.u_resolution,gl.canvas.width,gl.canvas.height),gl.uniform1f(uniforms.u_time,time),gl.uniform1f(uniforms.u_generating,0),gl.uniform1fv(uniforms.u_hash,values),gl.enableVertexAttribArray(attributes.a_position),gl.vertexAttribPointer(attributes.a_position,2,gl.FLOAT,!1,0,0),gl.viewport(0,0,gl.canvas.width,gl.canvas.height),gl.clearColor(0,0,0,0),gl.drawArrays(gl.TRIANGLES,0,6),requestAnimationFrame(render)},spectronShader={fragment:"precision mediump float;const vec3 x=vec3(.299,.587,.114);uniform vec2 D;uniform float m,I,c[32];float J(float a,float b,float d){return sin(6.28318*b*a+d);}float K(float a,float b,float d,float e,float g){return atan(J(a,b,d)*e)*.63662;}float o(vec2 a,float e,float b,float k){b*=.03;float g=mix(a.x,a.y,e),d=mod(g+b*.5,1.);d=max(2.*d-1.,0.);return 6.28318*k*(d-b);}float j(vec2 a,float d,float e,float k,float g){float b=mix(a.x,a.y,d);g/=e,b=K(e,b,k,g,0.)*.5+.5;return b;}float p(vec2 a,float d,float b,float k){b*=.03;float e=mix(a.x,a.y,d),g=mod(e+b*.5,1.);return .5+atan(sin(g*2.*3.14159)*120.)/3.14159;}float h(float a){return 1.-a;}float L(float a,float b){return a*b;}float M(float a,float b){return 1.-(1.-a)*(1.-b);}float E(float a,float b,float d){return mix(L(a,b),M(a,b),d);}vec3 l(in float a,in vec3 b,in vec3 d,in vec3 e,in vec3 g){return b+d*cos(6.28318*(e*a+g));}float n(float b,float a,float d){return b*(d-a)+a;}float i(float b,float a,float d){return floor(b*(d-a)+a+.5);}float f(float a){return floor(a+.5);}void main(){vec2 b=gl_FragCoord.st/D.xy;vec3 y,z,e;float d=f(c[10]),g=i(c[2],1.,35.),q=n(c[14],0.,.5)+m*(2./g),r=p(b,d,q,1.);vec2 A=vec2(j(b,d,i(c[1],2.,4.),o(b,d,q,g),50.*r+150./g*h(r)),j(b,h(d),i(c[3],1.,2.),f(c[14])*1.570795,180.));float k=i(c[5],1.,3.+f(c[14]-.45)*5.),s=-1.*(m/k),t=p(b,d,s,1.);vec2 u=vec2(j(b,h(d),i(c[4],1.,3.),0.,100.),j(b,d,i(c[6],1.,2.),o(b,d,s,k),80.*t+150./k*h(t)));vec3 a[4];float v=f((c[12]+c[15])*.5+.2);a[0]=mix(vec3(.1),vec3(.4),v),a[1]=mix(vec3(.9),vec3(.6),v),a[2]=mix(vec3(.3),vec3(.6),v),a[3]=mix(mix(vec3(.92,.99,.98),vec3(1.02,.95,.96),f(c[11])),mix(vec3(.82,.7,.68+n(c[5],0.,.07)),vec3(.8,.81,.68),f(c[11]-.25)),v);float w=mix(j(b,0.,i(c[8],1.,2.),m*-.2,80.),1.,f(c[12]-.4));vec3 F=l(c[7],a[0],a[1],a[2],a[3])*w,G=l(c[6],a[0],a[1],a[2],a[3]),B=l(c[9],a[0],a[1],a[2],a[3])*h(w),C=l(c[2],a[0],a[1],a[2],a[3]);y=E(A.x,A.y,f(c[11]))*F,B*=h(dot(x,F)),y+=h(A.y)*B*B,z=E(u.y,u.x,f(c[3]+.1))*G,C*=h(dot(x,G)),z+=mix(u.y,u.y,f(c[7]))*C*C;float H=j(b,mix(h(d),d,f(c[12]-.35)),n(c[11],.5,2.),1.570795+f(c[12])*.785397,120.);e=y*H+z*h(H),e=mix(e,vec3(dot(e,x))*.5,I),e*=(.65+.35*sqrt(4.*b.y*(1.-b.y)))*.95,gl_FragColor=vec4(e,1.);}",vertex:"attribute vec4 position;void main() { gl_Position = position;}"};document.addEventListener("DOMContentLoaded",init);