Event handlers in p5js aren't being executed
p5.js has event handlers, such as mousePressed() as alternative to predefined variables, such as mouseIsPressed
. Basthon Kernel does not seem to call those currently (tested with Basthon Console on 30.12.2020).
Here is a testcase:
from p5 import *
def setup():
createCanvas(400, 400)
def draw():
background(0, 0, 255)
if (mouseIsPressed):
print('mouseIsPressed')
def mousePressed():
print('mousePressed event') # does not work
run()
Thank you very much for your nice project. Bonne année 2021!