jurmy24's picture
feat: add viewer code
72f0edb
raw
history blame
593 Bytes
import React, { Suspense } from "react";
import Spline from "@splinetool/react-spline";
interface SplineViewerProps {
splineUrl: string;
className?: string;
}
const SplineViewer: React.FC<SplineViewerProps> = ({
splineUrl,
className = "",
}) => {
return (
<div className={`w-full ${className}`}>
<Suspense
fallback={
<div className="w-full h-full flex items-center justify-center">
Loading 3D model...
</div>
}
>
<Spline scene={splineUrl} />
</Suspense>
</div>
);
};
export default SplineViewer;