3 ms·
The canvas tag has `image-rendering: pixelated;` set, but Firefox currently doesn't support the setting right now. [0] Are you able to try it in Chromium? I se
by danbolt 9y ago
The canvas tag has `image-rendering: pixelated;` set, but Firefox currently doesn't support the setting right now. [0]
Are you able to try it in Chromium? I set the property on the canvas to `-moz-crisp-edges` in Nightly and that fixed it.
[0] https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering https://developer.mozilla.org/en-US/docs/Web/CSS/image-rende...
- TeMPOraL 9y agoOh. Didn't even occur to me that it could be a browser issue (after all, I would think that not antialiasing things in an API meant for per-pixel operations would be the default). Alas, you're right and guessed correctly - I tested it on Firefox. I just tried it on Chrome, and there the pixels show correctly.
- danbolt 9y agoYeah, I've made pixelated-looking games for browsers before, and setting the extra CSS property is something I frequently forget to do!