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

Draw 1 cell per pixel, then scale canvas up #30

Closed
wants to merge 2 commits into from
Closed

Conversation

tomstuart
Copy link
Contributor

In principle this is a much more sensible way of doing things, since it eliminates the arithmetic around cellSize and probably makes the scrolling less CPU-intensive (#10) because we’re not copying as much image data. This technique might also make it easier to customise the page for mobile devices (#29).

In practice it’s not ready because scaling the <canvas> with CSS makes it blurry — browsers use bilinear interpolation or similar to resample scaled images, rather than causing pixelation with nearest-neighbour, but we want pixelation in this case. I’ve tried various fixes (e.g. CSS 3’s image-rendering property) but none of them seem to work, at least in Chrome.

Can anyone make this work?

We can scale the canvas itself with CSS if we want them to be any larger
or smaller than that.
@mudge mudge closed this Apr 5, 2017
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

Successfully merging this pull request may close these issues.

2 participants