We are about to switch to a new forum software. Until then we have removed the registration on this forum.
A little late, i thought it would be good if my P5 "advent calendar" was mobile friendly. Besides some CSS hacking and viewport so that it's not always scrolling and dragging and scaling, it seems like touch event to mouse event handling is inconsistent? http://advent2016.alienbill.com/spyders/ It uses mouseX/mouseY to see if the pointer is over the spyder and change the expression, and that works, but the core interaction doesn't because it's polling mouseIsPressed, I think - is there a best practice for treating all touch events as their mouse equivalents?
Answers
@kirkjerk -- did you ever figure out an answer to this question?
Looking at the p5.js documentation, it looks like the touch event functions are supposed to fail-over to defined mouse event functions by default.
https://p5js.org/reference/#/p5/touchStarted
https://p5js.org/reference/#/p5/touchMoved
https://p5js.org/reference/#/p5/touchEnded
Do you have a test sketch where this is not happening for you? Or is this default behavior not appropriate for your application?