Page MenuHomePhabricator

Tweak camera controls for a smoother experience
Closed, ResolvedPublic

Assigned To
Authored By
dmaza
Mar 9 2026, 4:41 PM
Referenced Files
F78180610: 2026-04-26_10-47-54.webm
Apr 27 2026, 2:56 PM
F78180107: 2026-04-26_10-45-31.webm
Apr 27 2026, 2:56 PM
F78179497: 2026-04-26_10-42-52.webm
Apr 27 2026, 2:56 PM
F78178542: 2026-04-26_10-38-03.webm
Apr 27 2026, 2:56 PM
F78177540: 2026-04-26_10-33-09.webm
Apr 27 2026, 2:56 PM
F78176813: 2026-04-26_10-29-04.webm
Apr 27 2026, 2:56 PM

Description

Update the camera controls by switching from TrackballControls to OrbitControls to eliminate disorienting upside-down view. Add damping for rotation and panning to maintain a similar experience.

Acceptance Criteria:

  • Multiple rotations should keep camera up locked (no drifting)
  • Damping/inertia should stay fairly similar
NOTE: zooming with OrbitControls has no damping. This is a fair trade-off in my opinion

Derived Requirement

Ensure that the camera controls use OrbitControls so that the camera's upright orientation is locked during multiple rotations, and that rotation and panning retain damping/inertia behavior comparable to the previous TrackballControls experience.

Test Steps

Test Case 1: Ensure camera up orientation remains locked during multiple rotations

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Click and drag to rotate the camera continuously in multiple full rotations.
  3. Repeat the rotation in various directions (horizontal, vertical, diagonal).
  4. ✅❓❌⬜ AC1: The camera does not flip upside-down or drift from its upright orientation at any point during or after multiple rotations.

Test Case 2: Ensure rotation damping/inertia is retained after switching to OrbitControls

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Click and drag to rotate the camera, then release the mouse.
  3. Observe the camera's behavior immediately after releasing the drag input.
  4. ✅❓❌⬜ AC2: The camera continues to move briefly after the drag is released, demonstrating damping/inertia behavior comparable to the previous experience.

Test Case 3: Ensure panning damping/inertia is retained after switching to OrbitControls

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Use the appropriate input (e.g., right-click drag or two-finger drag) to pan the camera, then release.
  3. Observe the camera's behavior immediately after releasing the pan input.
  4. ✅❓❌⬜ AC3: The camera continues to pan briefly after input is released, demonstrating damping/inertia behavior comparable to the previous experience.

Test Case 4: Ensure zooming functions without damping as an accepted trade-off

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Use the scroll wheel or pinch gesture to zoom in and out.
  3. Release the zoom input and observe the camera's behavior.
  4. ✅❓❌⬜ AC4: Zooming responds to input and stops immediately upon release with no inertia, and the zoom function remains fully operational.

QA Results - PROD

Event Timeline

Change #1248898 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/extensions/3D@master] Tweak camera controls for a smoother experience

https://gerrit.wikimedia.org/r/1248898

dmaza changed the task status from Open to In Progress.Mar 9 2026, 5:32 PM

Change #1248898 merged by jenkins-bot:

[mediawiki/extensions/3D@master] Tweak camera controls for a smoother experience

https://gerrit.wikimedia.org/r/1248898

HMonroy changed the task status from In Progress to Open.Apr 21 2026, 4:38 PM
HMonroy moved this task from Feedback and Review to QA on the Community-Tech (Sea Lion Squad) board.

@dmaza Confirmed camera controls works as design and stays upright during multiple rotations, as seen from the videos below. I will mark this as Resolved. Thanks for all your work!

Test Result - Prod

Status: ✅ PASS
Environment: Prod
OS: macOS Tahoe 26.4.1
Browser: Chrome 147, Firefox 149, Safari 26.4
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://commons.wikimedia.org/wiki/File:Reconstru%C3%A7%C3%A3o_facial_-_cr%C3%A2nio_-_C%C3%A1ceres-MT.stl#/media/File:Reconstru%C3%A7%C3%A3o_facial_-_cr%C3%A2nio_-_C%C3%A1ceres-MT.stl

Test Steps

Test Case 1: Ensure camera up orientation remains locked during multiple rotations

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Click and drag to rotate the camera continuously in multiple full rotations.
  3. Repeat the rotation in various directions (horizontal, vertical, diagonal).
  4. AC1: The camera does not flip upside-down or drift from its upright orientation at any point during or after multiple rotations.

Test Case 2: Ensure rotation damping/inertia is retained after switching to OrbitControls

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Click and drag to rotate the camera, then release the mouse.
  3. Observe the camera's behavior immediately after releasing the drag input.
  4. AC2: The camera continues to move briefly after the drag is released, demonstrating damping/inertia behavior comparable to the previous experience.

Test Case 3: Ensure panning damping/inertia is retained after switching to OrbitControls

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Use the appropriate input (e.g., right-click drag or two-finger drag) to pan the camera, then release.
  3. Observe the camera's behavior immediately after releasing the pan input.
  4. AC3: The camera continues to pan briefly after input is released, demonstrating damping/inertia behavior comparable to the previous experience.

Test Case 4: Ensure zooming functions without damping as an accepted trade-off

  1. Navigate to the 3D viewer feature in the Wikipedia interface.
  2. Use the scroll wheel or pinch gesture to zoom in and out.
  3. Release the zoom input and observe the camera's behavior.
  4. AC4: Zooming responds to input and stops immediately upon release with no inertia, and the zoom function remains fully operational.

Other Browsers

FirefoxSafari
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)