model-viewer icon indicating copy to clipboard operation
model-viewer copied to clipboard

Zoom limits: cannot expose a single intuitive zoom slider because perceived zoom depends on both FOV and orbit radius

Open Strizhko-aa opened this issue 2 months ago • 1 comments

Description

I need to limit user zoom and expose it as one intuitive slider (e.g., 0–100). In <model-viewer>, the perceived zoom changes through two different parameters at the same time:

  • Field of viewfield-of-view (with min-field-of-view / max-field-of-view)
  • Camera orbit radiuscamera-orbit (with min-camera-orbit / max-camera-orbit)

Because both affect the apparent scale, I can’t define a single min/max zoom range or a single slider mapping. If I clamp FOV, changing the orbit radius still changes perceived zoom; if I clamp radius, changing FOV still changes perceived zoom.

Ask: What is the recommended way to:

  1. Constrain zoom to a single, predictable min/max range that users can’t exceed, and
  2. Drive that range from one slider value (mapping to FOV and/or orbit radius as needed)?

If there is a known approach or example to combine these parameters for a single zoom control, please point me to it.

Strizhko-aa avatar Oct 20 '25 12:10 Strizhko-aa

I have the same problem, maybe there is some solution?

AndreyZadachin avatar Nov 14 '25 19:11 AndreyZadachin