elmarti / react-joystick-component

Tiny, multitouch, component driven joysticks in react
MIT License
87 stars 27 forks source link

:sparkles: Ensure control plane is circular closes #11 #29

Closed ollipal closed 2 years ago

ollipal commented 2 years ago

With this change the joystick cannot escape the control plane. This is done by comparing the joystick distance to the radius, and scaling down the x and y coordinates if they are over the edge. This closes #11

_getWithinBounds was removed as it was now unused.

Really useful component by the way! Thank you for putting it together.

elmarti commented 2 years ago

Awesome @ollipal, thanks! I'll get this merged later today, I just need to switch the CD process to github actions as travis-org is now longer supported

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 2.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

elmarti commented 2 years ago

Awesome, thanks @ollipal, works a charm!