-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
touch location not given in iOS #1705
Comments
ah, touchX/Y was removed in 0.5.5, use mouseX/Y instead |
Sorry, I mis-typed: mouseX and mouseY – also pmouseX and pmouseY |
hm ok, could you please post a small snippet of code that illustrates the problem? it's hard to test when it's in the context of a larger project like you've linked to. thanks. |
Did you try my link? Only I think it's pretty handy to test cross-platform... |
yes, what would be helpful is a small sample of code that is about 10-20 lines max that illustrates the problem. thanks. |
|
I posted it biologymodel.org/p55 – if that helps? |
@EdwardFlach I'm not sure I understand your problem thoroughly so do forgive me if I missed the point completely 😉 I tested your sample code on desktop and on iPhone Safari and it seemed to be working as expected only exception being the values of
Other than that not any major issue that I noticed. |
I'm using Safari on iPhone SE running 10.2 as well. I can't really visit biologymodel.org/p55 so I only run the code you provided on my computer. I'm not sure if there's a problem on there or not... If you can it might be helpful to get the console value of the variables gotten through |
I don't know any other way to get the code to run other than hosting it and viewing it on a website, so I don't know how you're looking at it. And I don't understand why you can't visit biologymodel.org/p55! I added console.log() and print(), just in the draw() function. I don't really know what I'm looking for. The phone still shows NaN for mouseX – just the same as displayed in write(). |
OK, I just realized I didn't update my p5.js version and this example works perfectly fine on 0.5.4 and broke on 0.5.5. I'll have a dig as to why, in the meantime you can roll back to 0.5.4 for the time being it should work as expected. @lmccart I think this should be reopened |
That's great that you reproduced it! (It's difficult to fix a problem you can't see :p) And thanks very much for the workaround – I really appreciate it. |
@lmccart I managed to trace the problem back to 3c76fa1 where touchXY were removed and managed to isolate the problem with issue #1598. In
which will eventually get used in
The event argument passed
|
aha thanks @limzykenneth for tracking that down, and thanks @EdwardFlach for helping us reproduce it. we recently removed touchX/Y and it looks like there are still a couple kinks to work out. I think this should be a pretty easy fix, I'll take a stab at it today. |
https://biologymodel.org/choose
using p5 0.5.5
My code is fine on my Mac OS 10.12, and my friend has it working on Android: Chrome reporting correctly, Firefox showing NaN in draw() but must be correct in TouchEnded() to get past the decision screen to the simulation.
On iOS 10: touchX shows NaN nearly always in draw(), and no response in TouchEnded()
I also tried ptouchX and touchStarted(): no joy
Also: my p5 editor 0.6.2 doesn't recognise touches[i].x " Uncaught TypeError: Cannot read property 'x' of undefined"
Sorry if I haven't been thorough enough in my analysis – I'm a bit new to this
The text was updated successfully, but these errors were encountered: