vendor: 9,145 bytes, lines 1-82
1import"./modulepreload-polyfill-B5Qt9EMX.js";import{C as D,P as J,V as c,W as z,H as F,U as Q,S as w,a as x,b as R,A as j,M as $,F as ee,G as te,c as ie,d as ae,l as A,e as oe,f as re,g as se,h as ne,i as le,L as ue,j as he,T as de,k as me,m as ce,B as pe,n as fe,o as ve,E as ge,R as xe,p as Me,q as be,Q as we}from"./index-nGeiJ9KY.js";import{G as Te}from"./GLTFLoader-BhOjAPzb.js";import{B as ye}from"./BokehPass-DZx5_Dya.js";const Se={uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new D(0)},defaultOpacity:{value:0}},vertexShader:` 2 3 varying vec2 vUv; 4 5 void main() { 6 7 vUv = uv; 8 9 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 10 11 }`,fragmentShader:` 12 13 uniform sampler2D tDiffuse; 14 uniform vec3 defaultColor; 15 uniform float defaultOpacity; 16 uniform float luminosityThreshold; 17 uniform float smoothWidth; 18 19 varying vec2 vUv; 20 21 void main() { 22 23 vec4 texel = texture2D( tDiffuse, vUv ); 24 25 float v = luminance( texel.xyz ); 26 27 vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity ); 28 29 float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v ); 30 31 gl_FragColor = mix( outputColor, texel, alpha ); 32 33 }`};class b extends J{constructor(e,i=1,a,u){super(),this.strength=i,this.radius=a,this.threshold=u,this.resolution=e!==void 0?new c(e.x,e.y):new c(256,256),this.clearColor=new D(0,0,0),this.needsSwap=!1,this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let o=Math.round(this.resolution.x/2),d=Math.round(this.resolution.y/2);this.renderTargetBright=new z(o,d,{type:F}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let m=0;m<this.nMips;m++){const _=new z(o,d,{type:F});_.texture.name="UnrealBloomPass.h"+m,_.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(_);const U=new z(o,d,{type:F});U.texture.name="UnrealBloomPass.v"+m,U.texture.generateMipmaps=!1,this.renderTargetsVertical.push(U),o=Math.round(o/2),d=Math.round(d/2)}const g=Se;this.highPassUniforms=Q.clone(g.uniforms),this.highPassUniforms.luminosityThreshold.value=u,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new w({uniforms:this.highPassUniforms,vertexShader:g.vertexShader,fragmentShader:g.fragmentShader}),this.separableBlurMaterials=[];const l=[3,5,7,9,11];o=Math.round(this.resolution.x/2),d=Math.round(this.resolution.y/2);for(let m=0;m<this.nMips;m++)this.separableBlurMaterials.push(this._getSeparableBlurMaterial(l[m])),this.separableBlurMaterials[m].uniforms.invSize.value=new c(1/o,1/d),o=Math.round(o/2),d=Math.round(d/2);this.compositeMaterial=this._getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=i,this.compositeMaterial.uniforms.bloomRadius.value=.1;const Z=[1,.8,.6,.4,.2];this.compositeMaterial.uniforms.bloomFactors.value=Z,this.bloomTintColors=[new x(1,1,1),new x(1,1,1),new x(1,1,1),new x(1,1,1),new x(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,this.copyUniforms=Q.clone(R.uniforms),this.blendMaterial=new w({uniforms:this.copyUniforms,vertexShader:R.vertexShader,fragmentShader:R.fragmentShader,blending:j,depthTest:!1,depthWrite:!1,transparent:!0}),this._oldClearColor=new D,this._oldClearAlpha=1,this._basic=new $,this._fsQuad=new ee(null)}dispose(){for(let e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(let e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose();for(let e=0;e<this.separableBlurMaterials.length;e++)this.separableBlurMaterials[e].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this._basic.dispose(),this._fsQuad.dispose()}setSize(e,i){let a=Math.round(e/2),u=Math.round(i/2);this.renderTargetBright.setSize(a,u);for(let o=0;o<this.nMips;o++)this.renderTargetsHorizontal[o].setSize(a,u),this.renderTargetsVertical[o].setSize(a,u),this.separableBlurMaterials[o].uniforms.invSize.value=new c(1/a,1/u),a=Math.round(a/2),u=Math.round(u/2)}render(e,i,a,u,o){e.getClearColor(this._oldClearColor),this._oldClearAlpha=e.getClearAlpha();const d=e.autoClear;e.autoClear=!1,e.setClearColor(this.clearColor,0),o&&e.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this._fsQuad.material=this._basic,this._basic.map=a.texture,e.setRenderTarget(null),e.clear(),this._fsQuad.render(e)),this.highPassUniforms.tDiffuse.value=a.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this._fsQuad.material=this.materialHighPassFilter,e.setRenderTarget(this.renderTargetBright),e.clear(),this._fsQuad.render(e);let g=this.renderTargetBright;for(let l=0;l<this.nMips;l++)this._fsQuad.material=this.separableBlurMaterials[l],this.separableBlurMaterials[l].uniforms.colorTexture.value=g.texture,this.separableBlurMaterials[l].uniforms.direction.value=b.BlurDirectionX,e.setRenderTarget(this.renderTargetsHorizontal[l]),e.clear(),this._fsQuad.render(e),this.separableBlurMaterials[l].uniforms.colorTexture.value=this.renderTargetsHorizontal[l].texture,this.separableBlurMaterials[l].uniforms.direction.value=b.BlurDirectionY,e.setRenderTarget(this.renderTargetsVertical[l]),e.clear(),this._fsQuad.render(e),g=this.renderTargetsVertical[l];this._fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.setRenderTarget(this.renderTargetsHorizontal[0]),e.clear(),this._fsQuad.render(e),this._fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,o&&e.state.buffers.stencil.setTest(!0),this.renderToScreen?(e.setRenderTarget(null),this._fsQuad.render(e)):(e.setRenderTarget(a),this._fsQuad.render(e)),e.setClearColor(this._oldClearColor,this._oldClearAlpha),e.autoClear=d}_getSeparableBlurMaterial(e){const i=[];for(let a=0;a<e;a++)i.push(.39894*Math.exp(-.5*a*a/(e*e))/e);return new w({defines:{KERNEL_RADIUS:e},uniforms:{colorTexture:{value:null},invSize:{value:new c(.5,.5)},direction:{value:new c(.5,.5)},gaussianCoefficients:{value:i}},vertexShader:`varying vec2 vUv; 34 void main() { 35 vUv = uv; 36 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 37 }`,fragmentShader:`#include <common> 38 varying vec2 vUv; 39 uniform sampler2D colorTexture; 40 uniform vec2 invSize; 41 uniform vec2 direction; 42 uniform float gaussianCoefficients[KERNEL_RADIUS]; 43 44 void main() { 45 float weightSum = gaussianCoefficients[0]; 46 vec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum; 47 for( int i = 1; i < KERNEL_RADIUS; i ++ ) { 48 float x = float(i); 49 float w = gaussianCoefficients[i]; 50 vec2 uvOffset = direction * invSize * x; 51 vec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb; 52 vec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb; 53 diffuseSum += (sample1 + sample2) * w; 54 weightSum += 2.0 * w; 55 } 56 gl_FragColor = vec4(diffuseSum/weightSum, 1.0); 57 }`})}_getCompositeMaterial(e){return new w({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:`varying vec2 vUv; 58 void main() { 59 vUv = uv; 60 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 61 }`,fragmentShader:`varying vec2 vUv; 62 uniform sampler2D blurTexture1; 63 uniform sampler2D blurTexture2; 64 uniform sampler2D blurTexture3; 65 uniform sampler2D blurTexture4; 66 uniform sampler2D blurTexture5; 67 uniform float bloomStrength; 68 uniform float bloomRadius; 69 uniform float bloomFactors[NUM_MIPS]; 70 uniform vec3 bloomTintColors[NUM_MIPS]; 71 72 float lerpBloomFactor(const in float factor) { 73 float mirrorFactor = 1.2 - factor; 74 return mix(factor, mirrorFactor, bloomRadius); 75 } 76 77 void main() { 78 gl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) + 79 lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) + 80 lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) + 81 lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) + 82 lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0
82) * texture2D(blurTexture5, vUv) ); 83 }`})}}b.BlurDirectionX=new c(1,0);b.BlurDirectionY=new c(0,1);console.log("3j.js running...");let H=1,C=.5,L=100,E=!0,k,G=1;const T=new te({title:"Acid Buddha"}),y={detachCamera:!1,jhanaSpeedFactor:1,openWebsite:function(){window.open("https://www.animanoir.xyz/","_blank")},openMoreExperimentsWebsite:function(){window.open("https://animanoir-experiments.netlify.app/","_blank")},isMusicOn:!0};T.add(y,"detachCamera").name("float with the buddha").onChange(t=>{k=t});T.add(y,"jhanaSpeedFactor").name("speed of the jhana").min(1).max(10).onChange(t=>{G=t,H=Math.max(.3,1/t),M.playbackRate=H,C=Math.max(.1,1/t),L=_e(t,1,10,100,110),n.fov=L,n.updateProjectionMatrix()});T.add(y,"openMoreExperimentsWebsite").name("+ experiments here");T.add(y,"openWebsite").name("by animanoir.xyz");T.add(y,"isMusicOn").name("Music:").onChange(t=>{E=t,E?A()?M.start():A().then(()=>{M.start()}):M.stop()});const M=new ie({url:"/musicsfx/acidBuddha.ogg",loop:!0}).toDestination();A().then(()=>{M.start(),M.playbackRate=H});const S=document.querySelector("#loading-bar"),O=new ue(()=>{window.setTimeout(()=>{Me.to(q.uniforms.uAlpha,{duration:3,value:0,onComplete:()=>{B.visible=!1}}),S.classList.add("ended"),setTimeout(()=>{S.remove()},1500)},500)},(t,e,i)=>{const a=e/i;a<1?S.innerHTML="loading the Buddha: "+a:S.innerHTML="fuck yeah the Buddha has loaded..."}),h=new oe,Ce=new re(window.innerWidth,window.innerHeight),q=new w({transparent:!0,uniforms:{uAlpha:{value:1}},vertexShader:` 84 void main(){ 85 gl_Position = vec4(position, 1.0); 86 } 87 `,fragmentShader:` 88 uniform float uAlpha; 89 void main(){ 90 gl_FragColor = vec4(0.0,0.0,0.0, uAlpha); 91 } 92 `}),B=new se(Ce,q);B.renderOrder=999;B.position.z=0;h.add(B);const s={width:window.innerWidth,height:window.innerHeight},n=new ae(L,s.width/s.height);n.position.z=1.5;h.add(n);const V=new b;V.strength=.5;V.radius=.5;V.threshold=.8;const Pe=new ne,Be=new ye(h,n,{focus:1.2,aperture:.0025,maxblur:.01,width:window.innerWidth,height:window.innerHeight});function W(){return Math.min(window.devicePixelRatio,2)}function _e(t,e,i,a,u){const o=(t-e)/(i-e);return a+o*(u-a)}let f;const Ue=new le(O),ze=document.querySelector("canvas#maincanvas"),N=Ue.load(["/environmentmaps/chinese/individual/px.png","/environmentmaps/chinese/individual/nx.png","/environmentmaps/chinese/individual/py.png","/environmentmaps/chinese/individual/ny.png","/environmentmaps/chinese/individual/pz.png","/environmentmaps/chinese/individual/nz.png"]);h.environment=N;h.environmentIntensity=5;const Fe=new he(16777215,1);h.add(Fe);const Re=new Te(O);Re.load("/models/buddha/scene.gltf",t=>{f=t.scenes[0],h.add(f)},void 0,function(t){console.error(t)});const De=new de,Ae=De.load("https://threejs.org/examples/textures/sprites/circle.png"),I=new me(2,32,32),K=new ce({size:.005,sizeAttenuation:!0,vertexColors:!0,map:Ae,transparent:!0,depthWrite:!1,depthTest:!0,blending:j}),r=new Float32Array(I.attributes.position.count*3);for(let t=0;t<r.length;t+=3){const e=Math.random();e<.25?(r[t]=1,r[t+1]=.4+Math.random()*.3,r[t+2]=.8+Math.random()*.2):e<.5?(r[t]=.3+Math.random()*.2,r[t+1]=.5+Math.random()*.3,r[t+2]=1):e<.75?(r[t]=.6+Math.random()*.4,r[t+1]=.1+Math.random()*.3,r[t+2]=.9+Math.random()*.1):(r[t]=.9+Math.random()*.1,r[t+1]=.9+Math.random()*.1,r[t+2]=.9+Math.random()*.1)}I.setAttribute("color",new pe(r,3));const X=new fe(I,K);h.add(X);const He={positionIntensity:.5,rotationIntensity:.1,speed:1},P={position:new x,quaternion:new we};function Le(t,e,i){P.position.copy(t.position),P.quaternion.copy(t.quaternion),t.position.x+=Math.sin(e*1.1*i.speed)*i.positionIntensity,t.position.y+=Math.sin(e*.9*i.speed)*i.positionIntensity,t.position.x+=Math.sin(e*2.2*i.speed)*i.positionIntensity*.3,t.position.y+=Math.sin(e*1.8*i.speed)*i.positionIntensity*.3,t.position.z+=Math.sin(e*1.4*i.speed)*i.positionIntensity*.2,t.rotateX(Math.sin(e*.5*i.speed)*i.rotationIntensity),t.rotateZ(Math.sin(e*.6*i.speed)*i.rotationIntensity)}const p=new ve({canvas:ze,antialias:!0});p.setPixelRatio(W());p.setSize(s.width,s.height);p.shadowMap.autoUpdate=!1;p.render(h,n);const Ve=()=>{s.width=window.innerWidth,s.height=window.innerHeight,n.aspect=s.width/s.height,n.updateProjectionMatrix(),p.setSize(s.width,s.height),v.setSize(s.width,s.height),p.render(h,n),p.setPixelRatio(W())};window.addEventListener("resize",Ve);const v=new ge(p);v.setSize(s.width,s.height);v.setPixelRatio(W());const We=new xe(h,n);v.addPass(We);v.addPass(Be);v.addPass(Pe);let Ie=new be;function Y(){requestAnimationFrame(Y);const t=Ie.getElapsedTime();K.size=Math.abs(Math.sin(t)*.07),X.rotation.y=t*G,Le(n,t,He),f&&(f.rotation.y=t*-1*C,f.rotation.z=t*-1*C,f.rotation.x=t*-1*C,k||n.lookAt(f.position)),N&&(h.environmentRotation.x=t*5),v.render(),n.position.copy(P.position),n.quaternion.copy(P.quaternion)}Y();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.