0xb033…e32e

All memos sent from and to 0xb033…e32e.

Beatboxes are fully immersive, virtual reality, audiovisual generative art on the Ethereum blockchain. Beatboxes consist of 841 generated unique rooms where you can fully immerse yourself with any virtual reality device. You can also enjoy them from your pc in a more conventional way. Beatboxes are our second experimental piece of art, following the successful release of Unigrids. The goal with this collection was to create an environment where you can escape your reality for a moment and enjoy your unique piece of art while stimulating the most senses possible. You can open your eyes inside your unique art piece and explore by looking around and listening as you enjoy something you own. In live view use arrows to move around and spacebar to start the music and animation. Visit beatboxes.io to browse all Beatboxes more easily, Have fun! *note that Beatboxes are using aframe which is currently not optimized for ios mobile and safari browser.
Beatboxes are fully immersive, virtual reality, audiovisual generative art on the Ethereum blockchain. Beatboxes consist of 841 generated unique rooms where you can fully immerse yourself with any virtual reality device. You can also enjoy them from your pc in a more conventional way. Beatboxes are our second experimental piece of art, following the successful release of Unigrids. The goal with this collection was to create an environment where you can escape your reality for a moment and enjoy your unique piece of art while stimulating the most senses possible. You can open your eyes inside your unique art piece and explore by looking around and listening as you enjoy something you own. In live view use arrows to move around and spacebar to start the music and animation. Visit beatboxes.io to browse all Beatboxes more easily, Have fun! *note that Beatboxes are using aframe which is currently not optimized for ios mobile and safari browser. [ This artwork will be released via Dutch Auction, the price levels for this auction will be dropping every 5min: 14.20Ξ > 9.60Ξ > 6.90Ξ > 4.20Ξ > 2.5Ξ > 1.75Ξ > 1.25Ξ > .75Ξ > .5 > .25 (resting price). We fully expect NO ONE to buy our project at the starting price. We view it as an unrealistic starting point. Please do not FOMO into something you don't want or overpay for something you do. ]
Beatboxes are the first fully immersive, virtual reality, audiovisual generative art on the Ethereum blockchain. Beatboxes consist of 841 generated unique rooms where you can fully immerse yourself with any virtual reality device. You can also enjoy them from your pc in a more conventional way. Beatboxes are our second experimental piece of art, following the successful release of Unigrids. The goal with this collection was to create an environment where you can escape your reality for a moment and enjoy your unique piece of art while stimulating the most senses possible. You can open your eyes inside your unique art piece and explore by looking around and listening as you enjoy something you own. In live view use arrows to move around and spacebar to start the music and animation. Visit beatboxes.io to browse all Beatboxes more easily, Have fun! *note that Beatboxes are using aframe which is currently not optimized for ios mobile and safari browser. [ This artwork will be released via Dutch Auction, the price levels for this auction will be dropping every 5min: 14.20Ξ > 9.60Ξ > 6.90Ξ > 4.20Ξ > 2.5Ξ > 1.75Ξ > 1.25Ξ > .75Ξ > .5 > .25 (resting price). We fully expect NO ONE to buy our project at the starting price. We view it as an unrealistic starting point. Please do not FOMO into something you don't want or overpay for something you do. ]
let e,t,o,r,i,n,s,a,h,l,c,p,d,u,f,m,v,g,b,y,C,x,w,F="setAttribute",S="createElement",E=tokenData.hash,D=20,k=[[0,1,3,5,8,-2,-4],[0,1,-2],[0]],U=[[0,3,5,7,10,12,-2],[0,1,5,7],[0,5,7,8,10],[0]],A=[0,3,5,7,10],N=[0,3,7,8,-4];function q(){m.toggle()}class B{constructor(){this.buffer=e.createBuffer(2,3*r,r),this.generate()}generate(){for(let e=0;e<2;e++){let t=this.buffer.getChannelData(e),o=t.length;for(let e=0;e<o;e++)t[e]=g.rangeFloat(-1,1)}}}class M{constructor(e,t){this.value=e,this.time=t}}class R{constructor(e,t,o){this.points=e,this.depth=o||1,this.value=[t],t.length&&(this.value=t),this.length=this.getLength(),this.valueNo=this.value.length}getLength(){let e=0,t=this.points.length;for(let o=0;o<t;o++)e+=this.points[o].time;return e}set(t){this.value.cancelScheduledValues(e.currentTime),this.value.value=t}trigger(e,t){this.attack(e,t||1),this.release(e+this.length)}attack(e,t){for(let o=0;o<this.valueNo;o++){this.value[o].cancelScheduledValues(e),this.value[o].setValueAtTime(this.points[0].value*t,e);let r=e,i=this.points.length;for(let e=1;e<i;e++){let i=this.points[e];r+=i.time;i.value;this.value[o].linearRampToValueAtTime(i.value*t,r);let n=this.points[e+1];if(this.depth>1&&n){let e=1/this.depth,s=i.value;for(let i=1;i<this.depth;i++)s=W(s,n.value,.5),this.value[o].linearRampToValueAtTime(s*t,r+W(0,n.time,e*i))}}}}release(e){let t=e+.005;for(let o=0;o<this.valueNo;o++)this.value[o].cancelScheduledValues(e),this.value[o].linearRampToValueAtTime(0,t)}preStop(e,t){let o=e-(t=t||.05);for(let e=0;e<this.valueNo;e++)this.value[e].cancelScheduledValues(o),this.value[e].setTargetAtTime(0,o,t/3)}softStop(e,t){t=t||.05;for(let o=0;o<this.valueNo;o++)this.value[o].cancelScheduledValues(e),this.value[o].setTargetAtTime(0,e,t/3)}}class I{constructor(){this.ampNodes=[new M(1,0),new M(1,.05),new M(0,.16)],this.pitchNodes=[new M(200,0),new M(90,.02),new M(30,.16)],this.length=H(this.ampNodes)}trigger(t){this.ampEnv&&this.ampEnv.preStop(t);let o=e.createGain(),r=e.createOscillator();r.connect(o),o.connect(n),r.start(t),r.stop(t+this.length+.1),this.ampEnv=new R(this.ampNodes,o.gain,5),this.pitchEnv=new R(this.pitchNodes,r.frequency,5),this.ampEnv.trigger(t,.7),this.pitchEnv.attack(t,1)}}class j{constructor(){let e=g.rangeFloat(.05,1.5);this.ampNodes=[new M(1,0),new M(1,.6),new M(0,e)],this.pitchNodes=[new M(3800,0),new M(80,.02),new M(0,.1)],this.length=H(this.ampNodes),this.volume=.01}trigger(t,o){o=o||60,this.ampEnv1&&this.ampEnv1.preStop(t,.01),this.ampEnv2&&this.ampEnv2.preStop(t,.01);let r=e.createGain(),i=e.createGain(),s=e.createOscillator(),a=e.createOscillator(),h=e.createOscillator();s.frequency.value=o,a.frequency.value=o/2,h.frequency.value=4*o,h.type="triangle",s.connect(r),a.connect(r),h.connect(i),r.connect(n),i.connect(n),s.start(t),s.stop(t+this.length+1e-4),a.start(t),a.stop(t+this.length+1e-4),h.start(t),h.stop(t+this.length+1e-4),this.ampEnv1=new R(this.ampNodes,r.gain,5),this.ampEnv2=new R(this.ampNodes,i.gain,5),this.pitchEnv=new R(this.pitchNodes,[s.detune,a.detune,h.detune],5),this.ampEnv1.attack(t,.7*.7),this.ampEnv2.attack(t,.7*.7*this.volume),this.pitchEnv.attack(t,1)}}class O{constructor(){this.ampNodes=[new M(1,0),new M(0,.005)],this.pitchNodes=[new M(9e3,0),new M(g.range(2e3,5e3),.003)],this.length=H(this.ampNodes),this.volume=.5,this.hp=e.createBiquadFilter(),this.hp.type="highpass",this.hp.frequency.value=g.range(1e4,10500),this.hp.connect(o),this.out=new L,this.out.connect(this.hp),this.out.set(g.rangeFloat(-.8,.8))}trigger(t){this.ampEnv&&this.ampEnv.preStop(t,.004);let o=e.createGain(),r=e.createOscillator();r.connect(o),o.connect(this.out.panner),r.start(t),r.stop(t+this.length+.001),this.ampEnv=new R(this.ampNodes,o.gain,4),this.pitchEnv=new R(this.pitchNodes,r.frequency,4),this.ampEnv.trigger(t,.7*this.volume),this.pitchEnv.attack(t,1)}}class T{constructor(){let t=g.rangeFloat(.005,.01);this.ampNodes=[new M(1,0),new M(0,t)],this.length=H(this.ampNodes),this.volume=.4,this.hp=e.createBiquadFilter(),this.hp.type="highpass",this.hp.frequency.value=g.range(1e4,14e3),this.hp.connect(o),this.out=new L,this.out.connect(this.hp),this.out.set(g.rangeFloat(-.8,.8))}trigger(t){this.ampEnv&&this.ampEnv.preStop(t,.005);let o=e.createGain(),r=e.createBufferSource();r.buffer=a.buffer,r.connect(o),o.connect(this.out.panner),r.start(t),r.stop(t+this.length+.1),this.ampEnv=new R(this.ampNodes,o.gain,3),this.ampEnv.trigger(t,.7*this.volume)}}class z{constructor(){this.ampNodes=[new M(1,0),new M(0,.03)],g.percent(40)&&(this.ampNodes=[new M(1,0),new M(.02,.021),new M(1,0),new M(.02,.021),new M(1,0),new M(0,.05)]),this.length=H(this.ampNodes),this.hf=g.range(1500,3100),this.lf=g.range(1e3,1400)}trigger(t){this.ampEnv&&this.ampEnv.preStop(t);let r=e.createGain(),i=e.createBufferSource(),n=e.createBiquadFilter(),s=e.createBiquadFilter();n.type="lowpass",s.type="highpass",n.frequency.value=this.hf,s.frequency.value=this.lf,n.Q.value=1,s.Q.value=5,i.buffer=a.buffer,i.connect(n),n.connect(s),s.connect(r),r.connect(o),i.start(t),i.stop(t+this.length+.1),this.ampEnv=new R(this.ampNodes,r.gain,4),this.ampEnv.trigger(t,.7)}}class P{constructor(){this.ampNodes=[new M(0,0),new M(1,C/2/1e3),new M(0,.001)],this.length=H(this.ampNodes)}trigger(t){this.ampEnv&&this.ampEnv.preStop(t);let r=e.createGain(),i=e.createBufferSource(),n=e.createBiquadFilter();n.type="bandpass",n.frequency.value=9e3,i.buffer=a.buffer,i.connect(n),n.connect(r),r.connect(o),i.start(t),i.stop(t+this.length+.1),this.ampEnv=new R(this.ampNodes,r.gain,1),this.ampEnv.trigger(t,.7)}}class G{constructor(){let e=g.rangeFloat(0,.01),t=g.rangeFloat(.01,.35);g.percent(2)&&(e=g.rangeFloat(.05,.15),t=g.rangeFloat(.01,.02)),this.volume=g.rangeFloat(.05,.05),this.f1=g.rangeFloat(500,600*(v.leadOctave+1)),this.q1=g.rangeFloat(.5,20),this.type=g.item(["sine","sawtooth","triangle","square"]),this.ampNodes=[new M(0,0),new M(1,e),new M(0,t)],this.pitchNodes=[new M(this.f1*g.rangeFloat(.25,3),0),new M(this.f1,.03)],this.length=H(this.ampNodes),this.out=new L,this.out.connect(o),this.out.set(g.rangeFloat(-.8,.8))}trigger(t,o){o=o||60,this.ampEnv&&this.ampEnv.softStop(t,.01);let r=e.createGain(),i=e.createOscillator(),n=e.createBiquadFilter();i.type=this.type,i.frequency.value=o,n.Q.value=this.q1,i.connect(n),n.connect(r),r.connect(this.out.panner),i.start(t),i.stop(t+this.length+1e-4),this.ampEnv=new R(this.ampNodes,r.gain,6),this.filterEnv=new R(this.pitchNodes,n.frequency,4),this.ampEnv.attack(t,.7*this.volume),this.filterEnv.attack(t,1)}}class V{constructor(){let t=g.rangeFloat(0,.01),r=g.rangeFloat(.01,.7),i=!1;g.percent(20)&&(t=g.rangeFloat(.01,.5),r=g.rangeFloat(0,.02),i=!0),this.volume=g.rangeFloat(.9,1),this.q1=g.rangeFloat(50,800),g.percent(20)&&(this.q1=g.rangeFloat(12,20),this.volume=g.rangeFloat(.3,.4),i&&(this.volume=g.rangeFloat(.2,.3))),g.percent(30)&&(this.q1=g.rangeFloat(.1,1),this.volume=g.rangeFloat(.1,.2),i&&(this.volume=g.rangeFloat(.03,.05)),t>.06&&(t=.06),r=g.rangeFloat(.01,.06)),this.ampNodes=[new M(0,0),new M(1,t),new M(0,r)],this.length=H(this.ampNodes),this.hp=e.createBiquadFilter(),this.hp.type="highpass",this.hp.frequency.value=600,this.hp.connect(o),this.out=new L,this.out.connect(this.hp),this.out.set(g.rangeFloat(-.9,.9))}trigger(t,o){o=o||60,this.ampEnv&&this.ampEnv.softStop(t,.01);let r=e.createGain(),i=e.createBufferSource(),n=e.createBiquadFilter();n.type="bandpass",i.buffer=a.buffer,n.frequency.value=o,n.Q.value=this.q1,i.connect(n),n.connect(r),r.connect(this.out.panner),i.start(t),i.stop(t+this.length+1e-4),this.ampEnv=new R(this.ampNodes,r.gain,6),this.ampEnv.attack(t,.7*this.volume)}}class _{constructor(){let e=g.rangeFloat(.3,1);g.percent(40)&&(e=g.rangeFloat(.001,.02));let t=g.rangeFloat(.2,1.5);g.percent(40)&&(t=g.rangeFloat(1.5,4)),this.ampNodes=[new M(0,0),new M(1,e),new M(0,t)],this.length=H(this.ampNodes),this.volume=g.rangeFloat(.02,.03),this.type=g.item(["sawtooth","sine","triangle"]),"triange"==this.type&&(this.volume=g.rangeFloat(.02,.03)),"sawtooth"==this.type&&(this.volume=g.rangeFloat(.01,.02)),this.detune=g.rangeFloat(1,14),this.f1=g.rangeFloat(300,2700),this.q1=g.rangeFloat(0,10),this.split=g.percent(50),this.volume*=.75*this.q1*1}trigger(t,o){o=o||60,this.ampEnv&&this.ampEnv.softStop(t,.04);let r=e.createGain(),i=e.createOscillator(),s=e.createOscillator(),a=e.createOscillator(),h=new L,l=new L,c=e.createBiquadFilter();c.type="bandpass",c.frequency.value=this.f1,c.Q.value=this.q1,i.frequency.value=s.frequency.value=a.frequency.value=o,this.split&&(i.frequency.value=o/2),i.type=s.type=a.type=this.type,s.detune.value=-this.detune,a.detune.value=this.detune,h.set(-this.detune/14),l.set(this.detune/14),i.connect(c),s.connect(h.panner),a.connect(l.panner),h.connect(c),l.connect(c),c.connect(r),r.connect(n),i.start(t),i.stop(t+this.length+1e-4),s.start(t+.002),s.stop(t+this.length+1e-4),a.start(t+.004),a.stop(t+this.length+1e-4),this.ampEnv=new R(this.ampNodes,r.gain,5),this.ampEnv.attack(t,.7*.7*this.volume)}}class L{constructor(){this.active=!1,e.createStereoPanner&&(this.active=!0),this.active?this.panner=e.createStereoPanner():this.panner=e.createGain()}set(e){this.active&&(this.panner.pan.value=e)}connect(e){this.panner.connect(e)}} class Q{constructor(e,t,o,r){this.instrument=e,this.time=t,this.velocity=o,this.pitch=r||b}schedule(){this.instrument.trigger(e.currentTime+this.time+.1,this.pitch,this.velocity)}}class X{constructor(){this.notes=[],this.beatIndex=0,this.timer=null,this.isPlaying=!1,this.generate()}generate(){this.notes=[],this.beatIndex=0;for(let e=0;e<8;e++){let t={hat:v.hat(e),kick:v.kick(e),snare:v.snare(e),perc:v.perc(e),lead:v.lead(e),pad:v.pad(e)};this.notes.push(t)}}variate(e){let t=Object.assign({},this.notes[e]);g.percent(33)&&(t.hat=v.hat(e)),g.percent(D)&&(t.kick=v.kick(e)),g.percent(15)&&(t.perc=v.perc(e)),g.percent(20)&&(t.lead=v.lead(e));return[].concat(t.hat,t.kick,t.snare,t.perc,t.lead,t.pad)}schedule(){let e=this.variate(this.beatIndex);for(let t=0;t<e.length;t++)e[t].schedule();this.beatIndex++,this.beatIndex>7&&(this.beatIndex=0),this.timer=setTimeout((()=>{this.schedule()}),C)}play(){this.isPlaying=!0,this.beatIndex=0,this.schedule()}stop(){clearTimeout(this.timer),this.isPlaying=!1}toggle(){this.isPlaying?this.stop():this.play()}}class Y{constructor(){this.kickDouble=!0,this.leadFirst=!0,this.leadOctave=g.range(0,2),this.percFirst=!0,this.padMode=0,g.percent(70)?this.padMode=1:this.padMode=2,this.padOctave=g.range(0,3)}snare(e){let t=[];return 2!=e&&6!=e||t.push(new Q(c,0,1)),t}kick(e){let t=[],o=C/1e3;0==e&&t.push(new Q(h,0,1,J(b,0,-2)));let r=J(b,g.item(x),-2);if(0==e&&g.percent(10)&&t.push(new Q(h,o/2,1,r)),1==e&&g.percent(15)&&t.push(new Q(h,o/2,1,r)),3==e&&g.percent(20)&&t.push(new Q(h,0,1,r)),4==e&&g.percent(50)&&t.push(new Q(h,o/2,1,r)),e>4){let i=50;6==e&&(i=4),g.percent(i)&&t.push(new Q(h,0,1,r)),g.percent(60)&&(t.push(new Q(h,o/2,1,r)),g.percent(50)&&this.kickDouble&&(t.push(new Q(h,.75*o,1,r)),this.kickDouble=!1))}return t}hat(e){let t=[],o=1;g.percent(70)&&(o=2),g.percent(5)&&(o=3),g.percent(10)&&(o=4),g.percent(3)&&(o=6),g.percent(3)&&(o=8);let r=C/o/1e3;for(let e=0;e<o;e++)t.push(new Q(l,r*e,1));return t}lead(e){let t=[],o=C/1e3;0==e&&(this.leadFirst=!0);let r=J(b,g.item(w),this.leadOctave);return this.leadFirst&&(r=J(b,0,this.leadOctave)),g.percent(30)&&(g.percent(10)&&(r=J(b,0,this.leadOctave)),t.push(new Q(u,0,1,r)),this.leadFirst=!1),g.percent(30)&&(t.push(new Q(u,o/2,1,r)),this.leadFirst=!1),t}perc(e){let t=[],o=C/1e3;0==e&&(this.percFirst=!0);let r=g.range(-2,4),i=J(b,g.item(A),r);return this.leadFirst&&(i=J(b,[0,7],r)),g.percent(30)&&(t.push(new Q(f,0,1,i)),this.percFirst=!1),g.percent(30)&&(t.push(new Q(f,o/2,1,i)),this.percFirst=!1),t}pad(e){let t=[],o=C/1e3,r=J(b,0,this.padOctave);0==e&&t.push(new Q(d,0,1,r));let i=40;switch(this.padMode){case 1:r=J(b,g.item(N),this.padOctave),4==e&&g.percent(i)&&t.push(new Q(d,o/2,1,r)),e>4&&(g.percent(i)&&t.push(new Q(d,0,1,r)),g.percent(i)&&t.push(new Q(d,o/2,1,r)));break;case 2:i=70,0==e&&g.percent(i)&&t.push(new Q(d,o/2,1,r)),e>0&&(g.percent(i)&&t.push(new Q(d,0,1,r)),g.percent(i)&&t.push(new Q(d,o/2,1,r)))}return t}}class Z{constructor(e){this.seed=parseInt(e.slice(0,16))}random(e){return e=e||1,this.seed^=this.seed<<13,this.seed^=this.seed>>17,this.seed^=this.seed<<5,(this.seed<0?1+~this.seed:this.seed)%1e3/1e3*e}percent(e){return this.random(100)<e}range(e,t){return Math.round(this.rangeFloat(e,t))}rangeFloat(e,t){return e+this.random(t-e)}item(e){let t=e.length;return e[Math.round(this.random(t-1))]}}function W(e,t,o){return e+(t-e)*o}function H(e){let t=0;for(let o=0;o<e.length;o++)t+=e[o].time;return t}function J(e,t,o){let r=e*(1+t/12);return r=e*Math.pow(2,t/12),r*=Math.pow(2,o),r}g=new Z(E),v=new Y,function(){let a=window.AudioContext||window.webkitAudioContext;e=new a({sampleRate:32e3}),t=e.destination,o=t,r=e.sampleRate,i=e.createAnalyser(),i.fftSize=256,i.maxDecibels=0,i.smoothingTimeConstant=0,n=e.createDynamicsCompressor(),n.connect(t),n.threshold.value=-10,n.attack=.001,n.ratio=12,s=e.createDynamicsCompressor(),s.connect(n),s.threshold.value=-32,s.ratio=20,distortion=e.createWaveShaper(),distortion.connect(n),distortion.curve=function(e){for(var t,o="number"==typeof e?e:50,i=r,n=new Float32Array(i),s=Math.PI/180,a=0;a<i;++a)t=2*a/i-1,n[a]=(3+o)*t*20*s/(Math.PI+o*Math.abs(t));return n}(10),distortion.oversample="4x",o=distortion,n.connect(i)}(),y=g.range(100,180),C=6e4/y,b=J(440,g.range(-10,-2),0),x=g.item(k),w=g.item(U),a=new B,h=new I,D=35,g.percent(50)&&(h=new j,D=8),p=new P,f=new V,d=new _,l=g.percent(50)?new T:new O,c=new z,u=new G,m=new X,window.onkeypress=e=>{"Space"==e.code&&q()},window.screen.width<1024&&window.addEventListener("click",(function(){q()}));const K="\nvarying vec2 vUv;\nvoid main(){\nvUv = uv;\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";AFRAME.registerShader("box",{schema:{color:{type:"color",is:"uniform"},stripeColor:{type:"color",is:"uniform"},data:{type:"array",is:"uniform"},border:{type:"bool",is:"uniform"},borderColor:{type:"color",is:"uniform"}},vertexShader:K,fragmentShader:"precision mediump float;\nvarying vec2 vUv;\nuniform vec3 color;\nuniform vec3 stripeColor;\nuniform float[1] data;\nuniform bool border;\nuniform vec3 borderColor;\nvoid main() {\nvec3 colDiff = stripeColor - color;\nvec3 col = color + colDiff*data[0];\nif((vUv.x<0.066||vUv.x>0.933||vUv.y<0.066||vUv.y>0.933)&&border)\ncol = vec3(borderColor);\ngl_FragColor = vec4(col,1.0);\n}"}),AFRAME.registerShader("semisphere",{schema:{color:{type:"color",is:"uniform"},stripeColor:{type:"color",is:"uniform"},data:{type:"array",is:"uniform"},border:{type:"bool",is:"uniform"},borderColor:{type:"color",is:"uniform"}},vertexShader:K,fragmentShader:"precision mediump float;\nvarying vec2 vUv;\nuniform vec3 color;\nuniform vec3 stripeColor;\nuniform float[1] data;\nuniform bool border;\nuniform vec3 borderColor;\nvoid main() {\nvec3 col = color;\nfloat y = vUv.y > 1.0 ? 1.0: vUv.y;\nif(y>(1.0-data[0]))\ncol = stripeColor;\nif(vUv.y<0.1&&border)\ncol = vec3(borderColor);\ngl_FragColor = vec4(col,1.0);\n}"}),AFRAME.registerShader("bar",{schema:{color:{type:"color",is:"uniform"},stripeColor:{type:"color",is:"uniform"},data:{type:"array",is:"uniform"},border:{type:"bool",is:"uniform"},borderColor:{type:"color",is:"uniform"}},vertexShader:K,fragmentShader:"precision mediump float;\nvarying vec2 vUv;\nuniform vec3 color;\nuniform vec3 stripeColor;\nuniform float[50] data;\nuniform bool border;\nuniform vec3 borderColor;\nvoid main() {\nfloat opa = data[(int(vUv.y*50.0))];\nvec3 colDiff = stripeColor - color;\nvec3 col = color + colDiff*opa;\nif((vUv.y<0.05||vUv.y>0.95) && border)\ncol = vec3(borderColor);\t\ngl_FragColor = vec4(col,1.0);\n}"}),AFRAME.registerShader("pyramid",{schema:{color:{type:"color",is:"uniform"},stripeColor:{type:"color",is:"uniform"},data:{type:"array",is:"uniform"},border:{type:"bool",is:"uniform"},borderColor:{type:"color",is:"uniform"}},vertexShader:K,fragmentShader:"precision mediump float;\nvarying vec2 vUv;\nuniform vec3 color;\nuniform vec3 stripeColor;\nuniform float[50] data;\nuniform bool border;\nuniform vec3 borderColor;\nvoid main() {\nint index;\nfloat k = 2.9;\nfloat maxD = 1.0/1.5;\nfloat minD = -k/1.5;\nfloat dDiff = maxD - minD;\nfloat curD = vUv.y-(vUv.x)*(k); \t\t\nif(curD<0.0){\ncurD=abs(minD)+curD;\n}else{\ncurD= curD - minD;\n}\nfloat revIndex = (curD/dDiff)*50.0;\nfloat dist = revIndex - float(int(revIndex));\t\nindex = int(50.0-revIndex);\nfloat opa = data[index];\nvec3 colDiff = stripeColor - color;\nvec3 borderColDiff = borderColor - color;\nopa*=2.0;\nif(opa>1.0)\nopa=1.0;\nvec3 col = color + colDiff*opa;\nif((dist > 0.8 || dist < 0.2 ) && border)\ncol = color + borderColDiff*opa;\t\t\ngl_FragColor = vec4(col,1.0);\n}"}),AFRAME.registerShader("hexagon",{schema:{color:{type:"color",is:"uniform"},stripeColor:{type:"color",is:"uniform"},data:{type:"array",is:"uniform"},border:{type:"bool",is:"uniform"},borderColor:{type:"color",is:"uniform"}},vertexShader:K,fragmentShader:"precision mediump float;\nvarying vec2 vUv;\nuniform vec3 color;\nuniform vec3 stripeColor;\nuniform bool border;\nuniform float[50] data;\nuniform vec3 borderColor;\nvoid main() {\nfloat opa,curD, a = vUv.y, b;\nint index;\nbool cond;\nfloat vUv1 = vUv.y<0.5 ? (vUv.y) : (1.0-vUv.y);\nfloat vUv2 = vUv.y<0.5 ? (0.5-vUv.y) : (vUv.y-0.5);\nif(vUv.y<0.5&&vUv.x<0.5||vUv.y>=0.5&&vUv.x>=0.5){\ncurD = ((vUv.y - vUv.x*(-1.75))-1.375)*(vUv.y*vUv.x>=0.25?1.0:-1.0);\nb = (vUv.x*1.732-0.366);\ncond = vUv.y*vUv.x>=0.25?(a>b):(a<b);\n} else {\ncurD = ((vUv.y - vUv.x*(1.75)) + 0.375)*(vUv.x<0.5?1.0:-1.0);\nb = (vUv.x*-1.732+1.366);\ncond = vUv.x<0.5?(a>b):(a<b);\n}\nif(cond)\nindex = int((vUv1-0.0669 + (vUv2*0.005))/0.433*50.0);\nelse\nindex = int(50.0-curD/0.875* 50.0);\nif(index>49||index<0){\nopa = 0.0;\n} else {\nopa = data[index];\n}\nvec3 colDiff = stripeColor - color;\nvec3 col = color + colDiff*opa;\nif(index==0&&border)\ncol = vec3(borderColor);\ngl_FragColor = vec4(col,1.0);\n}"}); const $=new Z(E);let ee=document[S]("a-scene");ee[F]("beatbox",""),ee[F]("renderer","highRefreshRate:true");let te=document[S]("a-entity");te[F]("id","cameraRig"),te[F]("position","0 1.6 0");let oe=document[S]("a-entity");oe[F]("camera",""),oe[F]("look-controls",""),oe[F]("wasd-controls",""),oe[F]("position-reader",""),oe[F]("id","camera"),te.appendChild(oe);let re=document[S]("a-entity");re[F]("hand-controls","hand: right"),re[F]("rotation-reader",""),te.appendChild(re),ee.appendChild(te),document.body.appendChild(ee);const ie=[{chance:7.5,outerBoxColor:"#102410",semiSphereColor:"#030603",semiSphereStripeColor:"#f1f1f1",boxColor:"#ecf39e",boxStripeColor:"#102410",others:[["#f1f1f1","#dc0c25"],["#000000","#31572c"],["#132a13","#ecf39e"]],borderColor:"#dc0c25",sunColor:"#dc0c25"},{chance:5,outerBoxColor:"#10002b",semiSphereColor:"#05000d",semiSphereStripeColor:"#f1f1f1",boxColor:"#FF005C",boxStripeColor:"#ffffff",others:[["#05000d","#bc00dd"],["#05000d","#c0fdff"],["#05000d","#d51fa5"]],borderColor:"#13F4EF",sunColor:"#13F4EF"},{chance:7.5,outerBoxColor:"#0b0b0b",semiSphereColor:"#000000",semiSphereStripeColor:"#ffffff",boxColor:"#000000",boxStripeColor:"#ffffff",others:[["#000000","#ffffff"],["#000000","#ffffff"],["#000000","#ffffff"]],borderColor:"#ffffff",sunColor:"#ffffff"},{chance:13,outerBoxColor:"#470047",semiSphereColor:"#fdc5ff",semiSphereStripeColor:"#f1f1f1",boxColor:"#bff6ff",boxStripeColor:"#ffffff",others:[["#ffb7cc","#ffffff"],["#a4fcda","#06cf81"],["#ff42fe","#ffffff"]],borderColor:"#c275ef",sunColor:"#cc8af2"},{chance:7.5,outerBoxColor:"#f7cf3b",semiSphereColor:"#4e410f",semiSphereStripeColor:"#f4e4bc",boxColor:"#f4e4bc",boxStripeColor:"#f1f1f1",others:[["#e9c979","#fbf6e9"],["#e5c063","#f8edd2"],["#daa520","#edd290"]],borderColor:"#c4951d",sunColor:"#f8edd2"},{chance:13,outerBoxColor:"#280f36",semiSphereColor:"#160420",semiSphereStripeColor:"#ffffff",boxColor:"#160420",boxStripeColor:"#000000",others:[["#632b6c","#f09f9c"],["#280f36","#ffc1a0"],["#fd9c7f","#fdd2bc"]],borderColor:"#fd9c7f",sunColor:"#c86b98"},{chance:13,outerBoxColor:"#0f0d1b",semiSphereColor:"#160420",semiSphereStripeColor:"#ffffff",boxColor:"#3255b1",boxStripeColor:"#95fde4",others:[["#3f2b5c","#95fde4"],["#161324","#6446aa"],["#71c78a","#0f0d1b"]],borderColor:"#95fde4",sunColor:"#95fde4"},{chance:13,outerBoxColor:"#000000",semiSphereColor:"#000000",semiSphereStripeColor:"#f1f1f1",boxColor:"#c52525",boxStripeColor:"#f1f1f1",others:[["#323232","#000000"],["#000000","#670000"],["#670000","#000000"]],borderColor:"#9f1111",sunColor:"#c50000"},{chance:13,outerBoxColor:"#48396B",semiSphereColor:"#05000d",semiSphereStripeColor:"#f1f1f1",boxColor:"#48396B",boxStripeColor:"#FFF4AD",others:[["#46A3A3","#ffffff"],["#6ABA95","#88fcc7"],["#404F89","#FFF4AD"]],borderColor:"#FFF4AD",sunColor:"#FFF4AD"},{chance:7.5,outerBoxColor:"#03045e",semiSphereColor:"#000013",semiSphereStripeColor:"#f1f1f1",boxColor:"#3f9f7f",boxStripeColor:"#76FFFD",others:[["#4BD1E1","#010223"],["#000017","#4BD1E1"],["#03043d","#2563b1"]],borderColor:"#76FFFD",sunColor:"#76FFFD"}];let ne,se=100*$.random(),ae=0;for(let e=0;e<10;e++)if(ae+=ie[e].chance,se<ae){ne=e;break}const he=ie[ne];he.others=function(e){for(var t,o,r=e.length;0!==r;)o=Math.floor($.random()*r),t=e[r-=1],e[r]=e[o],e[o]=t;return e}(he.others),$.random()<.8&&(he.borderColor=null);const le=[[20,20,20,20,20],[45,10,15,15,15],[15,10,45,15,15],[15,10,15,45,15],[15,10,15,15,45]];const ce=le[parseInt($.random()*le.length)];var pe=new Uint8Array(128);let de=[],ue=[],fe={};AFRAME.registerComponent("rotation-reader",{init:function(){this.el.addEventListener("axismove",this.logThumbstick.bind(this)),this.el.addEventListener("buttondown",(()=>{q()})),this.cameraRig=document.getElementById("cameraRig"),this.camera=document.getElementById("camera"),this.speed=.25},tick:function(){let{z:e,x:t}=this.cameraRig.object3D.position;e>49&&(this.cameraRig.object3D.position.z=49),e<-49&&(this.cameraRig.object3D.position.z=-49),t>49&&(this.cameraRig.object3D.position.x=49),t<-49&&(this.cameraRig.object3D.position.x=-49)},logThumbstick:function(e){let t=e.detail.axis.length,o=e.detail.axis[t-2],r=e.detail.axis[t-1];const i=r*this.speed*Math.cos(this.camera.object3D.rotation.y),n=r*this.speed*Math.sin(this.camera.object3D.rotation.y),s=o*this.speed*Math.cos(this.camera.object3D.rotation.y),a=o*this.speed*Math.sin(this.camera.object3D.rotation.y)*-1;this.cameraRig.object3D.position.z+=a+i,this.cameraRig.object3D.position.x+=s+n}}),AFRAME.registerComponent("position-reader",{tick:function(){let{z:e,x:t}=this.el.object3D.position;e>49&&(this.el.object3D.position.z=49),e<-49&&(this.el.object3D.position.z=-49),t>49&&(this.el.object3D.position.x=49),t<-49&&(this.el.object3D.position.x=-49)}});const me={};let ve; AFRAME.registerComponent("moving-light",{init:function(){this.intensity=$.random(),this.el[F]("light","type: point; distance: 200; decay: 1; castShadow:true; intensity: "+this.intensity+";color:"+he.sunColor),this.radius=1+1*$.random(),this.el[F]("geometry","primitive: sphere; radius: "+this.radius);let e=$.random()*(50-this.radius)*($.random()<.5?1:-1),t=$.random()*(50-2*this.radius)+this.radius,o=$.random()*(50-this.radius)*($.random()<.5?1:-1);this.el[F]("position",e+" "+t+" "+o),this.el[F]("material","shader:flat;color:"+he.sunColor),this.speedX=.5*$.random(),this.speedY=.5*$.random(),this.speedZ=.5*$.random(),this.pos=this.el.getAttribute("position"),$.random()<.3333&&(this.isDynamicInt=!0)},tick:function(){if(i&&m&&m.isPlaying){if(this.isDynamicInt){let e=this.intensity,t=ve/128>e?ve/128:e>=.01?e-.01:0;this.el.setAttribute("light","intensity",t),this.intensity=t}let e=this.pos;(e.x+this.radius+this.speedX>50||e.x-this.radius+this.speedX<-50)&&(this.speedX*=-1),(e.y+this.radius+this.speedY>50||e.y-this.radius+this.speedY<0)&&(this.speedY*=-1),(e.z+this.radius+this.speedZ>50||e.z-this.radius+this.speedZ<-50)&&(this.speedZ*=-1),e.x+=this.speedX,e.y+=this.speedY,e.z+=this.speedZ,this.el.object3D.position=e}}}),AFRAME.registerComponent("static-light",{init:function(){this.intensity=$.random(),this.el[F]("light","type: point; distance: 200; decay: 1; castShadow:true; intensity: "+this.intensity+";color:"+he.sunColor);let e=49*$.random()*($.random()<.5?1:-1),t=48*$.random()+1,o=49*$.random()*($.random()<.5?1:-1);this.el[F]("position",e+" "+t+" "+o),$.random()<.4285&&(this.isDynamicInt=!0)},tick:function(){if(i&&m&&m.isPlaying&&this.isDynamicInt){let e=this.intensity,t=ve/128>e?ve/128:e>=.01?e-.01:0;this.el.setAttribute("light","intensity",t),this.intensity=t}}});let ge={},be=1,ye={bar:{},hexagon:{}};function Ce(e,t){let o=parseInt(100*$.random())+(e?100:0),r=null;if(me[o]?$.random()<.5?(n(),r||i()):(i(),r||n()):r=o,null===r)return Ce(!e,t);{me[r]=1,e&&(r%=100);let o=r%10*10-50+5,i=5-t;i<0&&(i=0),o+=i*$.random()*($.random()<.5?1:-1);let n=10*parseInt(r/10)-50+5;return n+=i*$.random()*($.random()<.5?1:-1),{x:o,z:n,rot:e?180:0}}function i(){for(let t=o-1;t>=(e?100:0);t--)if(!me[t]){r=t;break}}function n(){for(let t=o+1;t<(e?200:100);t++)if(!me[t]){r=t;break}}}function xe(e){let t,o,r,i,n,s;s=(3*(ye.sphere||$.random())+1)/be,o=0,n=$.random()<.25?Ce(!1,s):Ce(!0,s),t=n.x,r=n.z,i=n.rot,o=n.rot?50-o:o;const a=document[S]("a-sphere");a[F]("material","shader: semisphere;color:"+he.semiSphereColor+";stripeColor:"+he.semiSphereStripeColor),a[F]("theta-length","90"),a[F]("radius",s),a[F]("position",t+" "+o+" "+r),a[F]("rotation",i+" 0 0"),De(a),e.appendChild(a),ue.push("sphere")}function we(e){let t,o,r,i,n;const s=document[S]("a-cylinder"),a=(20*(ye.bar.height||$.random())+15)/be,h=(1*(ye.bar.radius||$.random())+1)/be;o=a/2,n=$.random()>=.5?Ce(!1,h):Ce(!0,h),t=n.x,r=n.z,i=n.rot,o=n.rot?50-o:o,s[F]("material","shader: bar;side:double;color:"+he.others[0][0]+";stripeColor:"+he.others[0][1]),s[F]("radius",h),s[F]("height",a),s[F]("position",t+" "+o+" "+r),s[F]("rotation",i+" 0 0"),s[F]("open-ended","true"),De(s),e.appendChild(s),ue.push("cylinder")}function Fe(e){let t,o,r,i,n;const s=(.5*(ye.hexagon.height||$.random())+.25)/be,a=(3*(ye.hexagon.radius||$.random())+2)/be;o=s/2,n=$.random()>=.3?Ce(!1,a):Ce(!0,a),t=n.x,r=n.z,i=n.rot,o=n.rot?50-o:o;const h=document[S]("a-cylinder");h[F]("radius",a),h[F]("height",s),h[F]("segments-radial","6"),h[F]("position",t+" "+o+" "+r),h[F]("material","shader: hexagon;color:"+he.others[1][0]+";stripeColor:"+he.others[1][1]),h[F]("rotation",i+" "+360*(ge.hexagon||$.random())+" 0"),De(h),e.appendChild(h),ue.push("hexagon")}function Se(e){let t,o,r,i,n=215;const s=(4*(ye.pyramid||$.random())+2)/be;o=s/3,(i=Ce(!1,s)),t=i.x,r=i.z,n+=i.rot,o=i.rot?50-o:o;const a=document[S]("a-tetrahedron");a[F]("material","shader: pyramid;color:"+he.others[2][0]+";stripeColor:"+he.others[2][1]),a[F]("radius",s),a[F]("position",t+" "+o+" "+r),a[F]("rotation",n+" "+360*(ge.pyramid||$.random())+" 45"),De(a),e.appendChild(a),ue.push("pyramid")}function Ee(e){let t,o,r,i,n;const s=((ye.box||$.random())+1)/be;o=s/2+2+20*$.random(),i=0,n=Ce(!1,s/2),t=n.x,r=n.z,o=n.rot?s/2-o:o;const a=document[S]("a-box");a[F]("material","shader: box;color:"+he.boxColor+";stripeColor:"+he.boxStripeColor),a[F]("depth",s),a[F]("width",s),a[F]("height",s),a[F]("position",t+" "+o+" "+r),a[F]("rotation","0 "+360*(ge.box||$.random())+" 0"),De(a),e.appendChild(a),ue.push("box")}function De(e){e[F]("animate","index: "+ue.length),e[F]("shadow","cast:true;receive:false"),he.borderColor&&(e[F]("material","borderColor",he.borderColor),e[F]("material","border","true"))}AFRAME.registerComponent("beatbox",{init:function(){!function(e){let t=[[100,100,"-90 0 0","0 0 0"],[100,100,"90 0 0","0 50 0"],[50,100,"0 180 0","0 25 50"],[50,100,"0 0 0","0 25 -50"],[50,100,"0 -90 0","50 25 0"],[50,100,"0 90 0","-50 25 0"]];for(let o=0;o<6;o++){const r=document[S]("a-plane");r[F]("color",he.outerBoxColor),r[F]("height",t[o][0]),r[F]("width",t[o][1]),r[F]("rotation",t[o][2]),r[F]("position",t[o][3]),r[F]("shadow","receive: true"),e.appendChild(r)}}(this.el);const e=document[S]("a-entity");e[F]("light","type: ambient; intensity: 0.1;"),this.el.appendChild(e);const t=document[S]("a-entity");$.random()<.3?t[F]("moving-light",""):t[F]("static-light",""),this.el.appendChild(t);const o=$.random();if(o<.4)ge.pyramid=$.random()||.001,ge.box=$.random()||.001,ge.hexagon=$.random()||.001;else if(o<.8){let e=$.random()||.001;ge.pyramid=e,ge.box=e,ge.hexagon=e}const r=$.random();r<.3?be=2:r<.8&&(be=1.5);const i=$.random();if(i<.4)ye.pyramid=$.random()||.001,ye.box=$.random()||.001,ye.hexagon.height=$.random()||.001,ye.hexagon.radius=$.random()||.001,ye.bar.radius=$.random()||.001,ye.bar.height=$.random()||.001,ye.sphere=$.random()||.001;else if(i<.5){let e=$.random()||.001;ye.pyramid=e,ye.box=e,ye.hexagon.height=e,ye.hexagon.radius=e,ye.bar.radius=e,ye.bar.height=e,ye.sphere=e}for(var n=0;n<128;n++){let e,t=100*$.random(),o=0;for(let r=0;r<5;r++)if(o+=ce[r],t<o){e=r;break}0==e?xe(this.el):1==e?Ee(this.el):2==e?we(this.el):3==e?Fe(this.el):Se(this.el)}for(let e=0;e<128;e++){let t=[],o=50;"sphere"!=ue[e]&&"box"!==ue[e]||(o=0,t.push($.random()));for(let e=0;e<o;e++)$.random()<.3?t.push($.random()):t.push(0);de.push(t)}},tick:function(){if(i&&m&&m.isPlaying){i.getByteFrequencyData(pe),ve=0;for(let e=0;e<128;e++)if(ve+=pe[e]/255,"sphere"===ue[e]||"box"===ue[e]){let t,o=pe[e]/255,r=de[e][0];t=r>o?r-.01:o,de[e].unshift(t),de[e].pop()}else"pyramid"===ue[e]?(fe[e]=fe[e]||0,fe[e]++,2==fe[e]&&(fe[e]=0,de[e].unshift(pe[e]/255),de[e].pop())):(de[e].unshift(pe[e]/255),de[e].pop())}}}),AFRAME.registerComponent("animate",{schema:{index:{type:"number"}},init:function(){var e=de[this.data.index];this.el[F]("material","data",e)}});
Beatboxes are the first fully immersive, virtual reality, audiovisual generative art on the Ethereum blockchain. Beatboxes consist of 841 generated unique rooms where you can fully immerse yourself with any virtual reality device. You can also enjoy them from your pc in a more conventional way. Beatboxes are our second experimental piece of art, following the successful release of Unigrids. The goal with this collection was to create an environment where you can escape your reality for a moment and enjoy your unique piece of art while stimulating the most senses possible. You can open your eyes inside your unique art piece and explore by looking around and listening as you enjoy something you own. In live view use arrows to move around and spacebar to start the music and animation. Visit beatboxes.io to browse all Beatboxes more easily, Have fun! *note that Beatboxes are using aframe which is currently not optimized for ios mobile and safari browser. [ This artwork will be released via Dutch Auction, with the price dropping in 0.420Ξ increments every 10 minutes. / 2.53Ξ, 2.11Ξ, 1.69Ξ, 1.275Ξ, 0.85Ξ, 0.420Ξ, 0.21Ξ. ]
let seed=parseInt(tokenData.hash.slice(0,16));function rnd(){seed^=seed<<13;seed^=seed>>17;seed^=seed<<5;return(seed<0?~seed+1:seed)%1e3/1e3}var stylesheet=document.createElement("style");stylesheet.innerText="@media (orientation: portrait) {#unigrids {width: 100vw;display: block;margin: 0 auto;}}@media (orientation: landscape) {#unigrids {height: 100vh;display: block;margin: 0 auto;}}";document.head.appendChild(stylesheet);let colors=[["#0c0f0a","#ff206e","#fbff12","#41ead4","#ffffff"],["#000000","#111111","#232323","#575757","#7a7a7a"],["#ffffff","#e3e3e3","#aaaaaa","#dbdbdb","#e5e5e5"],["#114b5f","#1a936f","#88d498","#c6dabf","#f3e9d2"],["#2b2d42","#8d99ae","#edf2f4","#ef233c","#d90429"],["#e63946","#f1faee","#a8dadc","#457b9d","#1d3557"],["#f72585","#7209b7","#3a0ca3","#4361ee","#4cc9f0"],["#003049","#d62828","#f77f00","#fcbf49","#eae2b7"],["#0b132b","#1c2541","#3a506b","#5bc0be","#6fffe9"],["#00296b","#003f88","#00509d","#fdc500","#ffd500"],["#000000","#14213d","#fca311","#e5e5e5","#ffffff"],["#8dd635","#8cff00","#052233","#093954","#054f77"],["#562c2c","#f2542d","#f5dfbb","#0e9594","#127475"],["#011627","#fdfffc","#2ec4b6","#e71d36","#ff9f1c"]];function shuffle(array){var currentIndex=array.length,temporaryValue,randomIndex;while(0!==currentIndex){randomIndex=Math.floor(rnd()*currentIndex);currentIndex-=1;temporaryValue=array[currentIndex];array[currentIndex]=array[randomIndex];array[randomIndex]=temporaryValue}return array}colors.forEach(function(c,i){colors[i]=shuffle(c)});const rCol=rnd();let colorPointer;if(rCol<.03){colorPointer=0}else if(rCol>=.03&&rCol<.08){colorPointer=1}else if(rCol>=.08&&rCol<.13){colorPointer=2}else if(rCol>=.13&&rCol<.19875){colorPointer=3}else if(rCol>=.19875&&rCol<.2675){colorPointer=4}else if(rCol>=.2675&&rCol<.33625){colorPointer=5}else if(rCol>=.33625&&rCol<.405){colorPointer=6}else if(rCol>=.405&&rCol<.49){colorPointer=7}else if(rCol>=.49&&rCol<.575){colorPointer=8}else if(rCol>=.575&&rCol<.66){colorPointer=9}else if(rCol>=.66&&rCol<.745){colorPointer=10}else if(rCol>=.745&&rCol<.83){colorPointer=11}else if(rCol>=.83&&rCol<.915){colorPointer=12}else{colorPointer=13}const numColRnd=rnd();let numColors;if(numColRnd<.1){numColors=2}else if(numColRnd>=.1&&numColRnd<.3){numColors=3}else if(numColRnd>=.3&&numColRnd<.5){numColors=4}else{numColors=5}function genColor(){let col="";col=colors[colorPointer][parseInt((rnd()*(numColors-1)).toFixed(0))];return col}function genArc(row,col,indexLetter){const col1=genColor();let svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 20 20");svg.setAttribute("width",1);svg.setAttribute("height",1);svg.setAttribute("x",col-1);svg.setAttribute("y",row-1);svg.setAttribute("shape-rendering","geometricPrecision");svg.setAttribute("stroke-width","0");if(indexLetter){svg.setAttribute("id","letterHider"+indexLetter)}let path=document.createElementNS("http://www.w3.org/2000/svg","path");const rotArc=genArc?rnd():0;path.setAttribute("d",rotArc>=.5?"M0,20 Q1,1 20,0 Z M 0,20 L 20,20 L 20,0 Z":"M0,20 Q19,19 20,0 Z M 0,0 L 0,20 L 20,0 Z");path.setAttribute("fill",col1);svg.appendChild(path);container.appendChild(svg)}function revealLetter(index){var letterHider=document.querySelector("#letterHider"+index);letterHider.setAttribute("visibility","hidden")}function genTri(row,col,indexLetter){const col1=genColor();let svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 2 2");svg.setAttribute("width",1);svg.setAttribute("height",1);svg.setAttribute("x",col-1);svg.setAttribute("y",row-1);if(indexLetter){svg.setAttribute("id","letterHider"+indexLetter)}let tri=document.createElementNS("http://www.w3.org/2000/svg","polygon");tri.setAttribute("fill",col1);var tri2=null;if(indexLetter){tri2=document.createElementNS("http://www.w3.org/2000/svg","polygon");tri2.setAttribute("fill",letbg)}const rot=rnd();if(rot>=.5){tri.setAttribute("points","0,0 0,2 2,2");tri2?tri2.setAttribute("points","0,0 2,0 2,2"):null}else{tri.setAttribute("points","0,2 2,0 2,2");tri2?tri2.setAttribute("points","0,0 0,2 2,0"):null}svg.appendChild(tri);tri2?svg.appendChild(tri2):null;container.appendChild(svg)}var letcolor=null;function genLetter(row,col,colbg){letcolor=letcolor?letcolor:genColor();while(colbg==letcolor){letcolor=genColor()}let svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 2 2");svg.setAttribute("width","1");svg.setAttribute("height","1");svg.setAttribute("x",col-1);svg.setAttribute("y",row-1);let letter=document.createElementNS("http://www.w3.org/2000/svg","text");letter.innerHTML=String.fromCharCode(rnd()*25+65);letter.setAttribute("x","1");letter.setAttribute("y","1");letter.setAttribute("font-size","1");letter.setAttribute("fill",letcolor);letter.setAttribute("text-anchor","middle");letter.setAttribute("dominant-baseline","central");svg.appendChild(letter);container.appendChild(svg)}var numColsAndRows;var rs=rnd();if(rs>=0&&rs<.3){numColsAndRows=5}else if(rs>=.3&&rs<.55){numColsAndRows=10}else if(rs>=.55&&rs<.8){numColsAndRows=15}else{numColsAndRows=20}let container=document.createElementNS("http://www.w3.org/2000/svg","svg");container.setAttribute("viewBox","0 0 "+numColsAndRows+" "+numColsAndRows);container.setAttribute("version","1.1");container.setAttribute("id","unigrids");container.setAttribute("shape-rendering","crispEdges");container.setAttribute("xmlns","http://www.w3.org/2000/svg");container.setAttribute("stroke-width","0");const letbg=genColor();const shape=rnd();for(let i=1;i<=Math.pow(numColsAndRows,2);i++){var row=Math.ceil(i/numColsAndRows);var col=i-(row-1)*numColsAndRows;let square=document.createElementNS("http://www.w3.org/2000/svg","rect");let bgcol=genColor();square.setAttribute("x",col-1);square.setAttribute("y",row-1);square.setAttribute("width","1");square.setAttribute("height","1");square.setAttribute("stroke-width","0");square.setAttribute("fill",i>Math.pow(numColsAndRows,2)-3?letbg:bgcol);container.appendChild(square);if(i>Math.pow(numColsAndRows,2)-3){genLetter(row,col,letbg)}var r=rnd();if(shape<.075){genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else if(shape>=.075&&shape<.15){genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else if(shape>=.15&&shape<.65){if(r>=.5){genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else{genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}}else if(shape>=.65&&shape<.825){if(r>=.25){genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else{genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}}else{if(r>=.25){genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else{genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}}}document.body.appendChild(container);let startedA=false;let startedS=false;function toggleAnimation(){if(!startedA){startedA=true;const shapes=document.querySelectorAll("rect, path, polygon");shapes.forEach(function(s){(function r(){const t=rnd()*2;let col=genColor();while(s.getAttribute("fill")==col){col=genColor()}let style="transition: all "+t+"s; fill: "+col+";";s.style=style;s.setAttribute("fill",col);if(startedA)setTimeout(function(){if(startedA)r()},parseInt((t*1e3).toFixed(0)))})()})}else{startedA=false}}function toggleSound(){if(!startedS){startedS=true;setTimeout(function(){draw2()},100)}else{startedS=false;Timers.forEach(function(t){clearInterval(t)})}}container.addEventListener("click",function(){toggleAnimation()});if(window.screen.width<1024){container.addEventListener("click",function(){toggleSound()})}else{document.body.addEventListener("keyup",function(e){if(e.keyCode===32){toggleSound()}})}document.querySelector("#letterHider1").addEventListener("click",function(e){revealLetter(1);e.stopPropagation()});document.querySelector("#letterHider2").addEventListener("click",function(e){revealLetter(2);e.stopPropagation()});document.querySelector("#letterHider3").addEventListener("click",function(e){revealLetter(3);e.stopPropagation()});function createAudioContext(desiredSampleRate){var AudioCtor=window.AudioContext||window.webkitAudioContext;desiredSampleRate=typeof desiredSampleRate==="number"?desiredSampleRate:48e3;var context=new AudioCtor;if(/(iPhone|iPad)/i.test(navigator.userAgent)&&context.sampleRate!==desiredSampleRate){var buffer=context.createBuffer(1,1,desiredSampleRate);var dummy=context.createBufferSource();dummy.buffer=buffer;dummy.connect(context.destination);dummy.start(0);dummy.disconnect();context.close();context=new AudioCtor}return context}var audioContext=new createAudioContext;var mixGain=audioContext.createGain();var filterGain=audioContext.createGain();const volume=.5;function kick(){var osc2=audioContext.createOscillator();var gainOsc2=audioContext.createGain();osc2.type="sine";gainOsc2.gain.setValueAtTime(volume,audioContext.currentTime);gainOsc2.gain.exponentialRampToValueAtTime(.001,audioContext.currentTime+.5);gainOsc2.connect(audioContext.destination);osc2.frequency.setValueAtTime(50,audioContext.currentTime);osc2.connect(gainOsc2);osc2.start(audioContext.currentTime);osc2.stop(audioContext.currentTime+.5)}function snare(){mixGain.gain.value=volume;var osc3=audioContext.createOscillator();var gainOsc3=audioContext.createGain();filterGain.gain.setValueAtTime(.21,audioContext.currentTime);filterGain.gain.exponentialRampToValueAtTime(.01,audioContext.currentTime+.2);osc3.type="triangle";osc3.frequency.value=100;gainOsc3.gain.setValueAtTime(0,audioContext.currentTime);osc3.connect(gainOsc3);gainOsc3.connect(mixGain);osc3.start(audioContext.currentTime);osc3.stop(audioContext.currentTime+.2);var node=audioContext.createBufferSource(),buffer=audioContext.createBuffer(1,4096,audioContext.sampleRate),data=buffer.getChannelData(0);var filter=audioContext.createBiquadFilter();filter.type="peaking";filter.frequency.setValueAtTime(1e3,audioContext.currentTime);filter.frequency.linearRampToValueAtTime(100,audioContext.currentTime+.05);for(var i=0;i<4096;i++){data[i]=Math.random()}node.buffer=buffer;node.loop=true;node.connect(filter);filter.connect(filterGain);filterGain.connect(mixGain);node.start(audioContext.currentTime);node.stop(audioContext.currentTime+.2)}const rhmusic=rnd();let rh;if(rhmusic>=0&&rhmusic<.333333){rh=1/4}else if(rhmusic>=.333333&&rhmusic<.666666){rh=1/5}else{rh=1/6}var context=new createAudioContext;function arso(init){var melody=cmusic.melody;var noteLength=rh;var attack=1/64;function scheduleNote(note,time){var oscillator=context.createOscillator();var gain=context.createGain();oscillator.frequency.value=mtof(note);oscillator.connect(gain);gain.connect(context.destination);gain.gain.setValueAtTime(0,time);gain.gain.linearRampToValueAtTime(init?0:volume,time+attack);gain.gain.linearRampToValueAtTime(0,time+noteLength);oscillator.start(time);oscillator.stop(time+noteLength)}for(var i=0;i<melody.length;i++){scheduleNote(melody[i],context.currentTime+1/8*i)}}var context2=new createAudioContext;function arso2(init){var melody=cmusic.melody2;var noteLength=rh;var attack=1/64;function scheduleNote(note,time){var oscillator=context2.createOscillator();var gain=context2.createGain();oscillator.frequency.value=mtof2(note);oscillator.connect(gain);gain.connect(context2.destination);gain.gain.setValueAtTime(0,time);gain.gain.linearRampToValueAtTime(init?0:volume,time+attack);gain.gain.linearRampToValueAtTime(0,time+noteLength);oscillator.start(time);oscillator.stop(time+noteLength)}for(var i=0;i<melody.length;i++){scheduleNote(melody[i],context2.currentTime+1/8*i)}}function mtof(note){return Math.pow(2,(note-69)/12)*cmusic.freq}function mtof2(note){return Math.pow(2,(note-69)/12)*cmusic.freq2}mixGain.connect(audioContext.destination);filterGain.gain.value=0;var Timers=[];const music=[{melody:[67,68,59,52,73],melody2:[0,54,0,0,47],freq:194,freq2:238},{melody:[73,52,59,68,67],melody2:[47,0,0,54,0],freq:199,freq2:233},{melody:[22,81,70,59,68,77,66,75],melody2:[38,0,69,0,0,57],freq:102,freq2:172},{melody:[75,66,77,68,59,70,81,22],melody2:[57,0,0,69,0,38],freq:97,freq2:177},{melody:[73,68,0,62,73,68,0,62],melody2:[55,0,51,56,61,64,57],freq:165,freq2:148},{melody:[62,0,68,73,62,0,68,73],melody2:[57,64,61,56,51,0,55],freq:159,freq2:143},{melody:[71,59,59,62,62],melody2:[54,42,58,40,40,57],freq:175,freq2:238},{melody:[62,62,59,59,71],melody2:[57,40,40,58,42,54],freq:170,freq2:233}];const rmusic=rnd();let cmusic;if(rmusic>=0&&rmusic<.125){cmusic=music[0]}else if(rmusic>=.125&&rmusic<.25){cmusic=music[1]}else if(rmusic>=.25&&rmusic<.375){cmusic=music[2]}else if(rmusic>=.375&&rmusic<.5){cmusic=music[3]}else if(rmusic>=.5&&rmusic<.625){cmusic=music[4]}else if(rmusic>=.625&&rmusic<.75){cmusic=music[5]}else if(rmusic>=.75&&rmusic<.875){cmusic=music[6]}else{cmusic=music[7]}var frq=rnd()*1.25;while(frq<.75){frq=rnd()*1.25}function draw2(){Timers.push(setInterval(function(){snare()},1e3/1*frq));Timers.push(setInterval(function(){kick()},1e3/2*frq));arso(true);Timers.push(setInterval(function(){arso()},1e3/.5*frq));context2=new createAudioContext;arso2(true);Timers.push(setInterval(function(){arso2()},1e3/1*frq))}
Unigrids are collectible digital art pieces 100% stored on the Ethereum blockchain. Each Unigrid consists of 421 individual Pure Javascript generated SVG grids, ensuring each Unigrid is entirely unique. Not only are Unigrids visually unique, but they also hide an ingenious animation and a generated beat to enhance your experience. Unigrids are an experiential piece of art, with a static image for printing, an animation, and companion beat - all generated and stored on the blockchain. You truly need to play around with Unigrids to understand the essence of them. Be sure to hold onto your favorite piece as we will be adding interactive easter eggs for art owners, giveaways, and other engagement with the community.