Open ghost opened 2 years ago
Ah, very cool, thanks @nogira for sharing this. I'll look into adding it after the next OTA drops. Also, very interesting to see your work on the pixel editor using HTML's canvas element—this is something I've been looking into to replace the current svg-generated pixels. Feel free to reach out on urbit at ~norsyr-torryn
if you want to talk more about it.
currently if you drag the mouse across the screen fairly fast, you get dots of pixels instead of a line of pixels. you can just track the position of the last pixel and fill in the line between the two points, and then reset the position of the last pixel to null as soon as a
mouseup
event occurs to prevent drawing a line between twomousedown
events instead of twomousemove
(whileevent.buttons
indicates click is held down) events or amousedown
event thenmousemove
event (again, button held down).i have an example function here, but idk svelte so i can't submit a pull request.