google / google/model-viewer

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

Open
#5,098 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.2k
Forks
947
PR merge metrics
No merged PRs in 30d

Description

# Description
I need to **limit user zoom** and expose it as **one intuitive slider** (e.g., 0–100). In ``, the perceived zoom changes through two different parameters at the same time:

- **Field of view** — `field-of-view` (with `min-field-of-view` / `max-field-of-view`)
- **Camera orbit radius** — `camera-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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.