Skip to content

Commit c82ee0f

Browse files
committed
Fix issue with base URL
1 parent ce7cc52 commit c82ee0f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

astro.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import tailwind from '@astrojs/tailwind';
88
// https://astro.build/config
99
export default defineConfig({
1010
site: 'https://zfox23.github.io',
11-
base: 'spatial-photo-webxr-viewer',
11+
base: '/spatial-photo-webxr-viewer',
1212
integrations: [react(), tailwind()],
1313
vite: {
1414
server: {

src/components/LoadingMesh.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as THREE from 'three';
22
import { useTexture } from "@react-three/drei";
33

44
export default function LoadingMesh() {
5-
const [immersiveLoadingTexture] = useTexture(['/ImmersiveLoading.jpg'], ([tex]) => {
5+
const [immersiveLoadingTexture] = useTexture([`${import.meta.env.BASE_URL}/ImmersiveLoading.jpg`], ([tex]) => {
66
tex.repeat.set(2, 1);
77
tex.wrapS = tex.wrapT = THREE.RepeatWrapping;
88
});

src/components/NoImageMesh.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as THREE from 'three';
22
import { useTexture } from "@react-three/drei";
33

44
export default function NoImageMesh() {
5-
const [immersiveLoadingTexture] = useTexture(['/NoImage.jpg'], ([tex]) => {
5+
const [immersiveLoadingTexture] = useTexture([`${import.meta.env.BASE_URL}/NoImage.jpg`], ([tex]) => {
66
tex.repeat.set(2, 1);
77
tex.wrapS = tex.wrapT = THREE.RepeatWrapping;
88
});

src/layouts/Layout.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { title } = Astro.props;
1212
<meta charset="UTF-8" />
1313
<meta name="description" content="View Apple's Spatial Photos in 3D VR with your browser via WebXR." />
1414
<meta name="viewport" content="width=device-width" />
15-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
15+
<link rel="icon" type="image/svg+xml" href={`${import.meta.env.BASE_URL}/favicon.svg`} />
1616
<title>{title}</title>
1717
</head>
1818
<body class="min-h-screen w-full">

src/pages/index.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import GitHubIcon from "../components/icons/GitHubIcon";
1414
<a href="https://zachfox.photography" class="group" target="_blank">
1515
<img
1616
class="w-7 h-7 opacity-75 group-hover:scale-110 group-hover:opacity-100 group-active:scale-100 transition-transform duration-75"
17-
src="/logo-orange-on-white-2023-08-29.svg"
17+
src={`${import.meta.env.BASE_URL}/logo-orange-on-white-2023-08-29.svg`}
1818
alt="The Zach Fox Photography logo."
1919
/>
2020
</a>

0 commit comments

Comments
 (0)