Skip to content

Commit

Permalink
correcting 3D model render camera
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Camlane committed Aug 22, 2025
1 parent 8e19207 commit 38d986a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions frontend/src/app/satellites/render3DMod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ import React, { Suspense } from "react";
import { OrbitControls, useGLTF } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";

/* Component used to render 3D models */

function Model({ url }: { url: string }) {
const { scene } = useGLTF(url);

return <primitive object={scene} scale={0.002} />;
return <primitive object={scene} scale={1} />;
}
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] }}>
<Canvas camera={{ position: [1, 1, 1] }}>
<ambientLight intensity={0.7} />
<directionalLight position={[10, 10, 10]} intensity={0.5} />
<Suspense fallback={null}>
Expand Down

0 comments on commit 38d986a

Please sign in to comment.