OrbitControls

Orbit Controls provide the user with an intuitive 'trackball' style of 3D camera control.


Screenshot of component OrbitControls basic

Usage

OrbitControls provides drop-in rotation, positioning and zoom controls for use with a mouse.

  • Click+drag controls the rotation of the camera around the scene's center.
  • Scrollwheel controls the zoom.
  • Holding Ctrl and dragging the mouse allows for translation of the camera.

At the simplest, just import and use OrbitControls inside an Environment.

import { Environment, OrbitControls } from '@electricui/components-desktop-three'
 
<Environment>
<OrbitControls />
 
// rest of scene
</Environment>