tizzle / aframe-orbit-controls-component

An Orbit Controls Component for A-Frame VR
https://tizzle.github.io/aframe-orbit-controls-component/
MIT License
74 stars 25 forks source link

would like to add support for trackpads (shift key as alternative to mouse button 3) #5

Closed morandd closed 7 years ago

morandd commented 7 years ago

I'd like to add support for trackpads (just enter PAN mode on mousedown+event.isShift, since trackpads dont have 3 buttons).

Could you accept the outstanding PR so I can proceed. I don't want to start until there is a stable base to work from, since git merges are too complex for me to grok. thanks!

morandd commented 7 years ago

I think this is as simple as changing the line

else if ( event.button === this.mouseButtons.PAN )

to

else if ( event.button === this.mouseButtons.PAN || (event.button===this.mouseButtons.ORBIT && event.isShift )

Then shift+trackpad single touch (aka mouse button 1) is the same as mouse3.

tizzle commented 7 years ago

Hey @morandd,

sorry for the delay, i just merged the open pull request from @HAZARDU5. Feel free to rock!

Thanks for your contribution.

Cheers