Pmndrs.docs

PresentationalControls

Semi-OrbitControls with spring-physics, polar zoom and snap-back, for presentational purposes. These controls do not turn the camera but will spin their contents.

They will not suddenly come to rest when they reach limits like OrbitControls do, but rather smoothly anticipate stopping position.

import { PresentationControls } from '@react-three/drei'

<PresentationControls
  global={false} // Spin globally or by dragging the model
  snap={false} // Snap-back to center (can also be a spring config)
  speed={1} // Speed factor
  zoom={1} // Zoom factor when half the polar-max is reached
  rotation={[0, 0, 0]} // Default rotation
  polar={[0, Math.PI / 2]} // Vertical limits
  azimuth={[-Infinity, Infinity]} // Horizontal limits
  config = { mass: 1, tension: 170, friction: 26 } // Spring config
>
  <mesh />
</PresentationControls>