Skip to content

Commit

Permalink
Prod URL
Browse files Browse the repository at this point in the history
  • Loading branch information
et0and committed Sep 25, 2024
1 parent f7999c6 commit 41b6f23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/ui/model-viewer/model-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Model({ modelPath }: ModelProps) {
undefined,
handleError,
);
const { scene: fallbackScene } = useGLTF("/assets/3d/duck.glb");
const { scene: fallbackScene } = useGLTF("https://tom.so/assets/3d/duck.glb");

const sceneToRender = error ? fallbackScene : mainScene;

Expand Down Expand Up @@ -79,15 +79,19 @@ interface ComponentProps {
}

export default function ModelViewer({
modelPath = "/assets/3d/duck.glb",
modelPath = "https://tom.so/assets/3d/duck.glb",
}: ComponentProps) {
return (
<div className="w-[500px] h-[500px] border dark:border-slate-50 border-neutral-900">
<Canvas>
<ambientLight intensity={0.7} />
<directionalLight position={[5, 5, 5]} intensity={0.8} />
<ErrorBoundary
fallback={<primitive object={useGLTF("/assets/3d/duck.glb").scene} />} // this is the fallback model if none is specified by the editor
fallback={
<primitive
object={useGLTF("https://tom.so/assets/3d/duck.glb").scene}
/>
} // this is the fallback model if none is specified by the editor
>
<Model modelPath={modelPath} />
</ErrorBoundary>
Expand Down

0 comments on commit 41b6f23

Please sign in to comment.