You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #120, @katestange was wanting to enable visualizers to use keyPressed.
p5 allows a user to define a keyPressed function. From the docs:
The keyPressed() function is called once every time a key is pressed.
The developer never calls the keyPressed function. Seemingly p5 does that. I imagine p5 looks at your source code, finds the keyPressed function you defined, and then uses it as a callback for a key down event listener. See this example.
I have no idea how to define the keyPressed function in a visualizer class so that it is called by p5.
The text was updated successfully, but these errors were encountered:
In #120, @katestange was wanting to enable visualizers to use
keyPressed
.p5 allows a user to define a
keyPressed
function. From the docs:The developer never calls the
keyPressed
function. Seemingly p5 does that. I imagine p5 looks at your source code, finds thekeyPressed
function you defined, and then uses it as a callback for a key down event listener. See this example.I have no idea how to define the
keyPressed
function in a visualizer class so that it is called by p5.The text was updated successfully, but these errors were encountered: