Glossary · 3D basics

Orbit controls (camera controls)

In short

Orbit controls are the usual camera controls in a 3D viewer: the camera circles a target point, zooms in and out and pans sideways while "up" stays up [1].

What the controls do

In three.js the tool is called OrbitControls: it orbits the camera around a target, dollies (zooms) and pans, and keeps the up direction [1]. Dragging with mouse or finger rotates; the wheel or two fingers zoom. Ready-made components such as model-viewer bring similar controls.

Limits that protect visitors

A completely free camera quickly ends up looking up through the floor, or so close that nothing is recognisable. Sensible limits therefore include [1]:

  • Distance: minimum and maximum zoom (minDistance, maxDistance) to suit the product size.
  • Tilt: an upper polar angle (maxPolarAngle) so the camera cannot dip below the ground.
  • Panning: often disabled so the product cannot slide out of frame.
  • Inertia (damping): feels smoother, but the controls then have to be updated every frame [1], which costs processing time even when nothing else changes.

Touch and scrolling

On phones, rotating the model competes with scrolling the page. An embedded viewer should not trap visitors inside the 3D area, see scroll trapping. The entry on touch gestures covers the usual gestures.

Preset views

Many visitors never rotate the model themselves. Buttons for fixed views (front, corner, top, detail) that the camera glides to are therefore worth having. They also matter for keyboard use.

In the spiral stair configurator (example configurator, fictional product) panning is off, the tilt stops just above the floor and the zoom range adapts to each view. The 3D product viewer page covers embedding.

Related terms

  • three.js

    three.js is an open-source JavaScript library for 3D graphics in the browser. It handles the scene, camera, lighting, materials and model loading, and renders through WebGL or WebGPU.

  • Render loop and render on demand

    The render loop is the cycle in which a 3D application redraws its image frame by frame. Render on demand means calculating a new frame only when something has changed, instead of constantly at the display's refresh rate.

  • Touch gestures in a 3D viewer

    Touch gestures are the finger movements used to work a 3D model on phones and tablets: drag with one finger to rotate, pinch with two to zoom, tap to select. Every gesture should also have a simple alternative.

  • Scroll trapping

    Scroll trapping happens when an embedded 3D model captures mouse-wheel or swipe movements for zoom and rotation, so the page can no longer be scrolled over it. On phones, where the model fills the screen, users get stuck.

  • Reduced motion (prefers-reduced-motion)

    Reduced motion is a system setting with which users ask for less animation on screen. Websites detect it through the CSS media query prefers-reduced-motion. A 3D configurator should then drop camera flights, inertia and looping animation.

Examples to try

Example configurator · fictional product

Spiral stair configurator

Plan a spiral stair: enter floor height and opening, treads and rotation are calculated, choose diameter, direction, railing and materials – with an example check and a PDF enquiry.

Stairs & access · Dimensions and sizes · Materials and finishes · Options, modules and accessories

Sources

  1. three.js docs: OrbitControls

← All terms in the glossary