Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(OrbitControls): reverse horizontal and vertical orbits separately #280

Merged

Conversation

boweihan
Copy link
Contributor

Why

I'm trying to support drag controls that are different from what OrbitControls ships out of the box. The horizontal drag behaviour is what I want, but the vertical is inverted. Currently, we only have reverseOrbit, which enables the vertical drag behaviour that I want but inverts the horizontal as well.

reverseHorizontalOrbit is an API that enables inverting just the horizontal orbit direction.
reverseVerticalOrbit is an API that enables inverting just the vertical orbit direction.

What

update rotateLeft and rotateRight functions in OrbitControls to reflect new API.

Checklist

  • Ready to be merged

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6766863:

Sandbox Source
Vanilla Configuration

@CodyJasonBennett CodyJasonBennett changed the title feat: support reversing horizontal and vertical orbit separately feat(OrbitControls): reverse horizontal and vertical orbits separately Aug 23, 2023
@CodyJasonBennett CodyJasonBennett merged commit 53efecd into pmndrs:main Aug 23, 2023
2 checks passed
@github-actions
Copy link

🎉 This PR is included in version 2.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support inverting horizontal / vertical orbit direction separately in OrbitControls
2 participants