Project 26: Bar Chart Orbit Scene
3D Engineer
Step 1 of 2
Project
Review: Controls & Camera
Lay out bar-chart-style meshes and let the viewer orbit around them.
🎯 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!
export default function Scene() {
return (
<Canvas camera={{ position: [4, 3, 6] }}>
<ambientLight intensity={0.6} />
<mesh position={[-1, 0.5, 0]}>
<boxGeometry args={[0.5, 1, 0.5]} />
<meshStandardMaterial color="seagreen" />
</mesh>
<mesh position={[0, 1, 0]}>
<boxGeometry args={[0.5, 2, 0.5]} />
<meshStandardMaterial color="crimson" />
</mesh>
<mesh position={[1, 0.75, 0]}>
<boxGeometry args={[0.5, 1.5, 0.5]} />
<meshStandardMaterial color="seagreen" />
</mesh>
<OrbitControls />
</Canvas>
);
}