LESSON 03
Textures & PBR
A procedurally-generated CanvasTexture feeds the map of a meshPhysicalMaterial; drei's <Environment preset="studio"> provides image-based lighting via Suspense. Tweak the material in the leva panel to see roughness, metalness, and clearcoat in real time.
frameloop="demand"means the canvas only renders when something invalidates it — drei's OrbitControls makeDefault calls invalidate() on every change, so the view updates while you orbit but stays idle otherwise. Open the leva panel (top right) to live-tune the material.