daniel-lundin / snabbt.js

Fast animations with javascript and CSS transforms
http://daniel-lundin.github.io/snabbt.js/
MIT License
5.2k stars 330 forks source link

Half pixels, blur text #43

Closed veke closed 9 years ago

veke commented 9 years ago

The translate3d matrix has half-pixel values...that causes text blurriness on chrome. Not sure if this is really an issue. But in my case I rounded the values in matrixToCSS function to nearest integer to solve the problem. Im not sure either why sbabbt makes full integer values to such a long floats. Example position: [0, 374, 0] is 374.2063598633 in the matrix.

daniel-lundin commented 9 years ago

During an animation sub-pixel values are ok(even preferable, it often looks smoother), but when the animation is finished the position should be very close to 374 in your case. So something is not working correctly there right now. I will have a look into it. Thanks!

veke commented 9 years ago

Ok. Let's see if you find something.

daniel-lundin commented 9 years ago

Btw, are you using spring easings? I see that it might be an issue there with the end state.

veke commented 9 years ago

Yes I am.

daniel-lundin commented 9 years ago

I found the bug, it's fixed in master now. A new release is coming in the next few days as well.

veke commented 9 years ago

Much better now. Thanks. A little mismatch in the options name and the actual option in the code: Documentation page: springDeaccelaration In the code: springDeceleration

daniel-lundin commented 9 years ago

Great! And good catch, will update the documentation.