Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] continuous lines when drawing #36

Open
ghost opened this issue May 26, 2022 · 1 comment
Open

[feature] continuous lines when drawing #36

ghost opened this issue May 26, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented May 26, 2022

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 two mousedown events instead of two mousemove (while event.buttons indicates click is held down) events or a mousedown event then mousemove event (again, button held down).

i have an example function here, but idk svelte so i can't submit a pull request.

@yosoyubik
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant