iOS: mouseX/mouseY works, mouseIsPressed doesn't?

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

  • edited January 2017

    Is there a best practice for treating all touch events as their mouse equivalents?

    @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.

    Do you have a test sketch where this is not happening for you? Or is this default behavior not appropriate for your application?

Sign In or Register to comment.