Skip to content

Add p5.Element touch events #22

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

Merged
merged 2 commits into from
Apr 15, 2025
Merged

Add p5.Element touch events #22

merged 2 commits into from
Apr 15, 2025

Conversation

davepagurek
Copy link
Collaborator

Resolves #21

This is a little more involved due to the existence of touchMoved in 1.x, which acts like a drag listener. We don't have a pointer event just for drag; instead, we have to use a move event, and filter out cases where the button isn't down.

Live: https://editor.p5js.org/davepagurek/sketches/nR6KyY9vF

@davepagurek davepagurek changed the title Davepagurek patch 1 Add p5.Element touch events Apr 15, 2025
@davepagurek davepagurek merged commit 38b0071 into main Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include touch events on p5.Element
2 participants