Remix.run Logo
panzi 12 hours ago

Register the mousemove event handler on window, then you will still get the events when the mouse moves out of the window/frame while dragging and it won't be that buggy.

DaanDL 11 hours ago | parent [-]

Was about to comment the same. It's a common mistake/gotcha.

benrutter 10 hours ago | parent [-]

Possibly dumb question, but does that still hold inside p5js?

virgil_disgr4ce 10 hours ago | parent [-]

p5 is just a wrapper that adds the setup() and draw() functions, so yes