Just signed up today and excited to be part of the forum. I am wondering if there is a way to activate mouseWheel in safari? For me, the example at p5.org doesn’t work in safari, and the page I am trying to build works in Chrome, but not safari.
I think that the mouseWheel() event isn’t well supported by Safari, and others brothers actually ; it’s not a standard : https://developer.mozilla.org/en-US/docs/Web/API/MouseWheelEvent
Moreover, using mouseWheel() with event.delta can creates troubles, because the scroll of the mouse can be inverted by users in their settings and I also think that the Mac scroll and Windows / Linux scroll aren’t in the same direction, so values can be negatives instead you expected positives values
Understood! Thank you so much for the reply. Do you have any alternative suggestions on how to achieve such an effect?
Basically I am trying to have a sketch that is aware of the current scroll position. Obviously there are ways to do various jQuery scroll tracking, but I hadn’t seen an effective way to do it with p5.
Unfortunately, I don’t know how to do, even with JQuery wich get the positions of html element, relative to the scrollbar position I think. I don’t know if it can be apply for a canvas…
But if someone else has a solution I also would be glad to hear it !
hello!
I’m dealing with the same issue, I found roll.js, an incredible efficient, small library for javascript
however I don’t have a clue about how to implement it on p5.