lovasoa / whitebophir

Online collaborative Whiteboard that is simple, free, easy to use and to deploy
https://wbo.ophir.dev
GNU Affero General Public License v3.0
2k stars 394 forks source link

Use pointer events for better input #3

Open chris-morgan opened 5 years ago

chris-morgan commented 5 years ago

Pointer events are fairly well supported and have various neat improvements over using mouse events. For example, I have an erase button on my Surface Pen, and I’d really like it to work as an eraser, rather than requiring me to switch mode.

More involved things that could be done with pointer events: greater precision and update frequency, variable-width stroke (algorithmically much more complex to draw, but very useful), handling multiple simultaneous inputs.

For platforms not supporting pointer events, mouse events can still easily be used.

michael-markl commented 3 years ago

See e.g. https://pressurejs.com/ for variable stroke width