Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.
18:00
9024 f8dd 500

Voltra, an audiovisual treat in 1 kilobyte (!) of Javascript code, without any library or dependencies. Made by p01. Run the demo here. Full source code:

c.style.width=c.style.height=`100%`,c.style.position=`fixed`,document.body.style.background=`radial-gradient(#023,#000)`,document.body.style.font=`0 a`;for(x=0;x<64;x++)c.width=c.height=12,b.shadowBlur=4,b.fillStyle=b.shadowColor=x%11?`#cff`:`#f26`,b.globalAlpha/=x<40?1:4,b.fillText(`  V0LTRA ][ R1BB0N  `[x]||S(9584+x),2,8),c[x]=b.createPattern(c,`repeat`);c.height=384,g=new AudioContext,p=g.createScriptProcessor(2048,c.style.top=c.style.left=a=m=0,1),p.connect(g.destination),p.onaudioprocess=o=>{for(u=o.outputBuffer.getChannelData(0),d=Math.sin(m/32),e=Math.cos(4*Math.cos(4*d)),f=Math.sin(4*Math.cos(4*d)),c.width=12*64,c.style.transform=`perspective(64vh)rotate3d(0,1,${f},${m/8}deg)scale(${1+(m/96)**64})`;a/64+64<8*m;b[i+64]=1&(-4&d*64)>>(4*b[i-1]+b[i]*2+b[i++])^1.01*Math.random())i=a++%2048;for(i=y=0;y<32;y++)for(x=0;x<64;x++)m+=1/g.sampleRate,j=2^y/5|1^x/20?(n=x/8*e-4*e-y/8*f+4*f+u[i]/4,o=x/8*f-4*f+y/8*e-4*e+16*d-8,n=0<o&[n%o,n&o+e*m,m+b[384|n+(o<<6)],n%o][3&m/24],b[i]|n&&(y^x&m)%16+40-20*n):12==y&&x<4*m?x-20:0,j&&b.fillRect(12*x,12*y,12,12,b.fillStyle=c[j^1.01*Math.random()]),u[i++]=(j/8+`9584`[3&m/24]*8)*m%1*d*d;b.globalAlpha/=x<40?1:4,b.drawImage(c,12*24,12*12,12,12,0,12*12,12*64,12),b.drawImage(c,12*12,12*24,12*3,24,0,0,12*64,384),3&m/24&&(h=speechSynthesis.speak(h,h.rate=0))};h=new SpeechSynthesisUtterance(`voltra`)

Don't be the product, buy the product!

Schweinderl