I'm trying to make painting on my JavaScript Canvas possible only through the Apple Pencil. Because currently drawing is done by resting the hand in several places, because nciht distinguishes between hand and finger.
I found the following approach from another thread with the SPen where you measure the radius of the touch input, unfortunately it doesn't work for the Apple Pencil on an iPad. Do you have any ideas?
if(e.targetTouches[0].radiusX === 0)
Currently I get the position with the following code:
canvas.addEventListener('touchstart', (e) => {});
canvas.addEventListener('touchmove', (e) => {});
canvas.addEventListener('touchend', () => {});
I am grateful for any ideas! Thank you very much!