Project 23: Spinning Globe Demo
3D Engineer
Step 1 of 2
Project
Review: Textures
Apply a texture to a sphere, like a simple globe icon.
🎯 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 Globe() {
const texture = useTexture('/textures/earth.jpg');
return (
<mesh>
<sphereGeometry args={[1, 32, 32]} />
<meshStandardMaterial map={texture} />
</mesh>
);
}
export default function Scene() {
return (
<Canvas>
<ambientLight intensity={0.8} />
<Globe />
</Canvas>
);
}