-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
97 display 3d model of satellite on website (#452)
* feat: rendering 3D model of satellite on website * clean: unused code cleaned up * clean: clean up * fix: trying to fix dependancies
- Loading branch information
Thibault
authored and
GitHub
committed
Jun 17, 2025
1 parent
db7ab77
commit 0d0db8c
Showing
14 changed files
with
4,578 additions
and
1,933 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| "use client"; | ||
| import React, { Suspense } from "react"; | ||
| import { OrbitControls, useGLTF } from "@react-three/drei"; | ||
| import { Canvas } from "@react-three/fiber"; | ||
|
|
||
| function Model({ url }: { url: string }) { | ||
| const { scene } = useGLTF(url); | ||
|
|
||
| return <primitive object={scene} scale={0.002} />; | ||
| } | ||
| export default function Render3DMod({ url }: { url: string }) { | ||
| return ( | ||
| <div className="flex h-[500px] w-full items-center justify-center bg-black"> | ||
| <Canvas camera={{ position: [10, 10, 5] }}> | ||
| <ambientLight intensity={0.7} /> | ||
| <directionalLight position={[10, 10, 10]} intensity={0.5} /> | ||
| <Suspense fallback={null}> | ||
| <Model url={url} /> | ||
| </Suspense> | ||
| <OrbitControls /> | ||
| </Canvas> | ||
| </div> | ||
| ); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.