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

Select Tool: Pressing SHIFT is hard-coded to start selection, no options to change #731

Open
DennisSmolek opened this issue Jan 21, 2022 · 3 comments · May be fixed by #769
Open

Select Tool: Pressing SHIFT is hard-coded to start selection, no options to change #731

DennisSmolek opened this issue Jan 21, 2022 · 3 comments · May be fixed by #769
Labels
enhancement New feature or request

Comments

@DennisSmolek
Copy link
Contributor

DennisSmolek commented Jan 21, 2022

Problem description:

The <Select> Component is pretty cool but I noticed that it requires the user to press the shift key to trigger.

I first saw the select + edge post in discord and played with it, thought it was cool but didn't even know there was a "Selection Box" because it requires you to hit the shift key first.

Then I saw Paul's tweet:
and realized I missed a huge piece of functionality lol.

Tools like Spline, Blender, Photoshop, Figma, etc. all have the pattern of Click & Drag to select and then pressing command keys gives you the alternate functionality.

Video Example

Letting the user determine what key presses and what pattern would be helpful, and I'd say to invert the current pattern and have the select fire by default.

If you want a key press to unbind the control (Orbit, Trackball, etc) I would suggest the Option/Alt key as it's already standard pattern for "Orbit"

Shift is often used for panning on the XY frame (Blender, Cad, Spline, etc) to move your point of origin when you rotate

Command is the typical zoom key.(except Figma for some weird reason)

Relevant Code:

function pointerDown(event) {
      if (event.shiftKey) {
        onSelectStart(event)
        prepareRay(event, selBox.startPoint)
      }
    }

Sandbox

  • three version: 136
  • @react-three/fiber version: 8.0 beta 4
  • @react-three/drei version: 8.6.0
@DennisSmolek DennisSmolek added the bug Something isn't working label Jan 21, 2022
@drcmda
Copy link
Member

drcmda commented Jan 23, 2022

would you want to make a pr for this? all these controls advance according to how they're used.

@DennisSmolek
Copy link
Contributor Author

would you want to make a pr for this? all these controls advance according to how they're used.

That's a good idea, I'm making a R3F editor to wrap up a lot of concepts/ideas I have so I'll add this to the list of experiments to toss in!

@contactsimonwilson
Copy link

contactsimonwilson commented Feb 16, 2022

I'm facing the same limitation
@drcmda would you be happy with something like the following?
contactsimonwilson@bf14aaf

Happy to make a PR. Should this item be tagged as a bug or feature?

@joshuaellis joshuaellis added enhancement New feature or request and removed bug Something isn't working labels Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants