jakubfiala / atrament

A small JS library for beautiful drawing and handwriting on the HTML Canvas.
http://fiala.space/atrament/demo
MIT License
1.56k stars 115 forks source link

When moving mouse fast the line becomes humongous #11

Closed jordyvandomselaar closed 7 years ago

jordyvandomselaar commented 8 years ago

As the title says. When I move my mouse slowly the line is very thin, but when I move it faster it becomes HUGE! How can I fix this?

jakubfiala commented 8 years ago

Hey, thanks for letting me know. Got any screenshots of what you mean? The line is meant to get thicker based on mouse speed, in order to create a more realistic "ink-like" look. But it shouldn't be a massive difference.

Have you, by any chance, got an unusual mouse or display? Like a hi-dpi mouse?

jordyvandomselaar commented 8 years ago

Image: http://prntscr.com/c5v0bz, would it be possible to turn this effect off? I'm using a regular mouse but the app I'm using this in will get deployed on Ipads

jakubfiala commented 8 years ago

Thanks! It would indeed be possible to switch it off, and it's definitely an useful option. I can probably add it by the end of the week, but please feel free to submit a PR!

jordyvandomselaar commented 8 years ago

Thank you! I'll see what I can do :D

teacoat commented 7 years ago

Hey any word on this?

jakubfiala commented 7 years ago

@teacoat completely forgot about this. I think I've got a nice bunch of updates lined up already, so might fix this and make a release soon.

jakubfiala commented 7 years ago

@jordyvandomselaar @teacoat this is now fixed in v.0.2.3, available on npm right now 💥

to disable the adaptive stroke width, you can just do:

myAtramentInstance.adaptiveStroke = false;
jordyvandomselaar commented 7 years ago

You're awesome!

teacoat commented 7 years ago

@jakubfiala Just saw this, thanks a lot!