Skip to content

Scroll on mouse is orbiting instead of zooming in #919

Description

@azadbal

Issue:
On my windows 11 machine using a Logitech G502 X mouse, whenever I move the scroll wheel, SuperSplat treats it like a 2-finger trackpad scroll, orbiting around the camera focus/pivot point.

It's also somewhat inconsistent because sometimes (maybe 5% of the time), it will actually zoom in instead of orbiting!

Further details:
I had Codex look through supersplat/src/controllers.ts and the logic is determined by

  1. event.deltaMode - If it’s not pixel mode, supersplat assumes it’s a physical wheel. Firefox is the main reason for this check.
  2. wheelDeltaY / wheelDeltaX - In Chrome/Safari-style browsers, a classic mouse wheel often reports values in multiples of 120 per notch. The code treats that as “real wheel”. Trackpads usually emit arbitrary smooth values, not aligned to 120.
  3. Fallback on deltaX / deltaY - If both axes are moving at once, it assumes trackpad. If the deltas are just integers, it leans toward mouse wheel.
  4. Event timingIt groups wheel events into “bursts.” A burst of many closely spaced events looks more like trackpad scrolling. A sparse notch-by-notch pattern looks more like a wheel.

I disabled side scrolling on my scroll wheel to not invoke the "fallback on deltaX/Y" logic, but the issue persists. Perhaps my mouse is emitting a smooth scrolling signal? Not AFAIK...

Is this something y'all can look into or something I should try work on myself, since I'll be able to verify the failure/success states?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions