Open jlnalber opened 2 years ago
I think the problem mostly is that it is not easy to just change the stroke with in an svg path element... Nevertheless I could make it a path that goes back and forth and then close it with a certain fill. Problem: how is the thickness calculated (in which direction)?
Another problem is the complete makeover of the rubber gum method. Then there will need to be a point detection function that lays points along the path. That could turn out quite difficult.
When using for example a pen, different levels of pressure could be introduced. This could easily be done by PointerEvent.pressure, which contains a number from 0 to 1 (usual is 0.5) representing the pressure (could be percentage of originally used width). https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure