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
Babylon virtual joystick improvements #7398
Comments
Hi, |
Hi! I'm hoping to take the lead on developing these improvements, may I? I see that the linked forum thread has been inactive since January so I assume the improvements mentioned here will be good for now? To reiterate, all that needs to be covered is:
|
Fantastic! I was thinking that we could use GUI for that. Thoughts? |
My thoughts exactly! I'm thinking we can take additional arguments in the VirtualJoystick constructor to allow people to easily change the basic style. Then we can expose the GUI element too so people can make further customization if they so choose. Extra parameters:
What do you think? |
@Rockwell15, I'll let @deltakosh answer you, but wanted to thank you for taking the lead on this issue! |
Love it!!! |
I see that people currently have the option to set a premade canvas on the VirtualJoystick class. Do you see any scenario where simply ignoring that property would create issues for backward compatibility? (Since we'd be using the GUI controls for pointer events instead) |
I've made an implementation just using GUI inside of the current "virtualJoystick.js" file. However, I just realized when I went to change to a module import (instead of using the global BABYLON.GUI), that the "gui" module is not in "src", and no other files in "src" use the GUI. Am I taking the wrong approach directly using GUI in "virtualJoystick.js"? |
Rats! you are right! we cannot use GUI as it will create a loop between both and bjs must have no dependency We need to create an external module for that:( Pinging @sebavan to see if he has a better idea to use GUI from bjs code |
I can still accomplish everything by drawing on canvas, no problem. Or maybe do you think it would be better to have users who want customizations to pass the GUI reference with the customization options? |
I think it is ok to draw on the canvas (I wanted to avoid duplication of code mostly) |
I have a branch ready to make a pull request, but it has multiple commits. This is my first github contribution so I'm not sure of the etiquette and didn't read anything that addresses this question. Should I make this just 1 commit? Or is multiple commits for a single issue common? |
Ideally 1 commit if you can squash them |
Done |
Improve Virtual Joystick. Initial feedback:
1 - It can not be made sticky.
2 - It can not be made always visible
3 - It can not be modified ( size, color, etc )
Additional feedback to come in forum thread: https://forum.babylonjs.com/t/navigation-gui-for-tablets-mobiles/7771
The text was updated successfully, but these errors were encountered: