Skip to content

Commit 0919197

Browse files
Update Globe3D.tsx
1 parent 981a794 commit 0919197

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Globe3D.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const Globe3D = () => {
3737

3838
const [trailTexture, glowTexture] = useMemo(() => {
3939
const loader = new THREE.TextureLoader();
40-
const trail = loader.load('/trail.webp');
40+
const trail = loader.load(`${import.meta.env.BASE_URL}trail.webp`);
4141
trail.wrapS = THREE.RepeatWrapping;
42-
const glow = loader.load('/glow.webp');
42+
const glow = loader.load(`${import.meta.env.BASE_URL}glow.webp`);
4343
return [trail, glow];
4444
}, []);
4545

@@ -86,7 +86,7 @@ const Globe3D = () => {
8686
new THREE.MeshBasicMaterial({ color: 0x00ff00, transparent: true, opacity: 0.05 })
8787
));
8888

89-
const earthTexture = new THREE.TextureLoader().load('/earth-dark.jpeg');
89+
const earthTexture = new THREE.TextureLoader().load(`${import.meta.env.BASE_URL}earth-dark.jpeg`);
9090
earthTexture.colorSpace = THREE.SRGBColorSpace;
9191
earthTexture.anisotropy = renderer.capabilities.getMaxAnisotropy();
9292

@@ -119,8 +119,8 @@ const Globe3D = () => {
119119
const connections: Connection[] = [];
120120

121121
Promise.all([
122-
fetch('/countries.json').then(res => res.json()),
123-
fetch('/servers.json').then(res => res.json())
122+
fetch(`${import.meta.env.BASE_URL}countries.json`).then(res => res.json()),
123+
fetch(`${import.meta.env.BASE_URL}servers.json`).then(res => res.json())
124124
]).then(([countriesData, serverJson]) => {
125125
const servers: Server[] = serverJson.servers;
126126

@@ -298,4 +298,4 @@ const Globe3D = () => {
298298
return <div ref={mountRef} style={{ width: '100%', height: '100%', touchAction: 'none' }} className="cursor-grab active:cursor-grabbing" />;
299299
};
300300

301-
export default Globe3D;
301+
export default Globe3D;

0 commit comments

Comments
 (0)