1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[419],{19419:function(e,t,o){"use strict";o.r(t),o.d(t,{PackScene:function(){return M}});var n=o(57437),r=o(2265),i=o(67188),l=o(97776);async function a(e){try{let t=await fetch(e);if(!t.ok)throw Error("Failed to load file: ".concat(t.statusText));let o=await t.arrayBuffer(),n=new Float32Array(o),r=[];for(let e=0;e<n.length;e+=3)r.push([n[e],n[e+1],n[e+2]]);return r}catch(e){throw console.error("Error loading bin file:",e),e}}var s=o(66342),c=o(32325),u=o(30638),h=o.n(u),d=o(85417),m=o(13412);function p(e){let{name:t,image:o,country:r}=e;return(0,n.jsxs)("div",{className:h().htmlEl,children:[(0,n.jsxs)("div",{className:h().htmlEl_wrap,children:[(0,n.jsx)("div",{className:h().htmlEl_image,children:(0,n.jsx)(m.Z,{src:o.image})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(d.Z,{color:"text-brand-light",children:t}),(0,n.jsx)(d.Z,{color:"text-light-50",size:"18",children:r})]})]}),(0,n.jsx)("div",{className:h().htmlEl_dot,children:(0,n.jsx)("span",{})})]})}let f=e=>{let{name:t,pos:o,rot:i,image:a,country:s}=e,u=(0,r.useRef)(null),h=(0,r.useRef)();return(0,r.useEffect)(()=>{var e;let t=new l.Vector3(o.x,o.y,o.z),n=new l.Euler(0,i.y,0);t.applyEuler(n),t.multiplyScalar(1),null===(e=u.current)||void 0===e||e.position.set(t.x,t.y,t.z)},[o,i]),(0,n.jsx)("group",{ref:u,name:t,children:(0,n.jsx)(c.V,{wrapperClass:"disable-selected",ref:h,zIndexRange:[10,0],children:(0,n.jsx)(p,{name:t,image:a,country:s},"key13".concat(t))})})},v={colorPoint:16777215,colorBackground:3355445},g=[{city:"Seattle",country:"Washington, US",lat:47.6840607775989,lon:-122.299065708786},{city:"Bangkok",country:"Metropolitan, Thailand",lat:13.7563,lon:100.5018}],x=[{image:"/images/bangkok-location.jpg"},{image:"/images/settle-location.png"}];var y=o(76443),w=o(30359),_=o(79940);let j=(0,i.g)({uColor:new l.Vector3(.6,.6,.6),uFocusDistance:3,uBlurSize:.95},"\n varying vec2 vUv;\n varying vec3 vWorldPosition;\n void main() {\n vUv = uv;\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n\n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n vWorldPosition = worldPosition.xyz;\n gl_PointSize = 15.0 / -mvPosition.z;\n // gl_PointSize = 15.0 ;\n gl_Position = projectionMatrix * mvPosition;\n }\n ","\n precision mediump float;\n varying vec2 vUv;\n varying vec3 vWorldPosition;\n uniform vec3 uColor;\n uniform float uFocusDistance;\n uniform float uBlurSize;\n\n void main() {\n vec2 coord = gl_PointCoord - vec2(0.5);\n float dist = length(coord);\n\n float radius = 0.2;\n float smooth3 = 0.05;\n\n float alpha = 1.0 - smoothstep(radius - smooth3, radius, dist);\n alpha = pow(alpha, 1.5);\n\n float depth = distance(cameraPosition, vWorldPosition);\n float blurAlpha = 1.0 - smoothstep(uFocusDistance, uFocusDistance + uBlurSize, depth);\n\n alpha *= blurAlpha;\n\n vec3 colorPoint = vec3(210., 202., 203.) / 255.0;\n gl_FragColor = vec4(colorPoint, alpha);\n }\n ");function b(){let e=(0,r.useRef)(null),t=(0,r.useRef)(),o=(0,r.useRef)(),i=90*Math.PI/180*1,[s,c]=(0,r.useState)([]),[u,h]=(0,r.useState)(!1),d="/3d/storePosGlobalFill.bin",{isDesktop:m}=(0,_.d)();(0,r.useEffect)(()=>{a(d).then(e=>{c(e),h(!0)}).catch(e=>{console.error("Error loading bin:",e)})},[d]);let{locations:p}=(0,r.useMemo)(()=>{let e=[];return g.forEach(t=>{let o=t.lat*Math.PI/180,n=t.lon*Math.PI/180,r=Math.cos(o)*Math.sin(n),i=Math.sin(o),l=Math.cos(o)*Math.cos(n);e.push({loc:[r,i,l],country:t.country,city:t.city})}),{locations:e}},[g]),j=function(e){let{locations:t,threshold:o=.01}=e,n=[];for(let e=0;e<t.length;e++){let[r,i,l]=t[e].loc,a=!0;for(let e=0;e<n.length;e++){let[t,s,c]=n[e].loc;if((r-t)**2+(i-s)**2+(l-c)**2<o**2){a=!1;break}}a&&n.push({loc:t[e].loc,country:t[e].country,city:t[e].city})}return n}({locations:p,threshold:.05}),b=(0,r.useRef)(),E=(0,r.useRef)(),P={mobi:{min:300,max:568},tablet:{min:568,max:1025},deskopDef:{min:1025,max:1920}},k=(0,r.useCallback)(()=>{if(b.current&&E.current&&o.current){let e=window.innerWidth;window.innerWidth,window.innerHeight;let t=0;e<P.mobi.max&&e>P.mobi.min?(b.current.position.copy(new l.Vector3(0,0,3.8)),t=0,o.current.rotation.set(0,t,0)):e>=P.tablet.min&&e<P.tablet.max?(b.current.position.copy(new l.Vector3(0,0,3.8)),t=-2.8,o.current.rotation.set(0,t,0)):e>=P.deskopDef.min&&(b.current.position.copy(new l.Vector3(0,0,2.5)),o.current.rotation.set(0,t,0)),b.current.updateMatrixWorld(),E.current.update(
1)}},[]);return(0,r.useEffect)(()=>{let e=setTimeout(()=>{k()},1e3);return window.addEventListener("resize",k),()=>{clearTimeout(e),window.removeEventListener("resize",k)}},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y.c,{ref:b,makeDefault:!0,position:[0,0,2.5],near:.01,far:100}),(0,n.jsx)(w.z,{ref:E,autoRotate:!!m,autoRotateSpeed:.5,enableZoom:!1,target:[0,0,0],enabled:!!m}),u&&(0,n.jsxs)("group",{ref:o,children:[(0,n.jsx)("group",{ref:e,position:[0,0,0],rotation:[0,i,0],name:"global_point",children:(0,n.jsxs)("points",{ref:t,children:[(0,n.jsx)("bufferGeometry",{children:(0,n.jsx)("bufferAttribute",{attach:"attributes-position",count:s.length,array:new Float32Array(s.flat()),itemSize:3})}),(0,n.jsx)("pointMat",{transparent:!0,depthWrite:!1,uColor:new l.Color(v.colorPoint)})]})}),j.map((e,t)=>(0,n.jsx)(f,{image:x[t],name:"".concat(e.city),country:e.country,rot:new l.Vector3(0,i+0,0),pos:new l.Vector3(e.loc[0],e.loc[1],e.loc[2])},t))]})]})}(0,s.e)({PointMat:j});var E=o(37602);function P(e){let{render:t=!0}=e,o=(0,s.D)(e=>e.advance);return(0,E.K)(e=>{t&&o(e/1e3)},{priority:1,fps:60}),null}var k=o(57585),z=o(21469);function M(){return(0,n.jsxs)(k.Xz,{frameloop:"never",gl:{powerPreference:"high-performance",alpha:!1,antialias:!1,stencil:!1,depth:!1}
1,children:[(0,n.jsx)(P,{}),(0,n.jsx)(z.A,{}),(0,n.jsx)("group",{position:[0,0,0],rotation:[0,0,0],children:(0,n.jsx)(b,{})}),(0,n.jsx)("color",{attach:"background",args:[v.colorBackground]})]})}},30638:function(e){e.exports={htmlEl:"styles_htmlEl__W5BsD",htmlEl_wrap:"styles_htmlEl_wrap__EyW3r",htmlEl_image:"styles_htmlEl_image__wJkTo",htmlEl_dot:"styles_htmlEl_dot__TQ8eM"}}}]);
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.