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

Feature Request: Additional Gestures #117

Open
Newlance opened this issue Aug 2, 2022 · 2 comments
Open

Feature Request: Additional Gestures #117

Newlance opened this issue Aug 2, 2022 · 2 comments

Comments

@Newlance
Copy link

Newlance commented Aug 2, 2022

Is your feature request related to a problem? Please describe.
There are more possible actions per entity than there currently are ways to trigger them intuitively.

Describe the solution you'd like
I would like additional gestures to control more than one action.
Example of additional gestures might be:

  1. Long Press

  2. Long Press

  3. Double Press

  4. Swipe Left

  5. Swipe Right

  6. Swipe Up

  7. Swipe Down

This would enable a single light fixture to:

  1. tap: Toggle on / off
  2. long press: more info
  3. Swipe up: increase brightness
  4. Swipe down: decrease brightness
  5. Swipe right: Increase fan speed / Change color
  6. Swipe left: Decrease fan speed / change color (other way?)

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Currently I am controlling multiple functions by adding additional 3D objects in the world and teathering them each to a different gesture action, such as a ceiling fan:

  • Tap the fan to toggle on/off
  • tap a ceiling light next to it to toggle the fan's light (this is buggy because if the light is actually on the ceiling fan as it should be, it causes tapping the fan to toggle both the fan and the light, so for now I have to have the light on the actual 3D light object)
  • tap a painting on the wall to control color
  • ???? Still working out what I want to do for lights that have brightness control, but no color. Trying to stay away from UI popups / more-info

Additional context
Add any other context or screenshots about the feature request here.

@Newlance Newlance changed the title Additional Gestures Feature Request: Additional Gestures Aug 2, 2022
@Newlance
Copy link
Author

Newlance commented Aug 9, 2022

I've been messing with this all day. For the life of me I cant seem to figure out how the mobile presses are handled. Both gesture and regular touchscreen event handling.

I've tried adding event listeners for touchend/touchmove/touchcancel with no response (have it just writing to Overlay for debugging. nothing was written) on mobile.

I also tried commenting out every single addEventListener in floor3d-card.ts which, expectedly removed the ability to interact with any devices on the PC (no click, dbclick were registered) and yet events fired from a smart phone were still being handled! I don't understand how, but I'd be happy to collaborate on this if you could point me in the right direction.

@adizanni
Copy link
Owner

Hello @Newlance, the Three.js canvas is capturing the gesture events in order to manage pan, zoom, rotate, etc. I'm havind the biggest trouble to make all event sources (HA, Three.js and the card) work together seamleassly, even more on mobile devices.

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

No branches or pull requests

2 participants