rn-perfect-sketch-canvas icon indicating copy to clipboard operation
rn-perfect-sketch-canvas copied to clipboard

Apple Pencil

Open robertherber opened this issue 2 years ago • 5 comments

Would it be possible to add some basic Apple Pencil support? I'm thinking mainly about detecting whether an Apple Pencil is used. Would be really cool if it could also use the adaptive pressure from the Pencil - but that's a bonus.. :)

robertherber avatar Jun 13 '22 18:06 robertherber

It uses https://github.com/steveruizok/perfect-freehand so I believe adaptive pressure from pencil is supported :)

wobsoriano avatar Aug 03 '22 22:08 wobsoriano

@wobsoriano I might be missing something, but I don’t think that’s what perfect-freehand does. It provides a way to draw nice lines as well as simulate pressure, but to actually capture the pressure data from an Apple Pencil?

robertherber avatar Aug 03 '22 23:08 robertherber

Do you mean "detecting whether an apple pencil is used?" ?

wobsoriano avatar Aug 03 '22 23:08 wobsoriano

I’m thinking two main things:

  • detecting whether a pencil is used (a simple yes/no)
  • use the actual pressure the user applies with the pencil (coming through the Apple APIs, and not just simulating based on timing as is the default from my understanding)

And with that in place it would probably be fairly easy to support “tool switching” to for example switch between two colors or between eraser and painting to create a fully native experience.. 🙂

robertherber avatar Aug 04 '22 07:08 robertherber

That's interesting. I'm keeping this open til I come up with an idea of how to do it.

wobsoriano avatar Aug 04 '22 15:08 wobsoriano