Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I disable focusing when a marker is clicked? #67

Open
nandorojo opened this issue May 27, 2021 · 11 comments
Open

How can I disable focusing when a marker is clicked? #67

nandorojo opened this issue May 27, 2021 · 11 comments

Comments

@nandorojo
Copy link

nandorojo commented May 27, 2021

Clicking a marker seems to update the focus on the globe. I'd like to disable this, perhaps with enableFocusOnClickMarker prop. This is the line in question, it seems:

this.updateFocus(marker.coordinates);

I don't want users to be able to click into the globe. Thanks!

@nandorojo
Copy link
Author

For now I just removed updateFocus using patch-package.

@iampranavdhar
Copy link

@nandorojo How can we do this ? Even I want it to not change the focus when clicked on the globe

@nandorojo
Copy link
Author

This is my patch file (impossible to read since it's minified) for version 5.0.2

diff --git a/node_modules/react-globe/dist/index.js b/node_modules/react-globe/dist/index.js
index 770113b..872a00a 100644
--- a/node_modules/react-globe/dist/index.js
+++ b/node_modules/react-globe/dist/index.js
@@ -1,2 +1,2 @@
-function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),o=e(t),n=require("es6-tween"),a=require("three"),i=e(require("resize-observer-polyfill")),r=require("three-glow-mesh"),s=require("d3-scale"),c=require("three/examples/jsm/controls/OrbitControls"),u=require("three.interaction"),l=e(require("tippy.js")),d={onClickMarker:function(e,t,o){},onDefocus:function(e){},onGlobeBackgroundTextureLoaded:function(){},onGlobeCloudsTextureLoaded:function(){},onGlobeTextureLoaded:function(){},onMouseOutMarker:function(e,t,o){},onMouseOverMarker:function(e,t,o){}},m="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",h="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",f=[1.29027,103.851959],p={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:function(e){return JSON.stringify(e.coordinates)},markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]};function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function k(e,t){var o=e[0]*Math.PI/180,n=(e[1]-180)*Math.PI/180;return[-t*Math.cos(o)*Math.cos(n),t*Math.sin(o),t*Math.cos(o)*Math.sin(n)]}function g(e,t){var o=b({},t);return Object.keys(o).forEach(function(t){var n=e[t];o[t]=void 0===n?o[t]:n}),o}function v(e){var t=e.to,o=e.animationDuration,a=e.easingFunction,i=e.onUpdate,r=e.onEnd,s=void 0===r?null:r,c=e.delay,u=void 0===c?0:c,l=a[0],d=a[1];new n.Tween(e.from).to(t,o).easing(n.Easing[l][d]).on("update",i).on("complete",s).delay(u).start()}var w=function(){function e(e){this.element=e,this.instance=l([e],{animation:"scale",arrow:!1})[0]}var t=e.prototype;return t.destroy=function(){this.instance.destroy()},t.hide=function(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()},t.show=function(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()},e}(),M=function(){function e(e){var t,o,n,i=e.canvasElement,r=e.initialCameraDistanceRadiusScale,s=void 0===r?p.cameraDistanceRadiusScale:r,l=e.initialCoordinates,m=void 0===l?f:l,h=e.textures,b=void 0===h?{}:h,g=e.tooltipElement;this.callbacks=d,this.focus=null,this.isLocked=!1,this.markers=[],this.options=p,this.textures=b,this.previousFocus=null,this.tooltip=new w(g),this.renderer=new a.WebGLRenderer({alpha:!0,antialias:!0,canvas:i}),this.camera=function(e,t){var o=new a.PerspectiveCamera;o.name="camera",o.far=3e5,o.fov=45,o.near=1;var n=k(e,300*t);return o.position.set(n[0],n[1],n[2]),o}(m,s),this.earth=function(){var e=new a.Mesh;e.geometry=new a.SphereGeometry(300,50,50),e.name="earth";var t=new a.Mesh;t.geometry=new a.SphereGeometry(301,50,50),t.name="clouds";var o=new a.Mesh;return o.name="background",o.geometry=new a.SphereGeometry(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=(t=new a.AmbientLight("white"),o=new a.PointLight("white"),t.name="ambientLight",o.name="pointLight",{ambient:t,point:o}),this.markerObjects=((n=new a.Group).name="markers",n),this.orbitControls=new c.OrbitControls(this.camera,this.renderer.domElement),this.scene=function(e){var t=e.camera,o=e.earth,n=e.lights,i=e.markerObjects,r=e.renderer,s=e.defocus,c=new a.Scene;return t.add(n.ambient),t.add(n.point),c.add(t),c.add(o.globe),c.add(i),new u.Interaction(r,c,t),c.on("click",s),c}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}var t=e.prototype;return t.animate=function(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))},t.animateClouds=function(){var e=this;["x","y","z"].forEach(function(t){e.earth.clouds.rotation[t]+=Math.random()/1e4})},t.applyAnimations=function(e){var t=this,o=0,n=[];return e.forEach(function(a,i){var r=a.coordinates,s=a.focusAnimationDuration,c={focusAnimationDuration:s,focusDistanceRadiusScale:a.focusDistanceRadiusScale,focusEasingFunction:a.focusEasingFunction},u=i===e.length-1,l=setTimeout(function(){t.unlock(),t.updateFocus(r,c,u)},o);n.push(l),o+=s}),function(){n.forEach(function(e){clearTimeout(e)})}},t.defocus=function(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))},t.destroy=function(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()},t.lock=function(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1},t.render=function(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),n.update()},t.resize=function(e){var t=e.height,o=e.width;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()},t.saveFocus=function(e){this.previousFocus=e},t.unlock=function(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0},t.updateCallbacks=function(e){void 0===e&&(e={}),this.callbacks=g(e,d)},t.updateFocus=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),this.isLocked||(this.focus=e,function(e,t,o){var n=o.options,a=o.previousFocus,i=o.shouldUnlockAfterFocus,r=o.lock,s=o.unlock,c=o.saveFocus,u=n.cameraDistanceRadiusScale,l=n.focusAnimationDuration,d=n.focusEasingFunction;if(e){var m=[t.position.x,t.position.y,t.position.z],h=k(e,300*n.focusDistanceRadiusScale);c(e),r(),v({from:m,to:h,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(m[0],m[1],m[2])},onEnd:function(){i&&s()}})}else if(a){var f=[t.position.x,t.position.y,t.position.z],p=k(a,300*u);r(),v({from:f,to:p,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(f[0],f[1],f[2])},onEnd:function(){c(null),s()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:g(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))},t.updateMarkers=function(e){var t=this;void 0===e&&(e=[]),this.markers=e,function(e,t){var o=t.callbacks,n=t.markers,i=t.options,c=i.markerExitAnimationDuration,u=i.markerExitEasingFunction,l=i.markerRadiusScaleRange,d=n.map(function(e){return e.value}),m=new Set(n.map(function(e){return e.id})),h=l[0],f=l[1],p=s.scaleLinear().domain([Math.min.apply(null,d),Math.max.apply(null,d)]).range([300*h,300*f]);n.forEach(function(t){var o=t.id,n=p(t.value),s=e.children.find(function(e){return e.marker.id===t.id});s||((s=function(e,t,o){var n,i,s=t.enableMarkerGlow,c=t.markerEnterAnimationDuration,u=t.markerEnterEasingFunction,l=t.markerGlowCoefficient,d=t.markerGlowPower,m=t.markerGlowRadiusScale,h=t.markerOffsetRadiusScale,f=t.markerRenderer,p=t.markerType;if(f)i=f(e);else{var b=e.color||"gold",g={size:0},w={size:o},M=new a.Mesh;v({from:g,to:w,animationDuration:c,easingFunction:u,onUpdate:function(){switch(p){case"bar":M.geometry=new a.BoxGeometry(3,3,g.size),M.material=new a.MeshLambertMaterial({color:b});break;case"dot":default:if(M.geometry=new a.SphereGeometry(g.size,10,10),M.material=new a.MeshBasicMaterial({color:b}),s){var e=r.createGlowMesh(M.geometry,{backside:!1,coefficient:l,color:b,power:d,size:g.size*m});M.children=[],M.add(e)}}}}),i=M}var x=k(e.coordinates,300+(h?300*h:"dot"===p?o*(1+m)/2:0));return(n=i.position).set.apply(n,x),i.lookAt(new a.Vector3(0,0,0)),i.name=e.id,i}(t,i,n)).name=o,e.add(s)),s.marker=t}),e.children.forEach(function(t){if(!m.has(t.marker.id)){var n=t.scale.toArray();v({from:n,to:[0,0,0],animationDuration:c,easingFunction:u,onUpdate:function(){var e;t&&(e=t.scale).set.apply(e,n)},onEnd:function(){e.remove(t)}})}!function(e,t){var o=e.marker;e._listeners={},e.on("click",function(n){t.onClickMarker(o,e,n.data.originalEvent)}),e.on("mousemove",function(n){t.onMouseOverMarker(o,e,n.data.originalEvent)}),e.on("mouseout",function(n){t.onMouseOutMarker(o,e,n.data.originalEvent)})}(t,o)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:function(e,o,n){t.updateFocus(e.coordinates),t.callbacks.onClickMarker(e,o,n)},onMouseOutMarker:function(e,o,n){t.tooltip.hide(),t.callbacks.onMouseOutMarker(e,o,n)},onMouseOverMarker:function(e,o,n){t.options.enableMarkerTooltip&&t.tooltip.show(n.clientX,n.clientY,t.options.markerTooltipRenderer(o.marker)),t.callbacks.onMouseOverMarker(e,o,n)}}})},t.updateOptions=function(e){void 0===e&&(e={}),this.options=g(e,p),function(e,t){var o=t.callbacks,n=t.options,i=t.textures,s=n.globeCloudsOpacity,c=o.onGlobeBackgroundTextureLoaded,u=o.onGlobeCloudsTextureLoaded,l=o.onGlobeTextureLoaded,d=i.globeBackgroundTexture,f=void 0===d?"https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png":d,p=i.globeCloudsTexture,b=void 0===p?m:p,k=i.globeTexture,g=void 0===k?h:k,v=e.clouds,w=e.globe,M=e.glow,x=e.background;n.enableGlobeGlow&&((M=r.createGlowMesh(w.geometry,{backside:!0,coefficient:n.globeGlowCoefficient,color:n.globeGlowColor,power:n.globeGlowPower,size:300*n.globeGlowRadiusScale})).name="glow"),g&&(new a.TextureLoader).load(g,function(e){w.material=new a.MeshLambertMaterial({map:e}),w.remove(w.getObjectByName("glow")),w.add(M),l()},function(){},l),f&&((new a.TextureLoader).load(f,function(e){x.material=new a.MeshBasicMaterial({map:e,side:a.BackSide}),c()},function(){},c),w.remove(w.getObjectByName("background")),w.add(x)),b&&((new a.TextureLoader).load(b,function(e){v.material=new a.MeshLambertMaterial({map:e,transparent:!0}),v.material.opacity=s,u()},function(){},u),w.remove(w.getObjectByName("clouds")),w.add(v))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){var o=t.ambientLightIntensity,n=t.pointLightColor,i=t.pointLightIntensity,r=t.pointLightPositionRadiusScales,s=e.ambient,c=e.point,u=r[0],l=r[1],d=r[2];s.color=new a.Color(t.ambientLightColor),s.intensity=o,c.color=new a.Color(n),c.intensity=i,c.position.set(300*u,300*l,300*d)}(this.lights,this.options),function(e,t){var o=t.cameraAutoRotateSpeed,n=t.cameraMaxDistanceRadiusScale,a=t.cameraMaxPolarAngle,i=t.cameraMinPolarAngle,r=t.cameraRotateSpeed,s=t.cameraZoomSpeed,c=t.enableCameraRotate,u=t.enableCameraZoom;e.autoRotate=t.enableCameraAutoRotate,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=c,e.enableZoom=u,e.maxDistance=300*n,e.maxPolarAngle=a,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)},e}();exports.Globe=M,exports.default=function(e){var n=e.animations,a=void 0===n?[]:n,r=e.focus,s=e.height,c=void 0===s?"100%":s,u=e.globeBackgroundTexture,l=e.globeCloudsTexture,d=e.globeTexture,m=e.initialCameraDistanceRadiusScale,h=e.initialCoordinates,f=e.markers,b=e.options,k=void 0===b?p:b,g=e.width,v=void 0===g?"100%":g,w=e.onClickMarker,x=e.onDefocus,y=e.onGetGlobe,C=e.onGlobeBackgroundTextureLoaded,R=e.onGlobeCloudsTextureLoaded,G=e.onGlobeTextureLoaded,E=e.onMouseOutMarker,S=e.onMouseOverMarker,L=t.useRef(null),O=t.useRef(null),T=t.useRef(null),D=t.useRef(null);return t.useEffect(function(){var e=new M({canvasElement:L.current,initialCameraDistanceRadiusScale:m||k.cameraDistanceRadiusScale,initialCoordinates:h,textures:{globeBackgroundTexture:u,globeCloudsTexture:l,globeTexture:d},tooltipElement:T.current});return e.animate(),D.current=e,y&&y(e),function(){return e.destroy()}},[u,l,d,m,k.cameraDistanceRadiusScale,h,y]),t.useEffect(function(){var e,t,o,n=D.current;return e=O.current,t=n.resize.bind(n),(o=new i(function(e){if(e&&0!==e.length){var o=e[0].contentRect;t({height:o.height,width:o.width})}})).observe(e),function(){return o.unobserve(e)}},[]),t.useEffect(function(){D.current.updateCallbacks({onClickMarker:w,onDefocus:x,onGlobeBackgroundTextureLoaded:C,onGlobeCloudsTextureLoaded:R,onGlobeTextureLoaded:G,onMouseOutMarker:E,onMouseOverMarker:S})},[w,x,C,R,G,E,S]),t.useEffect(function(){D.current.updateOptions(k)},[k]),t.useEffect(function(){D.current.updateMarkers(f)},[f]),t.useEffect(function(){D.current.updateFocus(r)},[r]),t.useEffect(function(){return D.current.applyAnimations(a)},[a]),o.createElement("div",{ref:O,style:{height:c,width:v}},o.createElement("canvas",{ref:L}),o.createElement("div",{ref:T}))},exports.defaultBarMarkerOptions={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"},exports.defaultCallbacks=d,exports.defaultDotMarkerOptions={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},exports.defaultGlobeBackgroundTexture="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",exports.defaultGlobeCloudsTexture=m,exports.defaultGlobeTexture=h,exports.defaultInitialCoordinates=f,exports.defaultOptions=p,exports.tween=v;
+function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=require("react"),o=e(t),n=require("es6-tween"),a=require("three"),i=e(require("resize-observer-polyfill")),r=require("three-glow-mesh"),s=require("d3-scale"),c=require("three/examples/jsm/controls/OrbitControls"),u=require("three.interaction"),l=e(require("tippy.js")),d={onClickMarker:function(e,t,o){},onDefocus:function(e){},onGlobeBackgroundTextureLoaded:function(){},onGlobeCloudsTextureLoaded:function(){},onGlobeTextureLoaded:function(){},onMouseOutMarker:function(e,t,o){},onMouseOverMarker:function(e,t,o){}},m="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",h="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",f=[1.29027,103.851959],p={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:function(e){return JSON.stringify(e.coordinates)},markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]};function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function k(e,t){var o=e[0]*Math.PI/180,n=(e[1]-180)*Math.PI/180;return[-t*Math.cos(o)*Math.cos(n),t*Math.sin(o),t*Math.cos(o)*Math.sin(n)]}function g(e,t){var o=b({},t);return Object.keys(o).forEach(function(t){var n=e[t];o[t]=void 0===n?o[t]:n}),o}function v(e){var t=e.to,o=e.animationDuration,a=e.easingFunction,i=e.onUpdate,r=e.onEnd,s=void 0===r?null:r,c=e.delay,u=void 0===c?0:c,l=a[0],d=a[1];new n.Tween(e.from).to(t,o).easing(n.Easing[l][d]).on("update",i).on("complete",s).delay(u).start()}var w=function(){function e(e){this.element=e,this.instance=l([e],{animation:"scale",arrow:!1})[0]}var t=e.prototype;return t.destroy=function(){this.instance.destroy()},t.hide=function(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()},t.show=function(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()},e}(),M=function(){function e(e){var t,o,n,i=e.canvasElement,r=e.initialCameraDistanceRadiusScale,s=void 0===r?p.cameraDistanceRadiusScale:r,l=e.initialCoordinates,m=void 0===l?f:l,h=e.textures,b=void 0===h?{}:h,g=e.tooltipElement;this.callbacks=d,this.focus=null,this.isLocked=!1,this.markers=[],this.options=p,this.textures=b,this.previousFocus=null,this.tooltip=new w(g),this.renderer=new a.WebGLRenderer({alpha:!0,antialias:!0,canvas:i}),this.camera=function(e,t){var o=new a.PerspectiveCamera;o.name="camera",o.far=3e5,o.fov=45,o.near=1;var n=k(e,300*t);return o.position.set(n[0],n[1],n[2]),o}(m,s),this.earth=function(){var e=new a.Mesh;e.geometry=new a.SphereGeometry(300,50,50),e.name="earth";var t=new a.Mesh;t.geometry=new a.SphereGeometry(301,50,50),t.name="clouds";var o=new a.Mesh;return o.name="background",o.geometry=new a.SphereGeometry(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=(t=new a.AmbientLight("white"),o=new a.PointLight("white"),t.name="ambientLight",o.name="pointLight",{ambient:t,point:o}),this.markerObjects=((n=new a.Group).name="markers",n),this.orbitControls=new c.OrbitControls(this.camera,this.renderer.domElement),this.scene=function(e){var t=e.camera,o=e.earth,n=e.lights,i=e.markerObjects,r=e.renderer,s=e.defocus,c=new a.Scene;return t.add(n.ambient),t.add(n.point),c.add(t),c.add(o.globe),c.add(i),new u.Interaction(r,c,t),c.on("click",s),c}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}var t=e.prototype;return t.animate=function(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))},t.animateClouds=function(){var e=this;["x","y","z"].forEach(function(t){e.earth.clouds.rotation[t]+=Math.random()/1e4})},t.applyAnimations=function(e){var t=this,o=0,n=[];return e.forEach(function(a,i){var r=a.coordinates,s=a.focusAnimationDuration,c={focusAnimationDuration:s,focusDistanceRadiusScale:a.focusDistanceRadiusScale,focusEasingFunction:a.focusEasingFunction},u=i===e.length-1,l=setTimeout(function(){t.unlock(),t.updateFocus(r,c,u)},o);n.push(l),o+=s}),function(){n.forEach(function(e){clearTimeout(e)})}},t.defocus=function(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))},t.destroy=function(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()},t.lock=function(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1},t.render=function(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),n.update()},t.resize=function(e){var t=e.height,o=e.width;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()},t.saveFocus=function(e){this.previousFocus=e},t.unlock=function(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0},t.updateCallbacks=function(e){void 0===e&&(e={}),this.callbacks=g(e,d)},t.updateFocus=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),this.isLocked||(this.focus=e,function(e,t,o){var n=o.options,a=o.previousFocus,i=o.shouldUnlockAfterFocus,r=o.lock,s=o.unlock,c=o.saveFocus,u=n.cameraDistanceRadiusScale,l=n.focusAnimationDuration,d=n.focusEasingFunction;if(e){var m=[t.position.x,t.position.y,t.position.z],h=k(e,300*n.focusDistanceRadiusScale);c(e),r(),v({from:m,to:h,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(m[0],m[1],m[2])},onEnd:function(){i&&s()}})}else if(a){var f=[t.position.x,t.position.y,t.position.z],p=k(a,300*u);r(),v({from:f,to:p,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(f[0],f[1],f[2])},onEnd:function(){c(null),s()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:g(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))},t.updateMarkers=function(e){var t=this;void 0===e&&(e=[]),this.markers=e,function(e,t){var o=t.callbacks,n=t.markers,i=t.options,c=i.markerExitAnimationDuration,u=i.markerExitEasingFunction,l=i.markerRadiusScaleRange,d=n.map(function(e){return e.value}),m=new Set(n.map(function(e){return e.id})),h=l[0],f=l[1],p=s.scaleLinear().domain([Math.min.apply(null,d),Math.max.apply(null,d)]).range([300*h,300*f]);n.forEach(function(t){var o=t.id,n=p(t.value),s=e.children.find(function(e){return e.marker.id===t.id});s||((s=function(e,t,o){var n,i,s=t.enableMarkerGlow,c=t.markerEnterAnimationDuration,u=t.markerEnterEasingFunction,l=t.markerGlowCoefficient,d=t.markerGlowPower,m=t.markerGlowRadiusScale,h=t.markerOffsetRadiusScale,f=t.markerRenderer,p=t.markerType;if(f)i=f(e);else{var b=e.color||"gold",g={size:0},w={size:o},M=new a.Mesh;v({from:g,to:w,animationDuration:c,easingFunction:u,onUpdate:function(){switch(p){case"bar":M.geometry=new a.BoxGeometry(3,3,g.size),M.material=new a.MeshLambertMaterial({color:b});break;case"dot":default:if(M.geometry=new a.SphereGeometry(g.size,10,10),M.material=new a.MeshBasicMaterial({color:b}),s){var e=r.createGlowMesh(M.geometry,{backside:!1,coefficient:l,color:b,power:d,size:g.size*m});M.children=[],M.add(e)}}}}),i=M}var x=k(e.coordinates,300+(h?300*h:"dot"===p?o*(1+m)/2:0));return(n=i.position).set.apply(n,x),i.lookAt(new a.Vector3(0,0,0)),i.name=e.id,i}(t,i,n)).name=o,e.add(s)),s.marker=t}),e.children.forEach(function(t){if(!m.has(t.marker.id)){var n=t.scale.toArray();v({from:n,to:[0,0,0],animationDuration:c,easingFunction:u,onUpdate:function(){var e;t&&(e=t.scale).set.apply(e,n)},onEnd:function(){e.remove(t)}})}!function(e,t){var o=e.marker;e._listeners={},e.on("click",function(n){t.onClickMarker(o,e,n.data.originalEvent)}),e.on("mousemove",function(n){t.onMouseOverMarker(o,e,n.data.originalEvent)}),e.on("mouseout",function(n){t.onMouseOutMarker(o,e,n.data.originalEvent)})}(t,o)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:function(e,o,n){t.callbacks.onClickMarker(e,o,n)},onMouseOutMarker:function(e,o,n){t.tooltip.hide(),t.callbacks.onMouseOutMarker(e,o,n)},onMouseOverMarker:function(e,o,n){t.options.enableMarkerTooltip&&t.tooltip.show(n.clientX,n.clientY,t.options.markerTooltipRenderer(o.marker)),t.callbacks.onMouseOverMarker(e,o,n)}}})},t.updateOptions=function(e){void 0===e&&(e={}),this.options=g(e,p),function(e,t){var o=t.callbacks,n=t.options,i=t.textures,s=n.globeCloudsOpacity,c=o.onGlobeBackgroundTextureLoaded,u=o.onGlobeCloudsTextureLoaded,l=o.onGlobeTextureLoaded,d=i.globeBackgroundTexture,f=void 0===d?"https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png":d,p=i.globeCloudsTexture,b=void 0===p?m:p,k=i.globeTexture,g=void 0===k?h:k,v=e.clouds,w=e.globe,M=e.glow,x=e.background;n.enableGlobeGlow&&((M=r.createGlowMesh(w.geometry,{backside:!0,coefficient:n.globeGlowCoefficient,color:n.globeGlowColor,power:n.globeGlowPower,size:300*n.globeGlowRadiusScale})).name="glow"),g&&(new a.TextureLoader).load(g,function(e){w.material=new a.MeshLambertMaterial({map:e}),w.remove(w.getObjectByName("glow")),w.add(M),l()},function(){},l),f&&((new a.TextureLoader).load(f,function(e){x.material=new a.MeshBasicMaterial({map:e,side:a.BackSide}),c()},function(){},c),w.remove(w.getObjectByName("background")),w.add(x)),b&&((new a.TextureLoader).load(b,function(e){v.material=new a.MeshLambertMaterial({map:e,transparent:!0}),v.material.opacity=s,u()},function(){},u),w.remove(w.getObjectByName("clouds")),w.add(v))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){var o=t.ambientLightIntensity,n=t.pointLightColor,i=t.pointLightIntensity,r=t.pointLightPositionRadiusScales,s=e.ambient,c=e.point,u=r[0],l=r[1],d=r[2];s.color=new a.Color(t.ambientLightColor),s.intensity=o,c.color=new a.Color(n),c.intensity=i,c.position.set(300*u,300*l,300*d)}(this.lights,this.options),function(e,t){var o=t.cameraAutoRotateSpeed,n=t.cameraMaxDistanceRadiusScale,a=t.cameraMaxPolarAngle,i=t.cameraMinPolarAngle,r=t.cameraRotateSpeed,s=t.cameraZoomSpeed,c=t.enableCameraRotate,u=t.enableCameraZoom;e.autoRotate=t.enableCameraAutoRotate,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=c,e.enableZoom=u,e.maxDistance=300*n,e.maxPolarAngle=a,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)},e}();exports.Globe=M,exports.default=function(e){var n=e.animations,a=void 0===n?[]:n,r=e.focus,s=e.height,c=void 0===s?"100%":s,u=e.globeBackgroundTexture,l=e.globeCloudsTexture,d=e.globeTexture,m=e.initialCameraDistanceRadiusScale,h=e.initialCoordinates,f=e.markers,b=e.options,k=void 0===b?p:b,g=e.width,v=void 0===g?"100%":g,w=e.onClickMarker,x=e.onDefocus,y=e.onGetGlobe,C=e.onGlobeBackgroundTextureLoaded,R=e.onGlobeCloudsTextureLoaded,G=e.onGlobeTextureLoaded,E=e.onMouseOutMarker,S=e.onMouseOverMarker,L=t.useRef(null),O=t.useRef(null),T=t.useRef(null),D=t.useRef(null);return t.useEffect(function(){var e=new M({canvasElement:L.current,initialCameraDistanceRadiusScale:m||k.cameraDistanceRadiusScale,initialCoordinates:h,textures:{globeBackgroundTexture:u,globeCloudsTexture:l,globeTexture:d},tooltipElement:T.current});return e.animate(),D.current=e,y&&y(e),function(){return e.destroy()}},[u,l,d,m,k.cameraDistanceRadiusScale,h,y]),t.useEffect(function(){var e,t,o,n=D.current;return e=O.current,t=n.resize.bind(n),(o=new i(function(e){if(e&&0!==e.length){var o=e[0].contentRect;t({height:o.height,width:o.width})}})).observe(e),function(){return o.unobserve(e)}},[]),t.useEffect(function(){D.current.updateCallbacks({onClickMarker:w,onDefocus:x,onGlobeBackgroundTextureLoaded:C,onGlobeCloudsTextureLoaded:R,onGlobeTextureLoaded:G,onMouseOutMarker:E,onMouseOverMarker:S})},[w,x,C,R,G,E,S]),t.useEffect(function(){D.current.updateOptions(k)},[k]),t.useEffect(function(){D.current.updateMarkers(f)},[f]),t.useEffect(function(){D.current.updateFocus(r)},[r]),t.useEffect(function(){return D.current.applyAnimations(a)},[a]),o.createElement("div",{ref:O,style:{height:c,width:v}},o.createElement("canvas",{ref:L}),o.createElement("div",{ref:T}))},exports.defaultBarMarkerOptions={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"},exports.defaultCallbacks=d,exports.defaultDotMarkerOptions={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},exports.defaultGlobeBackgroundTexture="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",exports.defaultGlobeCloudsTexture=m,exports.defaultGlobeTexture=h,exports.defaultInitialCoordinates=f,exports.defaultOptions=p,exports.tween=v;
 //# sourceMappingURL=index.js.map
diff --git a/node_modules/react-globe/dist/index.modern.js b/node_modules/react-globe/dist/index.modern.js
index 615c419..9cfab08 100644
--- a/node_modules/react-globe/dist/index.modern.js
+++ b/node_modules/react-globe/dist/index.modern.js
@@ -1,2 +1,2 @@
-import e,{useRef as t,useEffect as o}from"react";import{Tween as a,Easing as n,update as i}from"es6-tween";import{PerspectiveCamera as r,Mesh as s,SphereGeometry as c,TextureLoader as l,MeshLambertMaterial as u,MeshBasicMaterial as d,BackSide as m,AmbientLight as h,PointLight as p,Color as b,Group as k,BoxGeometry as g,Vector3 as f,WebGLRenderer as w,Scene as M}from"three";import y from"resize-observer-polyfill";import{createGlowMesh as C}from"three-glow-mesh";import{scaleLinear as x}from"d3-scale";import{OrbitControls as R}from"three/examples/jsm/controls/OrbitControls";import{Interaction as v}from"three.interaction";import E from"tippy.js";const S={onClickMarker:(e,t,o)=>{},onDefocus:e=>{},onGlobeBackgroundTextureLoaded:()=>{},onGlobeCloudsTextureLoaded:()=>{},onGlobeTextureLoaded:()=>{},onMouseOutMarker:(e,t,o)=>{},onMouseOverMarker:(e,t,o)=>{}},F="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",D="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",G="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",O=[1.29027,103.851959],T={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:e=>JSON.stringify(e.coordinates),markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]},L={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},A={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"};function z(e,t){const[o,a]=e,n=o*Math.PI/180,i=(a-180)*Math.PI/180;return[-t*Math.cos(n)*Math.cos(i),t*Math.sin(n),t*Math.cos(n)*Math.sin(i)]}function P(e,t){const o={...t};return Object.keys(o).forEach(t=>{const a=e[t];o[t]=void 0===a?o[t]:a}),o}function j({from:e,to:t,animationDuration:o,easingFunction:i,onUpdate:r,onEnd:s=null,delay:c=0}){const[l,u]=i;new a(e).to(t,o).easing(n[l][u]).on("update",r).on("complete",s).delay(c).start()}class B{constructor(e){this.element=e,this.instance=E([e],{animation:"scale",arrow:!1})[0]}destroy(){this.instance.destroy()}hide(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()}show(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()}}class I{constructor({canvasElement:e,initialCameraDistanceRadiusScale:t=T.cameraDistanceRadiusScale,initialCoordinates:o=O,textures:a={},tooltipElement:n}){this.callbacks=S,this.focus=null,this.isLocked=!1,this.markers=[],this.options=T,this.textures=a,this.previousFocus=null,this.tooltip=new B(n),this.renderer=new w({alpha:!0,antialias:!0,canvas:e}),this.camera=function(e,t){const o=new r;o.name="camera",o.far=3e5,o.fov=45,o.near=1;const[a,n,i]=z(e,300*t);return o.position.set(a,n,i),o}(o,t),this.earth=function(){const e=new s;e.geometry=new c(300,50,50),e.name="earth";const t=new s;t.geometry=new c(301,50,50),t.name="clouds";const o=new s;return o.name="background",o.geometry=new c(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=function(){const e=new h("white"),t=new p("white");return e.name="ambientLight",t.name="pointLight",{ambient:e,point:t}}(),this.markerObjects=function(){const e=new k;return e.name="markers",e}(),this.orbitControls=new R(this.camera,this.renderer.domElement),this.scene=function({camera:e,earth:t,lights:o,markerObjects:a,renderer:n,defocus:i}){const r=new M;return e.add(o.ambient),e.add(o.point),r.add(e),r.add(t.globe),r.add(a),new v(n,r,e),r.on("click",i),r}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}animate(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))}animateClouds(){["x","y","z"].forEach(e=>{this.earth.clouds.rotation[e]+=Math.random()/1e4})}applyAnimations(e){let t=0;const o=[];return e.forEach((a,n)=>{const{coordinates:i,focusAnimationDuration:r,focusDistanceRadiusScale:s,focusEasingFunction:c}=a,l={focusAnimationDuration:r,focusDistanceRadiusScale:s,focusEasingFunction:c},u=n===e.length-1,d=setTimeout(()=>{this.unlock(),this.updateFocus(i,l,u)},t);o.push(d),t+=r}),()=>{o.forEach(e=>{clearTimeout(e)})}}defocus(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))}destroy(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()}lock(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1}render(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),i()}resize(e){const{height:t,width:o}=e;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()}saveFocus(e){this.previousFocus=e}unlock(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0}updateCallbacks(e={}){this.callbacks=P(e,S)}updateFocus(e,t={},o=!0){this.isLocked||(this.focus=e,function(e,t,{options:o,previousFocus:a,shouldUnlockAfterFocus:n,lock:i,unlock:r,saveFocus:s}){const{cameraDistanceRadiusScale:c,focusAnimationDuration:l,focusDistanceRadiusScale:u,focusEasingFunction:d}=o;if(e){const o=[t.position.x,t.position.y,t.position.z],a=z(e,300*u);s(e),i(),j({from:o,to:a,animationDuration:l,easingFunction:d,onUpdate:()=>{const[e,a,n]=o;t.position.set(e,a,n)},onEnd:()=>{n&&r()}})}else if(a){const e=[t.position.x,t.position.y,t.position.z],o=z(a,300*c);i(),j({from:e,to:o,animationDuration:l,easingFunction:d,onUpdate:()=>{const[o,a,n]=e;t.position.set(o,a,n)},onEnd:()=>{s(null),r()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:P(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))}updateMarkers(e=[]){this.markers=e,function(e,{callbacks:t,markers:o,options:a}){const{markerExitAnimationDuration:n,markerExitEasingFunction:i,markerRadiusScaleRange:r}=a,l=o.map(e=>e.value),m=new Set(o.map(e=>e.id)),[h,p]=r,b=x().domain([Math.min.apply(null,l),Math.max.apply(null,l)]).range([300*h,300*p]);o.forEach(t=>{const{id:o,value:n}=t,i=b(n);let r=e.children.find(e=>e.marker.id===t.id);r||(r=function(e,t,o){const{enableMarkerGlow:a,markerEnterAnimationDuration:n,markerEnterEasingFunction:i,markerGlowCoefficient:r,markerGlowPower:l,markerGlowRadiusScale:m,markerOffsetRadiusScale:h,markerRenderer:p,markerType:b}=t;let k;if(p)k=p(e);else{const t=e.color||"gold",h={size:0},p={size:o},f=new s;j({from:h,to:p,animationDuration:n,easingFunction:i,onUpdate:()=>{switch(b){case"bar":f.geometry=new g(3,3,h.size),f.material=new u({color:t});break;case"dot":default:if(f.geometry=new c(h.size,10,10),f.material=new d({color:t}),a){const e=C(f.geometry,{backside:!1,coefficient:r,color:t,power:l,size:h.size*m});f.children=[],f.add(e)}}}}),k=f}let w=0;w=h?300*h:"dot"===b?o*(1+m)/2:0;const M=z(e.coordinates,300+w);return k.position.set(...M),k.lookAt(new f(0,0,0)),k.name=e.id,k}(t,a,i),r.name=o,e.add(r)),r.marker=t}),e.children.forEach(o=>{if(!m.has(o.marker.id)){const t=o.scale.toArray();j({from:t,to:[0,0,0],animationDuration:n,easingFunction:i,onUpdate:()=>{o&&o.scale.set(...t)},onEnd:()=>{e.remove(o)}})}!function(e,t){const{marker:o}=e;e._listeners={},e.on("click",a=>{t.onClickMarker(o,e,a.data.originalEvent)}),e.on("mousemove",a=>{t.onMouseOverMarker(o,e,a.data.originalEvent)}),e.on("mouseout",a=>{t.onMouseOutMarker(o,e,a.data.originalEvent)})}(o,t)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:(e,t,o)=>{this.updateFocus(e.coordinates),this.callbacks.onClickMarker(e,t,o)},onMouseOutMarker:(e,t,o)=>{this.tooltip.hide(),this.callbacks.onMouseOutMarker(e,t,o)},onMouseOverMarker:(e,t,o)=>{this.options.enableMarkerTooltip&&this.tooltip.show(o.clientX,o.clientY,this.options.markerTooltipRenderer(t.marker)),this.callbacks.onMouseOverMarker(e,t,o)}}})}updateOptions(e={}){this.options=P(e,T),function(e,{callbacks:t,options:o,textures:a}){const{enableGlobeGlow:n,globeCloudsOpacity:i,globeGlowColor:r,globeGlowCoefficient:s,globeGlowPower:c,globeGlowRadiusScale:h}=o,{onGlobeBackgroundTextureLoaded:p,onGlobeCloudsTextureLoaded:b,onGlobeTextureLoaded:k}=t,{globeBackgroundTexture:g=F,globeCloudsTexture:f=D,globeTexture:w=G}=a;let{clouds:M,globe:y,glow:x,background:R}=e;n&&(x=C(y.geometry,{backside:!0,coefficient:s,color:r,power:c,size:300*h}),x.name="glow"),w&&(new l).load(w,e=>{y.material=new u({map:e}),y.remove(y.getObjectByName("glow")),y.add(x),k()},()=>{},k),g&&((new l).load(g,e=>{R.material=new d({map:e,side:m}),p()},()=>{},p),y.remove(y.getObjectByName("background")),y.add(R)),f&&((new l).load(f,e=>{M.material=new u({map:e,transparent:!0}),M.material.opacity=i,b()},()=>{},b),y.remove(y.getObjectByName("clouds")),y.add(M))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){const{ambientLightColor:o,ambientLightIntensity:a,pointLightColor:n,pointLightIntensity:i,pointLightPositionRadiusScales:r}=t,{ambient:s,point:c}=e,[l,u,d]=r;s.color=new b(o),s.intensity=a,c.color=new b(n),c.intensity=i,c.position.set(300*l,300*u,300*d)}(this.lights,this.options),function(e,t){const{cameraAutoRotateSpeed:o,cameraMaxDistanceRadiusScale:a,cameraMaxPolarAngle:n,cameraMinPolarAngle:i,cameraRotateSpeed:r,cameraZoomSpeed:s,enableCameraAutoRotate:c,enableCameraRotate:l,enableCameraZoom:u}=t;e.autoRotate=c,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=l,e.enableZoom=u,e.maxDistance=300*a,e.maxPolarAngle=n,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)}}export default function({animations:a=[],focus:n,height:i="100%",globeBackgroundTexture:r,globeCloudsTexture:s,globeTexture:c,initialCameraDistanceRadiusScale:l,initialCoordinates:u,markers:d,options:m=T,width:h="100%",onClickMarker:p,onDefocus:b,onGetGlobe:k,onGlobeBackgroundTextureLoaded:g,onGlobeCloudsTextureLoaded:f,onGlobeTextureLoaded:w,onMouseOutMarker:M,onMouseOverMarker:C}){const x=t(null),R=t(null),v=t(null),E=t(null);return o(()=>{const e=new I({canvasElement:x.current,initialCameraDistanceRadiusScale:l||m.cameraDistanceRadiusScale,initialCoordinates:u,textures:{globeBackgroundTexture:r,globeCloudsTexture:s,globeTexture:c},tooltipElement:v.current});return e.animate(),E.current=e,k&&k(e),()=>e.destroy()},[r,s,c,l,m.cameraDistanceRadiusScale,u,k]),o(()=>{const e=E.current;return function(e,t){const o=new y(e=>{if(!e||0===e.length)return;const{height:o,width:a}=e[0].contentRect;t({height:o,width:a})});return o.observe(e),()=>o.unobserve(e)}(R.current,e.resize.bind(e))},[]),o(()=>{E.current.updateCallbacks({onClickMarker:p,onDefocus:b,onGlobeBackgroundTextureLoaded:g,onGlobeCloudsTextureLoaded:f,onGlobeTextureLoaded:w,onMouseOutMarker:M,onMouseOverMarker:C})},[p,b,g,f,w,M,C]),o(()=>{E.current.updateOptions(m)},[m]),o(()=>{E.current.updateMarkers(d)},[d]),o(()=>{E.current.updateFocus(n)},[n]),o(()=>E.current.applyAnimations(a),[a]),e.createElement("div",{ref:R,style:{height:i,width:h}},e.createElement("canvas",{ref:x}),e.createElement("div",{ref:v}))}export{I as Globe,A as defaultBarMarkerOptions,S as defaultCallbacks,L as defaultDotMarkerOptions,F as defaultGlobeBackgroundTexture,D as defaultGlobeCloudsTexture,G as defaultGlobeTexture,O as defaultInitialCoordinates,T as defaultOptions,j as tween};
+import e,{useRef as t,useEffect as o}from"react";import{Tween as a,Easing as n,update as i}from"es6-tween";import{PerspectiveCamera as r,Mesh as s,SphereGeometry as c,TextureLoader as l,MeshLambertMaterial as u,MeshBasicMaterial as d,BackSide as m,AmbientLight as h,PointLight as p,Color as b,Group as k,BoxGeometry as g,Vector3 as f,WebGLRenderer as w,Scene as M}from"three";import y from"resize-observer-polyfill";import{createGlowMesh as C}from"three-glow-mesh";import{scaleLinear as x}from"d3-scale";import{OrbitControls as R}from"three/examples/jsm/controls/OrbitControls";import{Interaction as v}from"three.interaction";import E from"tippy.js";const S={onClickMarker:(e,t,o)=>{},onDefocus:e=>{},onGlobeBackgroundTextureLoaded:()=>{},onGlobeCloudsTextureLoaded:()=>{},onGlobeTextureLoaded:()=>{},onMouseOutMarker:(e,t,o)=>{},onMouseOverMarker:(e,t,o)=>{}},F="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",D="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",G="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",O=[1.29027,103.851959],T={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:e=>JSON.stringify(e.coordinates),markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]},L={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},A={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"};function z(e,t){const[o,a]=e,n=o*Math.PI/180,i=(a-180)*Math.PI/180;return[-t*Math.cos(n)*Math.cos(i),t*Math.sin(n),t*Math.cos(n)*Math.sin(i)]}function P(e,t){const o={...t};return Object.keys(o).forEach(t=>{const a=e[t];o[t]=void 0===a?o[t]:a}),o}function j({from:e,to:t,animationDuration:o,easingFunction:i,onUpdate:r,onEnd:s=null,delay:c=0}){const[l,u]=i;new a(e).to(t,o).easing(n[l][u]).on("update",r).on("complete",s).delay(c).start()}class B{constructor(e){this.element=e,this.instance=E([e],{animation:"scale",arrow:!1})[0]}destroy(){this.instance.destroy()}hide(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()}show(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()}}class I{constructor({canvasElement:e,initialCameraDistanceRadiusScale:t=T.cameraDistanceRadiusScale,initialCoordinates:o=O,textures:a={},tooltipElement:n}){this.callbacks=S,this.focus=null,this.isLocked=!1,this.markers=[],this.options=T,this.textures=a,this.previousFocus=null,this.tooltip=new B(n),this.renderer=new w({alpha:!0,antialias:!0,canvas:e}),this.camera=function(e,t){const o=new r;o.name="camera",o.far=3e5,o.fov=45,o.near=1;const[a,n,i]=z(e,300*t);return o.position.set(a,n,i),o}(o,t),this.earth=function(){const e=new s;e.geometry=new c(300,50,50),e.name="earth";const t=new s;t.geometry=new c(301,50,50),t.name="clouds";const o=new s;return o.name="background",o.geometry=new c(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=function(){const e=new h("white"),t=new p("white");return e.name="ambientLight",t.name="pointLight",{ambient:e,point:t}}(),this.markerObjects=function(){const e=new k;return e.name="markers",e}(),this.orbitControls=new R(this.camera,this.renderer.domElement),this.scene=function({camera:e,earth:t,lights:o,markerObjects:a,renderer:n,defocus:i}){const r=new M;return e.add(o.ambient),e.add(o.point),r.add(e),r.add(t.globe),r.add(a),new v(n,r,e),r.on("click",i),r}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}animate(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))}animateClouds(){["x","y","z"].forEach(e=>{this.earth.clouds.rotation[e]+=Math.random()/1e4})}applyAnimations(e){let t=0;const o=[];return e.forEach((a,n)=>{const{coordinates:i,focusAnimationDuration:r,focusDistanceRadiusScale:s,focusEasingFunction:c}=a,l={focusAnimationDuration:r,focusDistanceRadiusScale:s,focusEasingFunction:c},u=n===e.length-1,d=setTimeout(()=>{this.unlock(),this.updateFocus(i,l,u)},t);o.push(d),t+=r}),()=>{o.forEach(e=>{clearTimeout(e)})}}defocus(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))}destroy(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()}lock(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1}render(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),i()}resize(e){const{height:t,width:o}=e;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()}saveFocus(e){this.previousFocus=e}unlock(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0}updateCallbacks(e={}){this.callbacks=P(e,S)}updateFocus(e,t={},o=!0){this.isLocked||(this.focus=e,function(e,t,{options:o,previousFocus:a,shouldUnlockAfterFocus:n,lock:i,unlock:r,saveFocus:s}){const{cameraDistanceRadiusScale:c,focusAnimationDuration:l,focusDistanceRadiusScale:u,focusEasingFunction:d}=o;if(e){const o=[t.position.x,t.position.y,t.position.z],a=z(e,300*u);s(e),i(),j({from:o,to:a,animationDuration:l,easingFunction:d,onUpdate:()=>{const[e,a,n]=o;t.position.set(e,a,n)},onEnd:()=>{n&&r()}})}else if(a){const e=[t.position.x,t.position.y,t.position.z],o=z(a,300*c);i(),j({from:e,to:o,animationDuration:l,easingFunction:d,onUpdate:()=>{const[o,a,n]=e;t.position.set(o,a,n)},onEnd:()=>{s(null),r()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:P(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))}updateMarkers(e=[]){this.markers=e,function(e,{callbacks:t,markers:o,options:a}){const{markerExitAnimationDuration:n,markerExitEasingFunction:i,markerRadiusScaleRange:r}=a,l=o.map(e=>e.value),m=new Set(o.map(e=>e.id)),[h,p]=r,b=x().domain([Math.min.apply(null,l),Math.max.apply(null,l)]).range([300*h,300*p]);o.forEach(t=>{const{id:o,value:n}=t,i=b(n);let r=e.children.find(e=>e.marker.id===t.id);r||(r=function(e,t,o){const{enableMarkerGlow:a,markerEnterAnimationDuration:n,markerEnterEasingFunction:i,markerGlowCoefficient:r,markerGlowPower:l,markerGlowRadiusScale:m,markerOffsetRadiusScale:h,markerRenderer:p,markerType:b}=t;let k;if(p)k=p(e);else{const t=e.color||"gold",h={size:0},p={size:o},f=new s;j({from:h,to:p,animationDuration:n,easingFunction:i,onUpdate:()=>{switch(b){case"bar":f.geometry=new g(3,3,h.size),f.material=new u({color:t});break;case"dot":default:if(f.geometry=new c(h.size,10,10),f.material=new d({color:t}),a){const e=C(f.geometry,{backside:!1,coefficient:r,color:t,power:l,size:h.size*m});f.children=[],f.add(e)}}}}),k=f}let w=0;w=h?300*h:"dot"===b?o*(1+m)/2:0;const M=z(e.coordinates,300+w);return k.position.set(...M),k.lookAt(new f(0,0,0)),k.name=e.id,k}(t,a,i),r.name=o,e.add(r)),r.marker=t}),e.children.forEach(o=>{if(!m.has(o.marker.id)){const t=o.scale.toArray();j({from:t,to:[0,0,0],animationDuration:n,easingFunction:i,onUpdate:()=>{o&&o.scale.set(...t)},onEnd:()=>{e.remove(o)}})}!function(e,t){const{marker:o}=e;e._listeners={},e.on("click",a=>{t.onClickMarker(o,e,a.data.originalEvent)}),e.on("mousemove",a=>{t.onMouseOverMarker(o,e,a.data.originalEvent)}),e.on("mouseout",a=>{t.onMouseOutMarker(o,e,a.data.originalEvent)})}(o,t)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:(e,t,o)=>{this.callbacks.onClickMarker(e,t,o)},onMouseOutMarker:(e,t,o)=>{this.tooltip.hide(),this.callbacks.onMouseOutMarker(e,t,o)},onMouseOverMarker:(e,t,o)=>{this.options.enableMarkerTooltip&&this.tooltip.show(o.clientX,o.clientY,this.options.markerTooltipRenderer(t.marker)),this.callbacks.onMouseOverMarker(e,t,o)}}})}updateOptions(e={}){this.options=P(e,T),function(e,{callbacks:t,options:o,textures:a}){const{enableGlobeGlow:n,globeCloudsOpacity:i,globeGlowColor:r,globeGlowCoefficient:s,globeGlowPower:c,globeGlowRadiusScale:h}=o,{onGlobeBackgroundTextureLoaded:p,onGlobeCloudsTextureLoaded:b,onGlobeTextureLoaded:k}=t,{globeBackgroundTexture:g=F,globeCloudsTexture:f=D,globeTexture:w=G}=a;let{clouds:M,globe:y,glow:x,background:R}=e;n&&(x=C(y.geometry,{backside:!0,coefficient:s,color:r,power:c,size:300*h}),x.name="glow"),w&&(new l).load(w,e=>{y.material=new u({map:e}),y.remove(y.getObjectByName("glow")),y.add(x),k()},()=>{},k),g&&((new l).load(g,e=>{R.material=new d({map:e,side:m}),p()},()=>{},p),y.remove(y.getObjectByName("background")),y.add(R)),f&&((new l).load(f,e=>{M.material=new u({map:e,transparent:!0}),M.material.opacity=i,b()},()=>{},b),y.remove(y.getObjectByName("clouds")),y.add(M))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){const{ambientLightColor:o,ambientLightIntensity:a,pointLightColor:n,pointLightIntensity:i,pointLightPositionRadiusScales:r}=t,{ambient:s,point:c}=e,[l,u,d]=r;s.color=new b(o),s.intensity=a,c.color=new b(n),c.intensity=i,c.position.set(300*l,300*u,300*d)}(this.lights,this.options),function(e,t){const{cameraAutoRotateSpeed:o,cameraMaxDistanceRadiusScale:a,cameraMaxPolarAngle:n,cameraMinPolarAngle:i,cameraRotateSpeed:r,cameraZoomSpeed:s,enableCameraAutoRotate:c,enableCameraRotate:l,enableCameraZoom:u}=t;e.autoRotate=c,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=l,e.enableZoom=u,e.maxDistance=300*a,e.maxPolarAngle=n,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)}}export default function({animations:a=[],focus:n,height:i="100%",globeBackgroundTexture:r,globeCloudsTexture:s,globeTexture:c,initialCameraDistanceRadiusScale:l,initialCoordinates:u,markers:d,options:m=T,width:h="100%",onClickMarker:p,onDefocus:b,onGetGlobe:k,onGlobeBackgroundTextureLoaded:g,onGlobeCloudsTextureLoaded:f,onGlobeTextureLoaded:w,onMouseOutMarker:M,onMouseOverMarker:C}){const x=t(null),R=t(null),v=t(null),E=t(null);return o(()=>{const e=new I({canvasElement:x.current,initialCameraDistanceRadiusScale:l||m.cameraDistanceRadiusScale,initialCoordinates:u,textures:{globeBackgroundTexture:r,globeCloudsTexture:s,globeTexture:c},tooltipElement:v.current});return e.animate(),E.current=e,k&&k(e),()=>e.destroy()},[r,s,c,l,m.cameraDistanceRadiusScale,u,k]),o(()=>{const e=E.current;return function(e,t){const o=new y(e=>{if(!e||0===e.length)return;const{height:o,width:a}=e[0].contentRect;t({height:o,width:a})});return o.observe(e),()=>o.unobserve(e)}(R.current,e.resize.bind(e))},[]),o(()=>{E.current.updateCallbacks({onClickMarker:p,onDefocus:b,onGlobeBackgroundTextureLoaded:g,onGlobeCloudsTextureLoaded:f,onGlobeTextureLoaded:w,onMouseOutMarker:M,onMouseOverMarker:C})},[p,b,g,f,w,M,C]),o(()=>{E.current.updateOptions(m)},[m]),o(()=>{E.current.updateMarkers(d)},[d]),o(()=>{E.current.updateFocus(n)},[n]),o(()=>E.current.applyAnimations(a),[a]),e.createElement("div",{ref:R,style:{height:i,width:h}},e.createElement("canvas",{ref:x}),e.createElement("div",{ref:v}))}export{I as Globe,A as defaultBarMarkerOptions,S as defaultCallbacks,L as defaultDotMarkerOptions,F as defaultGlobeBackgroundTexture,D as defaultGlobeCloudsTexture,G as defaultGlobeTexture,O as defaultInitialCoordinates,T as defaultOptions,j as tween};
 //# sourceMappingURL=index.modern.js.map
diff --git a/node_modules/react-globe/dist/index.module.js b/node_modules/react-globe/dist/index.module.js
index fe5e566..2d33c8b 100644
--- a/node_modules/react-globe/dist/index.module.js
+++ b/node_modules/react-globe/dist/index.module.js
@@ -1,2 +1,2 @@
-import e,{useRef as t,useEffect as o}from"react";import{Tween as n,Easing as a,update as i}from"es6-tween";import{PerspectiveCamera as r,TextureLoader as s,MeshLambertMaterial as c,MeshBasicMaterial as u,BackSide as l,Mesh as d,SphereGeometry as m,Color as h,AmbientLight as f,PointLight as p,BoxGeometry as b,Vector3 as k,Group as g,WebGLRenderer as v,Scene as w}from"three";import y from"resize-observer-polyfill";import{createGlowMesh as M}from"three-glow-mesh";import{scaleLinear as x}from"d3-scale";import{OrbitControls as C}from"three/examples/jsm/controls/OrbitControls";import{Interaction as R}from"three.interaction";import E from"tippy.js";var S={onClickMarker:function(e,t,o){},onDefocus:function(e){},onGlobeBackgroundTextureLoaded:function(){},onGlobeCloudsTextureLoaded:function(){},onGlobeTextureLoaded:function(){},onMouseOutMarker:function(e,t,o){},onMouseOverMarker:function(e,t,o){}},F="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",D="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",G="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",O=[1.29027,103.851959],T={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:function(e){return JSON.stringify(e.coordinates)},markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]},L={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},A={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"};function z(){return(z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function P(e,t){var o=e[0]*Math.PI/180,n=(e[1]-180)*Math.PI/180;return[-t*Math.cos(o)*Math.cos(n),t*Math.sin(o),t*Math.cos(o)*Math.sin(n)]}function j(e,t){var o=z({},t);return Object.keys(o).forEach(function(t){var n=e[t];o[t]=void 0===n?o[t]:n}),o}function B(e){var t=e.to,o=e.animationDuration,i=e.easingFunction,r=e.onUpdate,s=e.onEnd,c=void 0===s?null:s,u=e.delay,l=void 0===u?0:u,d=i[0],m=i[1];new n(e.from).to(t,o).easing(a[d][m]).on("update",r).on("complete",c).delay(l).start()}var I=function(){function e(e){this.element=e,this.instance=E([e],{animation:"scale",arrow:!1})[0]}var t=e.prototype;return t.destroy=function(){this.instance.destroy()},t.hide=function(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()},t.show=function(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()},e}(),U=function(){function e(e){var t,o,n,a=e.canvasElement,i=e.initialCameraDistanceRadiusScale,s=void 0===i?T.cameraDistanceRadiusScale:i,c=e.initialCoordinates,u=void 0===c?O:c,l=e.textures,h=void 0===l?{}:l,b=e.tooltipElement;this.callbacks=S,this.focus=null,this.isLocked=!1,this.markers=[],this.options=T,this.textures=h,this.previousFocus=null,this.tooltip=new I(b),this.renderer=new v({alpha:!0,antialias:!0,canvas:a}),this.camera=function(e,t){var o=new r;o.name="camera",o.far=3e5,o.fov=45,o.near=1;var n=P(e,300*t);return o.position.set(n[0],n[1],n[2]),o}(u,s),this.earth=function(){var e=new d;e.geometry=new m(300,50,50),e.name="earth";var t=new d;t.geometry=new m(301,50,50),t.name="clouds";var o=new d;return o.name="background",o.geometry=new m(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=(t=new f("white"),o=new p("white"),t.name="ambientLight",o.name="pointLight",{ambient:t,point:o}),this.markerObjects=((n=new g).name="markers",n),this.orbitControls=new C(this.camera,this.renderer.domElement),this.scene=function(e){var t=e.camera,o=e.earth,n=e.lights,a=e.markerObjects,i=e.renderer,r=e.defocus,s=new w;return t.add(n.ambient),t.add(n.point),s.add(t),s.add(o.globe),s.add(a),new R(i,s,t),s.on("click",r),s}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}var t=e.prototype;return t.animate=function(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))},t.animateClouds=function(){var e=this;["x","y","z"].forEach(function(t){e.earth.clouds.rotation[t]+=Math.random()/1e4})},t.applyAnimations=function(e){var t=this,o=0,n=[];return e.forEach(function(a,i){var r=a.coordinates,s=a.focusAnimationDuration,c={focusAnimationDuration:s,focusDistanceRadiusScale:a.focusDistanceRadiusScale,focusEasingFunction:a.focusEasingFunction},u=i===e.length-1,l=setTimeout(function(){t.unlock(),t.updateFocus(r,c,u)},o);n.push(l),o+=s}),function(){n.forEach(function(e){clearTimeout(e)})}},t.defocus=function(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))},t.destroy=function(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()},t.lock=function(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1},t.render=function(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),i()},t.resize=function(e){var t=e.height,o=e.width;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()},t.saveFocus=function(e){this.previousFocus=e},t.unlock=function(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0},t.updateCallbacks=function(e){void 0===e&&(e={}),this.callbacks=j(e,S)},t.updateFocus=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),this.isLocked||(this.focus=e,function(e,t,o){var n=o.options,a=o.previousFocus,i=o.shouldUnlockAfterFocus,r=o.lock,s=o.unlock,c=o.saveFocus,u=n.cameraDistanceRadiusScale,l=n.focusAnimationDuration,d=n.focusEasingFunction;if(e){var m=[t.position.x,t.position.y,t.position.z],h=P(e,300*n.focusDistanceRadiusScale);c(e),r(),B({from:m,to:h,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(m[0],m[1],m[2])},onEnd:function(){i&&s()}})}else if(a){var f=[t.position.x,t.position.y,t.position.z],p=P(a,300*u);r(),B({from:f,to:p,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(f[0],f[1],f[2])},onEnd:function(){c(null),s()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:j(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))},t.updateMarkers=function(e){var t=this;void 0===e&&(e=[]),this.markers=e,function(e,t){var o=t.callbacks,n=t.markers,a=t.options,i=a.markerExitAnimationDuration,r=a.markerExitEasingFunction,s=a.markerRadiusScaleRange,l=n.map(function(e){return e.value}),h=new Set(n.map(function(e){return e.id})),f=s[0],p=s[1],g=x().domain([Math.min.apply(null,l),Math.max.apply(null,l)]).range([300*f,300*p]);n.forEach(function(t){var o=t.id,n=g(t.value),i=e.children.find(function(e){return e.marker.id===t.id});i||((i=function(e,t,o){var n,a,i=t.enableMarkerGlow,r=t.markerEnterAnimationDuration,s=t.markerEnterEasingFunction,l=t.markerGlowCoefficient,h=t.markerGlowPower,f=t.markerGlowRadiusScale,p=t.markerOffsetRadiusScale,g=t.markerRenderer,v=t.markerType;if(g)a=g(e);else{var w=e.color||"gold",y={size:0},x={size:o},C=new d;B({from:y,to:x,animationDuration:r,easingFunction:s,onUpdate:function(){switch(v){case"bar":C.geometry=new b(3,3,y.size),C.material=new c({color:w});break;case"dot":default:if(C.geometry=new m(y.size,10,10),C.material=new u({color:w}),i){var e=M(C.geometry,{backside:!1,coefficient:l,color:w,power:h,size:y.size*f});C.children=[],C.add(e)}}}}),a=C}var R=P(e.coordinates,300+(p?300*p:"dot"===v?o*(1+f)/2:0));return(n=a.position).set.apply(n,R),a.lookAt(new k(0,0,0)),a.name=e.id,a}(t,a,n)).name=o,e.add(i)),i.marker=t}),e.children.forEach(function(t){if(!h.has(t.marker.id)){var n=t.scale.toArray();B({from:n,to:[0,0,0],animationDuration:i,easingFunction:r,onUpdate:function(){var e;t&&(e=t.scale).set.apply(e,n)},onEnd:function(){e.remove(t)}})}!function(e,t){var o=e.marker;e._listeners={},e.on("click",function(n){t.onClickMarker(o,e,n.data.originalEvent)}),e.on("mousemove",function(n){t.onMouseOverMarker(o,e,n.data.originalEvent)}),e.on("mouseout",function(n){t.onMouseOutMarker(o,e,n.data.originalEvent)})}(t,o)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:function(e,o,n){t.updateFocus(e.coordinates),t.callbacks.onClickMarker(e,o,n)},onMouseOutMarker:function(e,o,n){t.tooltip.hide(),t.callbacks.onMouseOutMarker(e,o,n)},onMouseOverMarker:function(e,o,n){t.options.enableMarkerTooltip&&t.tooltip.show(n.clientX,n.clientY,t.options.markerTooltipRenderer(o.marker)),t.callbacks.onMouseOverMarker(e,o,n)}}})},t.updateOptions=function(e){void 0===e&&(e={}),this.options=j(e,T),function(e,t){var o=t.callbacks,n=t.options,a=t.textures,i=n.globeCloudsOpacity,r=o.onGlobeBackgroundTextureLoaded,d=o.onGlobeCloudsTextureLoaded,m=o.onGlobeTextureLoaded,h=a.globeBackgroundTexture,f=void 0===h?"https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png":h,p=a.globeCloudsTexture,b=void 0===p?D:p,k=a.globeTexture,g=void 0===k?G:k,v=e.clouds,w=e.globe,y=e.glow,x=e.background;n.enableGlobeGlow&&((y=M(w.geometry,{backside:!0,coefficient:n.globeGlowCoefficient,color:n.globeGlowColor,power:n.globeGlowPower,size:300*n.globeGlowRadiusScale})).name="glow"),g&&(new s).load(g,function(e){w.material=new c({map:e}),w.remove(w.getObjectByName("glow")),w.add(y),m()},function(){},m),f&&((new s).load(f,function(e){x.material=new u({map:e,side:l}),r()},function(){},r),w.remove(w.getObjectByName("background")),w.add(x)),b&&((new s).load(b,function(e){v.material=new c({map:e,transparent:!0}),v.material.opacity=i,d()},function(){},d),w.remove(w.getObjectByName("clouds")),w.add(v))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){var o=t.ambientLightIntensity,n=t.pointLightColor,a=t.pointLightIntensity,i=t.pointLightPositionRadiusScales,r=e.ambient,s=e.point,c=i[0],u=i[1],l=i[2];r.color=new h(t.ambientLightColor),r.intensity=o,s.color=new h(n),s.intensity=a,s.position.set(300*c,300*u,300*l)}(this.lights,this.options),function(e,t){var o=t.cameraAutoRotateSpeed,n=t.cameraMaxDistanceRadiusScale,a=t.cameraMaxPolarAngle,i=t.cameraMinPolarAngle,r=t.cameraRotateSpeed,s=t.cameraZoomSpeed,c=t.enableCameraRotate,u=t.enableCameraZoom;e.autoRotate=t.enableCameraAutoRotate,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=c,e.enableZoom=u,e.maxDistance=300*n,e.maxPolarAngle=a,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)},e}();export default function(n){var a=n.animations,i=void 0===a?[]:a,r=n.focus,s=n.height,c=void 0===s?"100%":s,u=n.globeBackgroundTexture,l=n.globeCloudsTexture,d=n.globeTexture,m=n.initialCameraDistanceRadiusScale,h=n.initialCoordinates,f=n.markers,p=n.options,b=void 0===p?T:p,k=n.width,g=void 0===k?"100%":k,v=n.onClickMarker,w=n.onDefocus,M=n.onGetGlobe,x=n.onGlobeBackgroundTextureLoaded,C=n.onGlobeCloudsTextureLoaded,R=n.onGlobeTextureLoaded,E=n.onMouseOutMarker,S=n.onMouseOverMarker,F=t(null),D=t(null),G=t(null),O=t(null);return o(function(){var e=new U({canvasElement:F.current,initialCameraDistanceRadiusScale:m||b.cameraDistanceRadiusScale,initialCoordinates:h,textures:{globeBackgroundTexture:u,globeCloudsTexture:l,globeTexture:d},tooltipElement:G.current});return e.animate(),O.current=e,M&&M(e),function(){return e.destroy()}},[u,l,d,m,b.cameraDistanceRadiusScale,h,M]),o(function(){var e,t,o,n=O.current;return e=D.current,t=n.resize.bind(n),(o=new y(function(e){if(e&&0!==e.length){var o=e[0].contentRect;t({height:o.height,width:o.width})}})).observe(e),function(){return o.unobserve(e)}},[]),o(function(){O.current.updateCallbacks({onClickMarker:v,onDefocus:w,onGlobeBackgroundTextureLoaded:x,onGlobeCloudsTextureLoaded:C,onGlobeTextureLoaded:R,onMouseOutMarker:E,onMouseOverMarker:S})},[v,w,x,C,R,E,S]),o(function(){O.current.updateOptions(b)},[b]),o(function(){O.current.updateMarkers(f)},[f]),o(function(){O.current.updateFocus(r)},[r]),o(function(){return O.current.applyAnimations(i)},[i]),e.createElement("div",{ref:D,style:{height:c,width:g}},e.createElement("canvas",{ref:F}),e.createElement("div",{ref:G}))}export{U as Globe,A as defaultBarMarkerOptions,S as defaultCallbacks,L as defaultDotMarkerOptions,F as defaultGlobeBackgroundTexture,D as defaultGlobeCloudsTexture,G as defaultGlobeTexture,O as defaultInitialCoordinates,T as defaultOptions,B as tween};
+import e,{useRef as t,useEffect as o}from"react";import{Tween as n,Easing as a,update as i}from"es6-tween";import{PerspectiveCamera as r,TextureLoader as s,MeshLambertMaterial as c,MeshBasicMaterial as u,BackSide as l,Mesh as d,SphereGeometry as m,Color as h,AmbientLight as f,PointLight as p,BoxGeometry as b,Vector3 as k,Group as g,WebGLRenderer as v,Scene as w}from"three";import y from"resize-observer-polyfill";import{createGlowMesh as M}from"three-glow-mesh";import{scaleLinear as x}from"d3-scale";import{OrbitControls as C}from"three/examples/jsm/controls/OrbitControls";import{Interaction as R}from"three.interaction";import E from"tippy.js";var S={onClickMarker:function(e,t,o){},onDefocus:function(e){},onGlobeBackgroundTextureLoaded:function(){},onGlobeCloudsTextureLoaded:function(){},onGlobeTextureLoaded:function(){},onMouseOutMarker:function(e,t,o){},onMouseOverMarker:function(e,t,o){}},F="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",D="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",G="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",O=[1.29027,103.851959],T={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:function(e){return JSON.stringify(e.coordinates)},markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]},L={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},A={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"};function z(){return(z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function P(e,t){var o=e[0]*Math.PI/180,n=(e[1]-180)*Math.PI/180;return[-t*Math.cos(o)*Math.cos(n),t*Math.sin(o),t*Math.cos(o)*Math.sin(n)]}function j(e,t){var o=z({},t);return Object.keys(o).forEach(function(t){var n=e[t];o[t]=void 0===n?o[t]:n}),o}function B(e){var t=e.to,o=e.animationDuration,i=e.easingFunction,r=e.onUpdate,s=e.onEnd,c=void 0===s?null:s,u=e.delay,l=void 0===u?0:u,d=i[0],m=i[1];new n(e.from).to(t,o).easing(a[d][m]).on("update",r).on("complete",c).delay(l).start()}var I=function(){function e(e){this.element=e,this.instance=E([e],{animation:"scale",arrow:!1})[0]}var t=e.prototype;return t.destroy=function(){this.instance.destroy()},t.hide=function(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()},t.show=function(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()},e}(),U=function(){function e(e){var t,o,n,a=e.canvasElement,i=e.initialCameraDistanceRadiusScale,s=void 0===i?T.cameraDistanceRadiusScale:i,c=e.initialCoordinates,u=void 0===c?O:c,l=e.textures,h=void 0===l?{}:l,b=e.tooltipElement;this.callbacks=S,this.focus=null,this.isLocked=!1,this.markers=[],this.options=T,this.textures=h,this.previousFocus=null,this.tooltip=new I(b),this.renderer=new v({alpha:!0,antialias:!0,canvas:a}),this.camera=function(e,t){var o=new r;o.name="camera",o.far=3e5,o.fov=45,o.near=1;var n=P(e,300*t);return o.position.set(n[0],n[1],n[2]),o}(u,s),this.earth=function(){var e=new d;e.geometry=new m(300,50,50),e.name="earth";var t=new d;t.geometry=new m(301,50,50),t.name="clouds";var o=new d;return o.name="background",o.geometry=new m(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=(t=new f("white"),o=new p("white"),t.name="ambientLight",o.name="pointLight",{ambient:t,point:o}),this.markerObjects=((n=new g).name="markers",n),this.orbitControls=new C(this.camera,this.renderer.domElement),this.scene=function(e){var t=e.camera,o=e.earth,n=e.lights,a=e.markerObjects,i=e.renderer,r=e.defocus,s=new w;return t.add(n.ambient),t.add(n.point),s.add(t),s.add(o.globe),s.add(a),new R(i,s,t),s.on("click",r),s}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}var t=e.prototype;return t.animate=function(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))},t.animateClouds=function(){var e=this;["x","y","z"].forEach(function(t){e.earth.clouds.rotation[t]+=Math.random()/1e4})},t.applyAnimations=function(e){var t=this,o=0,n=[];return e.forEach(function(a,i){var r=a.coordinates,s=a.focusAnimationDuration,c={focusAnimationDuration:s,focusDistanceRadiusScale:a.focusDistanceRadiusScale,focusEasingFunction:a.focusEasingFunction},u=i===e.length-1,l=setTimeout(function(){t.unlock(),t.updateFocus(r,c,u)},o);n.push(l),o+=s}),function(){n.forEach(function(e){clearTimeout(e)})}},t.defocus=function(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))},t.destroy=function(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()},t.lock=function(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1},t.render=function(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),i()},t.resize=function(e){var t=e.height,o=e.width;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()},t.saveFocus=function(e){this.previousFocus=e},t.unlock=function(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0},t.updateCallbacks=function(e){void 0===e&&(e={}),this.callbacks=j(e,S)},t.updateFocus=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),this.isLocked||(this.focus=e,function(e,t,o){var n=o.options,a=o.previousFocus,i=o.shouldUnlockAfterFocus,r=o.lock,s=o.unlock,c=o.saveFocus,u=n.cameraDistanceRadiusScale,l=n.focusAnimationDuration,d=n.focusEasingFunction;if(e){var m=[t.position.x,t.position.y,t.position.z],h=P(e,300*n.focusDistanceRadiusScale);c(e),r(),B({from:m,to:h,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(m[0],m[1],m[2])},onEnd:function(){i&&s()}})}else if(a){var f=[t.position.x,t.position.y,t.position.z],p=P(a,300*u);r(),B({from:f,to:p,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(f[0],f[1],f[2])},onEnd:function(){c(null),s()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:j(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))},t.updateMarkers=function(e){var t=this;void 0===e&&(e=[]),this.markers=e,function(e,t){var o=t.callbacks,n=t.markers,a=t.options,i=a.markerExitAnimationDuration,r=a.markerExitEasingFunction,s=a.markerRadiusScaleRange,l=n.map(function(e){return e.value}),h=new Set(n.map(function(e){return e.id})),f=s[0],p=s[1],g=x().domain([Math.min.apply(null,l),Math.max.apply(null,l)]).range([300*f,300*p]);n.forEach(function(t){var o=t.id,n=g(t.value),i=e.children.find(function(e){return e.marker.id===t.id});i||((i=function(e,t,o){var n,a,i=t.enableMarkerGlow,r=t.markerEnterAnimationDuration,s=t.markerEnterEasingFunction,l=t.markerGlowCoefficient,h=t.markerGlowPower,f=t.markerGlowRadiusScale,p=t.markerOffsetRadiusScale,g=t.markerRenderer,v=t.markerType;if(g)a=g(e);else{var w=e.color||"gold",y={size:0},x={size:o},C=new d;B({from:y,to:x,animationDuration:r,easingFunction:s,onUpdate:function(){switch(v){case"bar":C.geometry=new b(3,3,y.size),C.material=new c({color:w});break;case"dot":default:if(C.geometry=new m(y.size,10,10),C.material=new u({color:w}),i){var e=M(C.geometry,{backside:!1,coefficient:l,color:w,power:h,size:y.size*f});C.children=[],C.add(e)}}}}),a=C}var R=P(e.coordinates,300+(p?300*p:"dot"===v?o*(1+f)/2:0));return(n=a.position).set.apply(n,R),a.lookAt(new k(0,0,0)),a.name=e.id,a}(t,a,n)).name=o,e.add(i)),i.marker=t}),e.children.forEach(function(t){if(!h.has(t.marker.id)){var n=t.scale.toArray();B({from:n,to:[0,0,0],animationDuration:i,easingFunction:r,onUpdate:function(){var e;t&&(e=t.scale).set.apply(e,n)},onEnd:function(){e.remove(t)}})}!function(e,t){var o=e.marker;e._listeners={},e.on("click",function(n){t.onClickMarker(o,e,n.data.originalEvent)}),e.on("mousemove",function(n){t.onMouseOverMarker(o,e,n.data.originalEvent)}),e.on("mouseout",function(n){t.onMouseOutMarker(o,e,n.data.originalEvent)})}(t,o)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:function(e,o,n){t.callbacks.onClickMarker(e,o,n)},onMouseOutMarker:function(e,o,n){t.tooltip.hide(),t.callbacks.onMouseOutMarker(e,o,n)},onMouseOverMarker:function(e,o,n){t.options.enableMarkerTooltip&&t.tooltip.show(n.clientX,n.clientY,t.options.markerTooltipRenderer(o.marker)),t.callbacks.onMouseOverMarker(e,o,n)}}})},t.updateOptions=function(e){void 0===e&&(e={}),this.options=j(e,T),function(e,t){var o=t.callbacks,n=t.options,a=t.textures,i=n.globeCloudsOpacity,r=o.onGlobeBackgroundTextureLoaded,d=o.onGlobeCloudsTextureLoaded,m=o.onGlobeTextureLoaded,h=a.globeBackgroundTexture,f=void 0===h?"https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png":h,p=a.globeCloudsTexture,b=void 0===p?D:p,k=a.globeTexture,g=void 0===k?G:k,v=e.clouds,w=e.globe,y=e.glow,x=e.background;n.enableGlobeGlow&&((y=M(w.geometry,{backside:!0,coefficient:n.globeGlowCoefficient,color:n.globeGlowColor,power:n.globeGlowPower,size:300*n.globeGlowRadiusScale})).name="glow"),g&&(new s).load(g,function(e){w.material=new c({map:e}),w.remove(w.getObjectByName("glow")),w.add(y),m()},function(){},m),f&&((new s).load(f,function(e){x.material=new u({map:e,side:l}),r()},function(){},r),w.remove(w.getObjectByName("background")),w.add(x)),b&&((new s).load(b,function(e){v.material=new c({map:e,transparent:!0}),v.material.opacity=i,d()},function(){},d),w.remove(w.getObjectByName("clouds")),w.add(v))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){var o=t.ambientLightIntensity,n=t.pointLightColor,a=t.pointLightIntensity,i=t.pointLightPositionRadiusScales,r=e.ambient,s=e.point,c=i[0],u=i[1],l=i[2];r.color=new h(t.ambientLightColor),r.intensity=o,s.color=new h(n),s.intensity=a,s.position.set(300*c,300*u,300*l)}(this.lights,this.options),function(e,t){var o=t.cameraAutoRotateSpeed,n=t.cameraMaxDistanceRadiusScale,a=t.cameraMaxPolarAngle,i=t.cameraMinPolarAngle,r=t.cameraRotateSpeed,s=t.cameraZoomSpeed,c=t.enableCameraRotate,u=t.enableCameraZoom;e.autoRotate=t.enableCameraAutoRotate,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=c,e.enableZoom=u,e.maxDistance=300*n,e.maxPolarAngle=a,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)},e}();export default function(n){var a=n.animations,i=void 0===a?[]:a,r=n.focus,s=n.height,c=void 0===s?"100%":s,u=n.globeBackgroundTexture,l=n.globeCloudsTexture,d=n.globeTexture,m=n.initialCameraDistanceRadiusScale,h=n.initialCoordinates,f=n.markers,p=n.options,b=void 0===p?T:p,k=n.width,g=void 0===k?"100%":k,v=n.onClickMarker,w=n.onDefocus,M=n.onGetGlobe,x=n.onGlobeBackgroundTextureLoaded,C=n.onGlobeCloudsTextureLoaded,R=n.onGlobeTextureLoaded,E=n.onMouseOutMarker,S=n.onMouseOverMarker,F=t(null),D=t(null),G=t(null),O=t(null);return o(function(){var e=new U({canvasElement:F.current,initialCameraDistanceRadiusScale:m||b.cameraDistanceRadiusScale,initialCoordinates:h,textures:{globeBackgroundTexture:u,globeCloudsTexture:l,globeTexture:d},tooltipElement:G.current});return e.animate(),O.current=e,M&&M(e),function(){return e.destroy()}},[u,l,d,m,b.cameraDistanceRadiusScale,h,M]),o(function(){var e,t,o,n=O.current;return e=D.current,t=n.resize.bind(n),(o=new y(function(e){if(e&&0!==e.length){var o=e[0].contentRect;t({height:o.height,width:o.width})}})).observe(e),function(){return o.unobserve(e)}},[]),o(function(){O.current.updateCallbacks({onClickMarker:v,onDefocus:w,onGlobeBackgroundTextureLoaded:x,onGlobeCloudsTextureLoaded:C,onGlobeTextureLoaded:R,onMouseOutMarker:E,onMouseOverMarker:S})},[v,w,x,C,R,E,S]),o(function(){O.current.updateOptions(b)},[b]),o(function(){O.current.updateMarkers(f)},[f]),o(function(){O.current.updateFocus(r)},[r]),o(function(){return O.current.applyAnimations(i)},[i]),e.createElement("div",{ref:D,style:{height:c,width:g}},e.createElement("canvas",{ref:F}),e.createElement("div",{ref:G}))}export{U as Globe,A as defaultBarMarkerOptions,S as defaultCallbacks,L as defaultDotMarkerOptions,F as defaultGlobeBackgroundTexture,D as defaultGlobeCloudsTexture,G as defaultGlobeTexture,O as defaultInitialCoordinates,T as defaultOptions,B as tween};
 //# sourceMappingURL=index.module.js.map
diff --git a/node_modules/react-globe/dist/index.umd.js b/node_modules/react-globe/dist/index.umd.js
index a5587b6..742516d 100644
--- a/node_modules/react-globe/dist/index.umd.js
+++ b/node_modules/react-globe/dist/index.umd.js
@@ -1,2 +1,2 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("es6-tween"),require("three"),require("resize-observer-polyfill"),require("three-glow-mesh"),require("d3-scale"),require("three/examples/jsm/controls/OrbitControls"),require("three.interaction"),require("tippy.js")):"function"==typeof define&&define.amd?define(["exports","react","es6-tween","three","resize-observer-polyfill","three-glow-mesh","d3-scale","three/examples/jsm/controls/OrbitControls","three.interaction","tippy.js"],t):t((e=e||self).reactGlobe={},e.react,e.es6Tween,e.three,e.resizeObserverPolyfill,e.threeGlowMesh,e.d3Scale,e.OrbitControls,e.three_interaction,e.tippy)}(this,function(e,t,o,n,a,i,r,s,c,u){var l="default"in t?t.default:t;a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;var d={onClickMarker:function(e,t,o){},onDefocus:function(e){},onGlobeBackgroundTextureLoaded:function(){},onGlobeCloudsTextureLoaded:function(){},onGlobeTextureLoaded:function(){},onMouseOutMarker:function(e,t,o){},onMouseOverMarker:function(e,t,o){}},h="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",m="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",f=[1.29027,103.851959],p={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:function(e){return JSON.stringify(e.coordinates)},markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]};function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function k(e,t){var o=e[0]*Math.PI/180,n=(e[1]-180)*Math.PI/180;return[-t*Math.cos(o)*Math.cos(n),t*Math.sin(o),t*Math.cos(o)*Math.sin(n)]}function g(e,t){var o=b({},t);return Object.keys(o).forEach(function(t){var n=e[t];o[t]=void 0===n?o[t]:n}),o}function v(e){var t=e.to,n=e.animationDuration,a=e.easingFunction,i=e.onUpdate,r=e.onEnd,s=void 0===r?null:r,c=e.delay,u=void 0===c?0:c,l=a[0],d=a[1];new o.Tween(e.from).to(t,n).easing(o.Easing[l][d]).on("update",i).on("complete",s).delay(u).start()}var w=function(){function e(e){this.element=e,this.instance=u([e],{animation:"scale",arrow:!1})[0]}var t=e.prototype;return t.destroy=function(){this.instance.destroy()},t.hide=function(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()},t.show=function(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()},e}(),M=function(){function e(e){var t,o,a,i=e.canvasElement,r=e.initialCameraDistanceRadiusScale,u=void 0===r?p.cameraDistanceRadiusScale:r,l=e.initialCoordinates,h=void 0===l?f:l,m=e.textures,b=void 0===m?{}:m,g=e.tooltipElement;this.callbacks=d,this.focus=null,this.isLocked=!1,this.markers=[],this.options=p,this.textures=b,this.previousFocus=null,this.tooltip=new w(g),this.renderer=new n.WebGLRenderer({alpha:!0,antialias:!0,canvas:i}),this.camera=function(e,t){var o=new n.PerspectiveCamera;o.name="camera",o.far=3e5,o.fov=45,o.near=1;var a=k(e,300*t);return o.position.set(a[0],a[1],a[2]),o}(h,u),this.earth=function(){var e=new n.Mesh;e.geometry=new n.SphereGeometry(300,50,50),e.name="earth";var t=new n.Mesh;t.geometry=new n.SphereGeometry(301,50,50),t.name="clouds";var o=new n.Mesh;return o.name="background",o.geometry=new n.SphereGeometry(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=(t=new n.AmbientLight("white"),o=new n.PointLight("white"),t.name="ambientLight",o.name="pointLight",{ambient:t,point:o}),this.markerObjects=((a=new n.Group).name="markers",a),this.orbitControls=new s.OrbitControls(this.camera,this.renderer.domElement),this.scene=function(e){var t=e.camera,o=e.earth,a=e.lights,i=e.markerObjects,r=e.renderer,s=e.defocus,u=new n.Scene;return t.add(a.ambient),t.add(a.point),u.add(t),u.add(o.globe),u.add(i),new c.Interaction(r,u,t),u.on("click",s),u}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}var t=e.prototype;return t.animate=function(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))},t.animateClouds=function(){var e=this;["x","y","z"].forEach(function(t){e.earth.clouds.rotation[t]+=Math.random()/1e4})},t.applyAnimations=function(e){var t=this,o=0,n=[];return e.forEach(function(a,i){var r=a.coordinates,s=a.focusAnimationDuration,c={focusAnimationDuration:s,focusDistanceRadiusScale:a.focusDistanceRadiusScale,focusEasingFunction:a.focusEasingFunction},u=i===e.length-1,l=setTimeout(function(){t.unlock(),t.updateFocus(r,c,u)},o);n.push(l),o+=s}),function(){n.forEach(function(e){clearTimeout(e)})}},t.defocus=function(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))},t.destroy=function(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()},t.lock=function(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1},t.render=function(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),o.update()},t.resize=function(e){var t=e.height,o=e.width;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()},t.saveFocus=function(e){this.previousFocus=e},t.unlock=function(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0},t.updateCallbacks=function(e){void 0===e&&(e={}),this.callbacks=g(e,d)},t.updateFocus=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),this.isLocked||(this.focus=e,function(e,t,o){var n=o.options,a=o.previousFocus,i=o.shouldUnlockAfterFocus,r=o.lock,s=o.unlock,c=o.saveFocus,u=n.cameraDistanceRadiusScale,l=n.focusAnimationDuration,d=n.focusEasingFunction;if(e){var h=[t.position.x,t.position.y,t.position.z],m=k(e,300*n.focusDistanceRadiusScale);c(e),r(),v({from:h,to:m,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(h[0],h[1],h[2])},onEnd:function(){i&&s()}})}else if(a){var f=[t.position.x,t.position.y,t.position.z],p=k(a,300*u);r(),v({from:f,to:p,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(f[0],f[1],f[2])},onEnd:function(){c(null),s()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:g(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))},t.updateMarkers=function(e){var t=this;void 0===e&&(e=[]),this.markers=e,function(e,t){var o=t.callbacks,a=t.markers,s=t.options,c=s.markerExitAnimationDuration,u=s.markerExitEasingFunction,l=s.markerRadiusScaleRange,d=a.map(function(e){return e.value}),h=new Set(a.map(function(e){return e.id})),m=l[0],f=l[1],p=r.scaleLinear().domain([Math.min.apply(null,d),Math.max.apply(null,d)]).range([300*m,300*f]);a.forEach(function(t){var o=t.id,a=p(t.value),r=e.children.find(function(e){return e.marker.id===t.id});r||((r=function(e,t,o){var a,r,s=t.enableMarkerGlow,c=t.markerEnterAnimationDuration,u=t.markerEnterEasingFunction,l=t.markerGlowCoefficient,d=t.markerGlowPower,h=t.markerGlowRadiusScale,m=t.markerOffsetRadiusScale,f=t.markerRenderer,p=t.markerType;if(f)r=f(e);else{var b=e.color||"gold",g={size:0},w={size:o},M=new n.Mesh;v({from:g,to:w,animationDuration:c,easingFunction:u,onUpdate:function(){switch(p){case"bar":M.geometry=new n.BoxGeometry(3,3,g.size),M.material=new n.MeshLambertMaterial({color:b});break;case"dot":default:if(M.geometry=new n.SphereGeometry(g.size,10,10),M.material=new n.MeshBasicMaterial({color:b}),s){var e=i.createGlowMesh(M.geometry,{backside:!1,coefficient:l,color:b,power:d,size:g.size*h});M.children=[],M.add(e)}}}}),r=M}var y=k(e.coordinates,300+(m?300*m:"dot"===p?o*(1+h)/2:0));return(a=r.position).set.apply(a,y),r.lookAt(new n.Vector3(0,0,0)),r.name=e.id,r}(t,s,a)).name=o,e.add(r)),r.marker=t}),e.children.forEach(function(t){if(!h.has(t.marker.id)){var n=t.scale.toArray();v({from:n,to:[0,0,0],animationDuration:c,easingFunction:u,onUpdate:function(){var e;t&&(e=t.scale).set.apply(e,n)},onEnd:function(){e.remove(t)}})}!function(e,t){var o=e.marker;e._listeners={},e.on("click",function(n){t.onClickMarker(o,e,n.data.originalEvent)}),e.on("mousemove",function(n){t.onMouseOverMarker(o,e,n.data.originalEvent)}),e.on("mouseout",function(n){t.onMouseOutMarker(o,e,n.data.originalEvent)})}(t,o)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:function(e,o,n){t.updateFocus(e.coordinates),t.callbacks.onClickMarker(e,o,n)},onMouseOutMarker:function(e,o,n){t.tooltip.hide(),t.callbacks.onMouseOutMarker(e,o,n)},onMouseOverMarker:function(e,o,n){t.options.enableMarkerTooltip&&t.tooltip.show(n.clientX,n.clientY,t.options.markerTooltipRenderer(o.marker)),t.callbacks.onMouseOverMarker(e,o,n)}}})},t.updateOptions=function(e){void 0===e&&(e={}),this.options=g(e,p),function(e,t){var o=t.callbacks,a=t.options,r=t.textures,s=a.globeCloudsOpacity,c=o.onGlobeBackgroundTextureLoaded,u=o.onGlobeCloudsTextureLoaded,l=o.onGlobeTextureLoaded,d=r.globeBackgroundTexture,f=void 0===d?"https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png":d,p=r.globeCloudsTexture,b=void 0===p?h:p,k=r.globeTexture,g=void 0===k?m:k,v=e.clouds,w=e.globe,M=e.glow,y=e.background;a.enableGlobeGlow&&((M=i.createGlowMesh(w.geometry,{backside:!0,coefficient:a.globeGlowCoefficient,color:a.globeGlowColor,power:a.globeGlowPower,size:300*a.globeGlowRadiusScale})).name="glow"),g&&(new n.TextureLoader).load(g,function(e){w.material=new n.MeshLambertMaterial({map:e}),w.remove(w.getObjectByName("glow")),w.add(M),l()},function(){},l),f&&((new n.TextureLoader).load(f,function(e){y.material=new n.MeshBasicMaterial({map:e,side:n.BackSide}),c()},function(){},c),w.remove(w.getObjectByName("background")),w.add(y)),b&&((new n.TextureLoader).load(b,function(e){v.material=new n.MeshLambertMaterial({map:e,transparent:!0}),v.material.opacity=s,u()},function(){},u),w.remove(w.getObjectByName("clouds")),w.add(v))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){var o=t.ambientLightIntensity,a=t.pointLightColor,i=t.pointLightIntensity,r=t.pointLightPositionRadiusScales,s=e.ambient,c=e.point,u=r[0],l=r[1],d=r[2];s.color=new n.Color(t.ambientLightColor),s.intensity=o,c.color=new n.Color(a),c.intensity=i,c.position.set(300*u,300*l,300*d)}(this.lights,this.options),function(e,t){var o=t.cameraAutoRotateSpeed,n=t.cameraMaxDistanceRadiusScale,a=t.cameraMaxPolarAngle,i=t.cameraMinPolarAngle,r=t.cameraRotateSpeed,s=t.cameraZoomSpeed,c=t.enableCameraRotate,u=t.enableCameraZoom;e.autoRotate=t.enableCameraAutoRotate,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=c,e.enableZoom=u,e.maxDistance=300*n,e.maxPolarAngle=a,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)},e}();e.Globe=M,e.default=function(e){var o=e.animations,n=void 0===o?[]:o,i=e.focus,r=e.height,s=void 0===r?"100%":r,c=e.globeBackgroundTexture,u=e.globeCloudsTexture,d=e.globeTexture,h=e.initialCameraDistanceRadiusScale,m=e.initialCoordinates,f=e.markers,b=e.options,k=void 0===b?p:b,g=e.width,v=void 0===g?"100%":g,w=e.onClickMarker,y=e.onDefocus,x=e.onGetGlobe,C=e.onGlobeBackgroundTextureLoaded,R=e.onGlobeCloudsTextureLoaded,G=e.onGlobeTextureLoaded,O=e.onMouseOutMarker,E=e.onMouseOverMarker,S=t.useRef(null),L=t.useRef(null),T=t.useRef(null),D=t.useRef(null);return t.useEffect(function(){var e=new M({canvasElement:S.current,initialCameraDistanceRadiusScale:h||k.cameraDistanceRadiusScale,initialCoordinates:m,textures:{globeBackgroundTexture:c,globeCloudsTexture:u,globeTexture:d},tooltipElement:T.current});return e.animate(),D.current=e,x&&x(e),function(){return e.destroy()}},[c,u,d,h,k.cameraDistanceRadiusScale,m,x]),t.useEffect(function(){var e,t,o,n=D.current;return e=L.current,t=n.resize.bind(n),(o=new a(function(e){if(e&&0!==e.length){var o=e[0].contentRect;t({height:o.height,width:o.width})}})).observe(e),function(){return o.unobserve(e)}},[]),t.useEffect(function(){D.current.updateCallbacks({onClickMarker:w,onDefocus:y,onGlobeBackgroundTextureLoaded:C,onGlobeCloudsTextureLoaded:R,onGlobeTextureLoaded:G,onMouseOutMarker:O,onMouseOverMarker:E})},[w,y,C,R,G,O,E]),t.useEffect(function(){D.current.updateOptions(k)},[k]),t.useEffect(function(){D.current.updateMarkers(f)},[f]),t.useEffect(function(){D.current.updateFocus(i)},[i]),t.useEffect(function(){return D.current.applyAnimations(n)},[n]),l.createElement("div",{ref:L,style:{height:s,width:v}},l.createElement("canvas",{ref:S}),l.createElement("div",{ref:T}))},e.defaultBarMarkerOptions={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"},e.defaultCallbacks=d,e.defaultDotMarkerOptions={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},e.defaultGlobeBackgroundTexture="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",e.defaultGlobeCloudsTexture=h,e.defaultGlobeTexture=m,e.defaultInitialCoordinates=f,e.defaultOptions=p,e.tween=v});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("es6-tween"),require("three"),require("resize-observer-polyfill"),require("three-glow-mesh"),require("d3-scale"),require("three/examples/jsm/controls/OrbitControls"),require("three.interaction"),require("tippy.js")):"function"==typeof define&&define.amd?define(["exports","react","es6-tween","three","resize-observer-polyfill","three-glow-mesh","d3-scale","three/examples/jsm/controls/OrbitControls","three.interaction","tippy.js"],t):t((e=e||self).reactGlobe={},e.react,e.es6Tween,e.three,e.resizeObserverPolyfill,e.threeGlowMesh,e.d3Scale,e.OrbitControls,e.three_interaction,e.tippy)}(this,function(e,t,o,n,a,i,r,s,c,u){var l="default"in t?t.default:t;a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;var d={onClickMarker:function(e,t,o){},onDefocus:function(e){},onGlobeBackgroundTextureLoaded:function(){},onGlobeCloudsTextureLoaded:function(){},onGlobeTextureLoaded:function(){},onMouseOutMarker:function(e,t,o){},onMouseOverMarker:function(e,t,o){}},h="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/clouds.png",m="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/globe.jpg",f=[1.29027,103.851959],p={ambientLightColor:"white",ambientLightIntensity:.8,cameraAutoRotateSpeed:.1,cameraDistanceRadiusScale:3,cameraMaxDistanceRadiusScale:100,cameraMaxPolarAngle:Math.PI,cameraMinPolarAngle:0,cameraRotateSpeed:.2,cameraZoomSpeed:1,enableCameraAutoRotate:!0,enableCameraRotate:!0,enableCameraZoom:!0,enableDefocus:!0,enableGlobeGlow:!0,enableMarkerGlow:!0,enableMarkerTooltip:!0,focusAnimationDuration:1e3,focusDistanceRadiusScale:1.5,focusEasingFunction:["Cubic","Out"],globeCloudsOpacity:.3,globeGlowCoefficient:.1,globeGlowColor:"#d1d1d1",globeGlowPower:3,globeGlowRadiusScale:.2,markerEnterAnimationDuration:1e3,markerEnterEasingFunction:["Linear","None"],markerExitAnimationDuration:500,markerExitEasingFunction:["Cubic","Out"],markerGlowCoefficient:0,markerGlowPower:3,markerGlowRadiusScale:2,markerOffsetRadiusScale:0,markerRadiusScaleRange:[.005,.02],markerRenderer:null,markerTooltipRenderer:function(e){return JSON.stringify(e.coordinates)},markerType:"dot",pointLightColor:"white",pointLightIntensity:1,pointLightPositionRadiusScales:[-2,1,-1]};function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function k(e,t){var o=e[0]*Math.PI/180,n=(e[1]-180)*Math.PI/180;return[-t*Math.cos(o)*Math.cos(n),t*Math.sin(o),t*Math.cos(o)*Math.sin(n)]}function g(e,t){var o=b({},t);return Object.keys(o).forEach(function(t){var n=e[t];o[t]=void 0===n?o[t]:n}),o}function v(e){var t=e.to,n=e.animationDuration,a=e.easingFunction,i=e.onUpdate,r=e.onEnd,s=void 0===r?null:r,c=e.delay,u=void 0===c?0:c,l=a[0],d=a[1];new o.Tween(e.from).to(t,n).easing(o.Easing[l][d]).on("update",i).on("complete",s).delay(u).start()}var w=function(){function e(e){this.element=e,this.instance=u([e],{animation:"scale",arrow:!1})[0]}var t=e.prototype;return t.destroy=function(){this.instance.destroy()},t.hide=function(){document.body.style.cursor="inherit",this.element.style.position="fixed",this.element.style.left="0",this.element.style.top="0",this.instance.hide()},t.show=function(e,t,o){document.body.style.cursor="pointer",this.element.style.position="fixed",this.element.style.left=e+10+"px",this.element.style.top=t+10+"px",this.instance.setContent(o),this.instance.show()},e}(),M=function(){function e(e){var t,o,a,i=e.canvasElement,r=e.initialCameraDistanceRadiusScale,u=void 0===r?p.cameraDistanceRadiusScale:r,l=e.initialCoordinates,h=void 0===l?f:l,m=e.textures,b=void 0===m?{}:m,g=e.tooltipElement;this.callbacks=d,this.focus=null,this.isLocked=!1,this.markers=[],this.options=p,this.textures=b,this.previousFocus=null,this.tooltip=new w(g),this.renderer=new n.WebGLRenderer({alpha:!0,antialias:!0,canvas:i}),this.camera=function(e,t){var o=new n.PerspectiveCamera;o.name="camera",o.far=3e5,o.fov=45,o.near=1;var a=k(e,300*t);return o.position.set(a[0],a[1],a[2]),o}(h,u),this.earth=function(){var e=new n.Mesh;e.geometry=new n.SphereGeometry(300,50,50),e.name="earth";var t=new n.Mesh;t.geometry=new n.SphereGeometry(301,50,50),t.name="clouds";var o=new n.Mesh;return o.name="background",o.geometry=new n.SphereGeometry(3e4,50,50),{clouds:t,globe:e,background:o}}(),this.lights=(t=new n.AmbientLight("white"),o=new n.PointLight("white"),t.name="ambientLight",o.name="pointLight",{ambient:t,point:o}),this.markerObjects=((a=new n.Group).name="markers",a),this.orbitControls=new s.OrbitControls(this.camera,this.renderer.domElement),this.scene=function(e){var t=e.camera,o=e.earth,a=e.lights,i=e.markerObjects,r=e.renderer,s=e.defocus,u=new n.Scene;return t.add(a.ambient),t.add(a.point),u.add(t),u.add(o.globe),u.add(i),new c.Interaction(r,u,t),u.on("click",s),u}({camera:this.camera,earth:this.earth,lights:this.lights,markerObjects:this.markerObjects,renderer:this.renderer,defocus:this.defocus.bind(this)}),this.updateOptions(),this.updateCallbacks(),this.updateMarkers()}var t=e.prototype;return t.animate=function(){this.render(),this.animationFrameId=requestAnimationFrame(this.animate.bind(this))},t.animateClouds=function(){var e=this;["x","y","z"].forEach(function(t){e.earth.clouds.rotation[t]+=Math.random()/1e4})},t.applyAnimations=function(e){var t=this,o=0,n=[];return e.forEach(function(a,i){var r=a.coordinates,s=a.focusAnimationDuration,c={focusAnimationDuration:s,focusDistanceRadiusScale:a.focusDistanceRadiusScale,focusEasingFunction:a.focusEasingFunction},u=i===e.length-1,l=setTimeout(function(){t.unlock(),t.updateFocus(r,c,u)},o);n.push(l),o+=s}),function(){n.forEach(function(e){clearTimeout(e)})}},t.defocus=function(){!this.isLocked&&this.previousFocus&&this.options.enableDefocus&&(this.updateFocus(null),this.callbacks.onDefocus(this.previousFocus))},t.destroy=function(){cancelAnimationFrame(this.animationFrameId),this.tooltip.destroy(),this.renderer.domElement.remove()},t.lock=function(){this.isLocked=!0,this.orbitControls.enabled=!1,this.orbitControls.autoRotate=!1},t.render=function(){this.renderer.sortObjects=!1,this.renderer.render(this.scene,this.camera),this.orbitControls.update(),this.animateClouds(),o.update()},t.resize=function(e){var t=e.height,o=e.width;this.renderer.setSize(o,t),this.camera.aspect=o/t,this.camera.updateProjectionMatrix(),this.render()},t.saveFocus=function(e){this.previousFocus=e},t.unlock=function(){this.isLocked=!1,this.orbitControls.enabled=!0,this.orbitControls.autoRotate=!0},t.updateCallbacks=function(e){void 0===e&&(e={}),this.callbacks=g(e,d)},t.updateFocus=function(e,t,o){void 0===t&&(t={}),void 0===o&&(o=!0),this.isLocked||(this.focus=e,function(e,t,o){var n=o.options,a=o.previousFocus,i=o.shouldUnlockAfterFocus,r=o.lock,s=o.unlock,c=o.saveFocus,u=n.cameraDistanceRadiusScale,l=n.focusAnimationDuration,d=n.focusEasingFunction;if(e){var h=[t.position.x,t.position.y,t.position.z],m=k(e,300*n.focusDistanceRadiusScale);c(e),r(),v({from:h,to:m,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(h[0],h[1],h[2])},onEnd:function(){i&&s()}})}else if(a){var f=[t.position.x,t.position.y,t.position.z],p=k(a,300*u);r(),v({from:f,to:p,animationDuration:l,easingFunction:d,onUpdate:function(){t.position.set(f[0],f[1],f[2])},onEnd:function(){c(null),s()}})}}(this.focus,this.camera,{shouldUnlockAfterFocus:o,options:g(t,this.options),previousFocus:this.previousFocus,lock:this.lock.bind(this),unlock:this.unlock.bind(this),saveFocus:this.saveFocus.bind(this)}))},t.updateMarkers=function(e){var t=this;void 0===e&&(e=[]),this.markers=e,function(e,t){var o=t.callbacks,a=t.markers,s=t.options,c=s.markerExitAnimationDuration,u=s.markerExitEasingFunction,l=s.markerRadiusScaleRange,d=a.map(function(e){return e.value}),h=new Set(a.map(function(e){return e.id})),m=l[0],f=l[1],p=r.scaleLinear().domain([Math.min.apply(null,d),Math.max.apply(null,d)]).range([300*m,300*f]);a.forEach(function(t){var o=t.id,a=p(t.value),r=e.children.find(function(e){return e.marker.id===t.id});r||((r=function(e,t,o){var a,r,s=t.enableMarkerGlow,c=t.markerEnterAnimationDuration,u=t.markerEnterEasingFunction,l=t.markerGlowCoefficient,d=t.markerGlowPower,h=t.markerGlowRadiusScale,m=t.markerOffsetRadiusScale,f=t.markerRenderer,p=t.markerType;if(f)r=f(e);else{var b=e.color||"gold",g={size:0},w={size:o},M=new n.Mesh;v({from:g,to:w,animationDuration:c,easingFunction:u,onUpdate:function(){switch(p){case"bar":M.geometry=new n.BoxGeometry(3,3,g.size),M.material=new n.MeshLambertMaterial({color:b});break;case"dot":default:if(M.geometry=new n.SphereGeometry(g.size,10,10),M.material=new n.MeshBasicMaterial({color:b}),s){var e=i.createGlowMesh(M.geometry,{backside:!1,coefficient:l,color:b,power:d,size:g.size*h});M.children=[],M.add(e)}}}}),r=M}var y=k(e.coordinates,300+(m?300*m:"dot"===p?o*(1+h)/2:0));return(a=r.position).set.apply(a,y),r.lookAt(new n.Vector3(0,0,0)),r.name=e.id,r}(t,s,a)).name=o,e.add(r)),r.marker=t}),e.children.forEach(function(t){if(!h.has(t.marker.id)){var n=t.scale.toArray();v({from:n,to:[0,0,0],animationDuration:c,easingFunction:u,onUpdate:function(){var e;t&&(e=t.scale).set.apply(e,n)},onEnd:function(){e.remove(t)}})}!function(e,t){var o=e.marker;e._listeners={},e.on("click",function(n){t.onClickMarker(o,e,n.data.originalEvent)}),e.on("mousemove",function(n){t.onMouseOverMarker(o,e,n.data.originalEvent)}),e.on("mouseout",function(n){t.onMouseOutMarker(o,e,n.data.originalEvent)})}(t,o)})}(this.markerObjects,{options:this.options,markers:e,callbacks:{onClickMarker:function(e,o,n){t.callbacks.onClickMarker(e,o,n)},onMouseOutMarker:function(e,o,n){t.tooltip.hide(),t.callbacks.onMouseOutMarker(e,o,n)},onMouseOverMarker:function(e,o,n){t.options.enableMarkerTooltip&&t.tooltip.show(n.clientX,n.clientY,t.options.markerTooltipRenderer(o.marker)),t.callbacks.onMouseOverMarker(e,o,n)}}})},t.updateOptions=function(e){void 0===e&&(e={}),this.options=g(e,p),function(e,t){var o=t.callbacks,a=t.options,r=t.textures,s=a.globeCloudsOpacity,c=o.onGlobeBackgroundTextureLoaded,u=o.onGlobeCloudsTextureLoaded,l=o.onGlobeTextureLoaded,d=r.globeBackgroundTexture,f=void 0===d?"https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png":d,p=r.globeCloudsTexture,b=void 0===p?h:p,k=r.globeTexture,g=void 0===k?m:k,v=e.clouds,w=e.globe,M=e.glow,y=e.background;a.enableGlobeGlow&&((M=i.createGlowMesh(w.geometry,{backside:!0,coefficient:a.globeGlowCoefficient,color:a.globeGlowColor,power:a.globeGlowPower,size:300*a.globeGlowRadiusScale})).name="glow"),g&&(new n.TextureLoader).load(g,function(e){w.material=new n.MeshLambertMaterial({map:e}),w.remove(w.getObjectByName("glow")),w.add(M),l()},function(){},l),f&&((new n.TextureLoader).load(f,function(e){y.material=new n.MeshBasicMaterial({map:e,side:n.BackSide}),c()},function(){},c),w.remove(w.getObjectByName("background")),w.add(y)),b&&((new n.TextureLoader).load(b,function(e){v.material=new n.MeshLambertMaterial({map:e,transparent:!0}),v.material.opacity=s,u()},function(){},u),w.remove(w.getObjectByName("clouds")),w.add(v))}(this.earth,{callbacks:this.callbacks,options:this.options,textures:this.textures}),function(e,t){var o=t.ambientLightIntensity,a=t.pointLightColor,i=t.pointLightIntensity,r=t.pointLightPositionRadiusScales,s=e.ambient,c=e.point,u=r[0],l=r[1],d=r[2];s.color=new n.Color(t.ambientLightColor),s.intensity=o,c.color=new n.Color(a),c.intensity=i,c.position.set(300*u,300*l,300*d)}(this.lights,this.options),function(e,t){var o=t.cameraAutoRotateSpeed,n=t.cameraMaxDistanceRadiusScale,a=t.cameraMaxPolarAngle,i=t.cameraMinPolarAngle,r=t.cameraRotateSpeed,s=t.cameraZoomSpeed,c=t.enableCameraRotate,u=t.enableCameraZoom;e.autoRotate=t.enableCameraAutoRotate,e.autoRotateSpeed=o,e.dampingFactor=.1,e.enableDamping=!0,e.enablePan=!1,e.enableRotate=c,e.enableZoom=u,e.maxDistance=300*n,e.maxPolarAngle=a,e.minDistance=330,e.minPolarAngle=i,e.rotateSpeed=r,e.zoomSpeed=s}(this.orbitControls,this.options),this.updateFocus.bind(this,this.focus),this.updateMarkers.bind(this,this.markers)},e}();e.Globe=M,e.default=function(e){var o=e.animations,n=void 0===o?[]:o,i=e.focus,r=e.height,s=void 0===r?"100%":r,c=e.globeBackgroundTexture,u=e.globeCloudsTexture,d=e.globeTexture,h=e.initialCameraDistanceRadiusScale,m=e.initialCoordinates,f=e.markers,b=e.options,k=void 0===b?p:b,g=e.width,v=void 0===g?"100%":g,w=e.onClickMarker,y=e.onDefocus,x=e.onGetGlobe,C=e.onGlobeBackgroundTextureLoaded,R=e.onGlobeCloudsTextureLoaded,G=e.onGlobeTextureLoaded,O=e.onMouseOutMarker,E=e.onMouseOverMarker,S=t.useRef(null),L=t.useRef(null),T=t.useRef(null),D=t.useRef(null);return t.useEffect(function(){var e=new M({canvasElement:S.current,initialCameraDistanceRadiusScale:h||k.cameraDistanceRadiusScale,initialCoordinates:m,textures:{globeBackgroundTexture:c,globeCloudsTexture:u,globeTexture:d},tooltipElement:T.current});return e.animate(),D.current=e,x&&x(e),function(){return e.destroy()}},[c,u,d,h,k.cameraDistanceRadiusScale,m,x]),t.useEffect(function(){var e,t,o,n=D.current;return e=L.current,t=n.resize.bind(n),(o=new a(function(e){if(e&&0!==e.length){var o=e[0].contentRect;t({height:o.height,width:o.width})}})).observe(e),function(){return o.unobserve(e)}},[]),t.useEffect(function(){D.current.updateCallbacks({onClickMarker:w,onDefocus:y,onGlobeBackgroundTextureLoaded:C,onGlobeCloudsTextureLoaded:R,onGlobeTextureLoaded:G,onMouseOutMarker:O,onMouseOverMarker:E})},[w,y,C,R,G,O,E]),t.useEffect(function(){D.current.updateOptions(k)},[k]),t.useEffect(function(){D.current.updateMarkers(f)},[f]),t.useEffect(function(){D.current.updateFocus(i)},[i]),t.useEffect(function(){return D.current.applyAnimations(n)},[n]),l.createElement("div",{ref:L,style:{height:s,width:v}},l.createElement("canvas",{ref:S}),l.createElement("div",{ref:T}))},e.defaultBarMarkerOptions={enableMarkerGlow:!1,markerRadiusScaleRange:[.2,.5],markerType:"bar"},e.defaultCallbacks=d,e.defaultDotMarkerOptions={enableMarkerGlow:!0,markerRadiusScaleRange:[.005,.02],markerType:"dot"},e.defaultGlobeBackgroundTexture="https://raw.githubusercontent.com/chrisrzhou/react-globe/main/textures/background.png",e.defaultGlobeCloudsTexture=h,e.defaultGlobeTexture=m,e.defaultInitialCoordinates=f,e.defaultOptions=p,e.tween=v});
 //# sourceMappingURL=index.umd.js.map

@nandorojo
Copy link
Author

Just install patch-package, set it up, and add that file inside of patches/react-globe+5.0.2.patch

@iampranavdhar
Copy link

Thanks, @nandorojo. But before creating the patch file what should be deleted for removing the updateFocus I have seen multiple places in index.js in the modules file?

@iampranavdhar
Copy link

patch-package 6.4.7
• Creating temporary folder
• Installing react-globe@5.0.2 with yarn
• Diffing your files with clean files
⁉️  Not creating patch file for package 'react-globe'
⁉️  There don't appear to be any changes.

This is what I got before changing anything and running

npx patch-package react-globe

@nandorojo
Copy link
Author

I don’t know what you mean by “before changing anything”. You need to use my patch file for the change, otherwise nothing will happen. It’ll only work if you’re using 5.0.2. Consider the code as-is though.

@nandorojo
Copy link
Author

I haven't seen this in a long time, but I fixed my problem with my patch file. Unfortunately I can't provide much support beyond that, but I hope it helps with your case

@iampranavdhar
Copy link

iampranavdhar commented Oct 29, 2021

Thanks, @nandorojo. It worked :) . Will it work in the production as well and Is there any possibility to remove the box when we click on the globe that is coming.Like I mentioned in this pic.
image

Thanks again :)

@nandorojo
Copy link
Author

Honestly, not sure...I don't maintain this library, I just had this one issue that I worked around. Wish I had a better answer for you. My best recommendation is keep playing with the props, and maybe use some custom CSS inspecting from the browser.

Good luck!

@iampranavdhar
Copy link

Thank You. I Will check that out in different ways and will mention it here in case anything works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants