This repository was archived by the owner on Apr 11, 2020. It is now read-only.
Translate3d with fractional pixels leads to blurry images#73
Open
p-j wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi !
We've been using react-view-pager for a while, so first, thanks for this project and for open sourcing it!
I've noticed recently that, in our use case, for odd resolutions, the
trackPositioncould end up being a fractional number.This, linked to the usage of
translate3dproduces blurry images on Chrome (I didn't test other browsers).With this in mind, there are 2 possible solutions:
translateinstead oftranslate3dand loose the performance advantage thattranslate3doffers. Thezbeing fixed to 0 it will be a non breaking change.In this PR I've chosen the second solution as both performance & sharpness are important to us; but the
translatesolution could also be "good enough".Below are two examples, if you look at the bread crust you can see the difference in sharpness.

