From bef7bfad876fb37f6e337a699174c499c43abf33 Mon Sep 17 00:00:00 2001
From: Andrew Lee <andrew@alee14.me>
Date: Thu, 18 Sep 2025 01:41:42 -0400
Subject: Revamped project page; Switch to React; Updated pkgs

---
 src/components/3DModels.jsx | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/components/3DModels.jsx

(limited to 'src/components/3DModels.jsx')

diff --git a/src/components/3DModels.jsx b/src/components/3DModels.jsx
new file mode 100644
index 0000000..4d8507e
--- /dev/null
+++ b/src/components/3DModels.jsx
@@ -0,0 +1,25 @@
+import { Canvas, useLoader } from "@react-three/fiber";
+import { OrbitControls } from "@react-three/drei";
+import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
+
+const Model = ({ model, scale }) => {
+    const gltf = useLoader(GLTFLoader, model);
+    return (
+        <>
+            <primitive object={gltf.scene} scale={scale} />
+        </>
+    );
+};
+
+export default function ThreeJSModels({ modelName, scale = 2 }) {
+    return (
+        <div>
+            <Canvas style={{ width: '70%', height: '70%', borderRadius: '10px', paddingBottom: '.5em' }}>
+                <Model model={modelName} scale={scale} />
+                <ambientLight intensity={1.5} />
+                <directionalLight color="white" position={[0, 2, 0]} />
+                <OrbitControls />
+            </Canvas>
+        </div>
+    )
+}
-- 
cgit v1.2.3

