Skip to content

TrackballControls should have an API that more closely matches OrbitControls #27399

@MattFerraro

Description

@MattFerraro

Description

There are several differences between the API that TrackballControls provides vs what OrbitControls provides. Here's a few:

  1. enableDamping vs staticMoving (which are the same thing, just opposites)
  2. enableZoom vs noZoom
  3. enablePan vs noPan
  4. enableRotate vs noRotate
  5. zoomSpeed defaulting to 1.0 vs 1.2
  6. OrbitControls supports autoRotate and zoomToCursor while TrackballControls supports neither, but it could!
  7. dampingFactor vs dynamicDampingFactor
  8. .keys being an object in one, an array in the other
  9. .touches allowing you to configure touch support, but only for OrbitControls. It's missing on TrackballControls

Solution

I would like to see the API of TrackballControls change to conform better with the API of OrbitControls.

Alternatives

Create a new API and modify both OrbitControls and TrackballControls to match that new API. This seems worse than just modifying one, and OrbitControls seems much more popular.

Additional context

TrackballControls has known issues with touch support:
#25977

TrackballControls has known issues with reconfiguring the mouse button mapping:
#26366

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions