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: Add joystick to Vector3d #433

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

s4l4x
Copy link

@s4l4x s4l4x commented Jan 21, 2023

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2023

⚠️ No Changeset found

Latest commit: 7100f35

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
leva ❌ Failed (Inspect) Jan 31, 2023 at 0:53AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 21, 2023

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.

Comment on lines +33 to +35
width: '80px',
height: '80px',
Copy link
Author

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
Copy link
Author

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?

@s4l4x s4l4x force-pushed the Add-joystick-to-Vector3d-#431 branch 2 times, most recently from d6e2607 to 28b3910 Compare January 31, 2023 14:23
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
@s4l4x s4l4x force-pushed the Add-joystick-to-Vector3d-#431 branch from 28b3910 to eae2d38 Compare January 31, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant