imagemonkey-core icon indicating copy to clipboard operation
imagemonkey-core copied to clipboard

(info - Javascript Pressure-pen support)

Open dobkeratops opened this issue 5 years ago • 9 comments

I was curious to know if javascript/the browser can read pen-pressure; I found this.. https://pressurejs.com . flicking though the source code , i see references to 'event.pressure' for pointer events etc

I'm very curious to try this out with another editor experiment.. I wonder how far you could get in JS emulating paint tools. (as you know i've looked into GIMP for making masks aswell)

Trying out the test page, the iPad+ApplePencil works fine: it's reporting 0.00-0.1 for a 'light touch' and values ~0.4 for 'heavy pressure'.

  • also works on Google Chrome on my MacBook Pro ('light touch=0.3, heavy=1.0' ). Reading up it seems it's an experimental feature on the Safari 12.1. (must try updating my linux browsers, it didn't work on my current versions).

A painting workflow could harnesses people's 'doodling' itch.. but probably requires more work on the tools, and might be harder to validate? Paint tools are great for more accurate masks, and in scenarios where the outlines are hard to plan. I'd recommend using pressure=brush size rather than opacity as the default.

unfortunately pressure pens aren't so common? but people have wacoms for photo manipulation, there's the samsung Galaxy Note/Tab S4 etc, and Microsoft Surface, and all the current iPads now support Apple Pencil (see the recent iPad mini refresh)

dobkeratops avatar Mar 25 '19 22:03 dobkeratops