import{u as e,c as a,e as r}from"./index.fbca08c6.js";import{d as t,aj as o,s,F as n,r as i,o as d,c as l,w as p,a as c,W as u}from"./vendor.6afcf1a6.js";e();var h=t({data:()=>({ready:!1,colorPool:[o.random().rgb(),o.random().rgb(),o.random().rgb()]}),methods:{geoReady({instance:e}){const a=[],r=[];for(let t=0;t<50;t++){a.push(s.randFloatSpread(5),s.randFloatSpread(5),s.randFloatSpread(5));const[e,t,o]=this.colorPool[Math.floor(Math.random()*this.colorPool.length)];r.push(e/255,t/255,o/255)}e.setAttribute("position",new n(a,3)),e.setAttribute("color",new n(r,3)),this.update()},update(){this.ready=!0,requestAnimationFrame(this.update),this.$refs.points&&(this.$refs.points.$el.instance.rotation.z=2e-4*Date.now())}}});h.render=function(e,a,r,t,o,s){const n=i("WebGLRenderer"),u=i("bufferGeometry"),h=i("pointsMaterial"),f=i("points",!0),m=i("TroisCanvas");return d(),l(m,{cameraPosition:[0,0,7],renderer:"$attached.renderer"},{default:p((()=>[c(n,{args:[{antialias:!0,preserveDrawingBuffer:!0}],attach:"renderer",autoClearColor:!1}),c(f,{visible:e.ready,ref:"points",args:["$attached.geometry","$attached.material"]},{default:p((()=>[c(u,{onReady:e.geoReady},null,8,["onReady"]),c(h,{args:[{size:2,vertexColors:!0,depthTest:!1,sizeAttenuation:!1}]})])),_:1},8,["visible","args"])])),_:1})};const f=a(h);r({app:f,WebGLRenderer:u}),f.mount("#app");
