Handle mobile touch gestures for scene controls#72
Conversation
There was a problem hiding this comment.
Do you think it can or it should to have this also in rust through web-sys (or gloo)? That is what we did for the original drag and drop.
If you don't mind, I'll give it a try after merge this PR.
There was a problem hiding this comment.
Okay, I see. If I understand it corretly, you collect the gestures by js and then send a payload to the rust side.
There was a problem hiding this comment.
i like your idea: but try to run it locally on your phone first to see if experience is good...
There was a problem hiding this comment.
theres a big PR on top of it.. but maybe we can rebase that on top of oyur changes :D
|
I gave it a try and works well (on my iphone, with firefox). Only problem is when touch an atom it is not selected. For the javascript part, you may notice that there is another I think we can move the mobile gesture into a dedicated js file and load both, I'll give it a try and commit directly here. |
|
Okay, I decide to keep the javascript part. It is a good example to show that there are two ways to communicate between bevy world and web api world. |
It's mostly JS for handling touch gestures on canvas.
Rust change is tiny.
As always contains previous PR's
WARNING NEED TEST ON NATIVE IPHONE... for android the axis were inverted than web version .. as example