Closed CounterPillow closed 5 years ago
PointerEvents all kind of look dead https://code.google.com/p/chromium/issues/detail?id=162757#c64
Pen and touch support would be nice though.
Hmmm, too bad it's dead.
There's also the Wacom plugin, but that's Wacom only and requires a native plugin which Mozilla Firefox will soon phase out, from what I've heard.
It seems like PointerEvents just recently reached W3C recommended status, so we might see something happening in the future. Perhaps hands.js is worth looking into, since it provides a PointerEvents implementation for all browsers, but it is sort of a big dependency just so that IE users can use tablets.
PointerEvents allow for more information, such as pressure and tilt of a stylus. I am not sure how browser support is for this (the caniuse.com page erroneously shows support for a similarly named CSS property), so a fallback might be required.
Additionally, actual use of the pressure information needs to be implemented too. Since it's a float between 0.0 and 1.0 (with the default being at 0.5 for pointer devices without pressure information), a trivial implementation should be a simple case of multiplying radius and alpha. However, better brush dynamics that factor in movement speed might be desired.