mousePressed or mouseClicked functions

6 views
Skip to first unread message

emf...@gmail.com

unread,
May 3, 2018, 11:38:18 AM5/3/18
to Processing.js
I'm using the mousePressed functions at various points within my draw loop, but want the code to stop and wait at these points (i.e. not continue with the code if the mouse isn't pressed).

I've written all the rules in the mousePressed function at the beginning (outside my draw loop), but can't work out how to create a listener function that will stop the code until the mouse is pressed while the code is running.

Using JavaScript if that helps, any help with this would be very much appreciated :)
Reply all
Reply to author
Forward
0 new messages