-
Notifications
You must be signed in to change notification settings - Fork 204
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: Add joystick to Vector3d #433
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. |
width: '80px', | ||
height: '80px', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably not be hardcoded
@@ -5,7 +5,7 @@ import { Row } from '../UI' | |||
import { StyledButton } from './StyledButton' | |||
|
|||
type ButtonProps = { | |||
label: string | |||
label: string | JSX.Element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this makes sense. I can imagine a button having the ability to be triggered by a key, then adding a label to it, then adding buttons to the joystick and having them trigger changes in the joystick.
Except right here I just added labels.
Maybe they shouldn't even be buttons. I used buttons because they were readily available and thought on a touch device they would be nice, but I just tested them and they are very hard to hit below the joystick and would make sense to the left or right instead. Thoughts vs feature creep?
6a85d80
to
d972c2d
Compare
d6e2607
to
28b3910
Compare
feat: Allow joystick to control a non XY plane feat: Add hook to capture keypress chore: Create component for Joystick3d fix: Don’t use precision hotkey to set plane feat: Add children to Joystick feat: Add buttons to JoystickPlayground style: Styled joystick plane indicator feat: Add button key labels feat: Add cube rotation feat: Update cube fix: Don’t always show all joysticks ;) chore: Refactoring out JoystickPlayground3d chore: Add changeset fix: Joystick buttons should not be a button (remove nested button warn) chore: Simplify indexing chore: Rename for clarity chore: Remove comments style: Remove hardcoded size throughout
28b3910
to
eae2d38
Compare
I added a the Joystick from Vector2d to Vector3d, but now I need to be able to change which 2 dimensions the joystick is affecting.
I added a quick "test" to leva-busy which can be run with
yarn demo:dev
as well as some temporary comments in the code. Can someone take a look and perhaps point me in the right direction? Thank you :D