4 ms·
Yes it does.
by lovasoa 6y ago
Yes it does.
- melvinroest 6y agoWhen using the stylus, it doesn't support pressure sensitivity (I just tried with my Wacom). I created doodledocs.com as a side project, which does support it (and almost doesn't support anything else :P). The code is open source and also purely front-end based. So the Excalidraw authors can see how it could be implemented. It's basically Bresenham's algorithm combined with the DOM API. The code is at https://github.com/melvinroest/doodledocs/tree/master/app/components https://github.com/melvinroest/doodledocs/tree/master/app/co...
- asadlionpk 6y agoThe relevant part: https://github.com/melvinroest/doodledocs/blob/master/app/components/draw-engine.js#L156 https://github.com/melvinroest/doodledocs/blob/master/app/co...
- melvinroest 6y agoYup, that's the Bresenham part. Somewhere else, I expose this to actually drawing it with a pencil. Thanks for pointing it out, I was overcomplicating it a bit in my mind (I wanted to point out more things) and therefore I didn't point it out.