Project 28: Orbiting Loaded Model
3D Engineer
Step 1 of 2
Project
Review: Loading Models
Load an external model into a lit scene with Suspense.
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
function Model() {
const { scene } = useGLTF('/models/chair.glb');
return <primitive object={scene} />;
}
export default function Scene() {
return (
<Canvas>
<ambientLight intensity={0.5} />
<directionalLight position={[3, 4, 2]} intensity={1} />
<Suspense fallback={null}>
<Model />
</Suspense>
</Canvas>
);
}