I just made a basic drawing app in p5.js with support for the Apple Pencil.
It uses Pressure.js to handle the pointer events so it should work with other input devices too. Let me know if you try it with other pencils and/or tablets! [edit: it also works with regular touch events on iPhone]
Here’s how it looks:
Thanks to Abe Pazos (a.k.a Hamoid) for the help figuring out the tricky parts