ariyan Posted December 13, 2014 Share Posted December 13, 2014 hi we are trying to create pixel art with canvas , and we having issue rotating our sprite or scaling it in size of 1.5 .it doesn't smooth it , but it re-position pixels and ruins the sprite . is there a way to fix this ?i believe there is a certain type of smoothing in unity3d that keeps pixels positioning and you can scale image in any size and rotate it . is there way to do this in html5? Quote Link to comment Share on other sites More sharing options...
Donk Posted December 17, 2014 Share Posted December 17, 2014 I ran into the same issue a long time ago, I found this in my old source files. This is the styling I used for the canvas element in my markup. Hope this help. canvas{ outline:0; border:1px solid #000; margin-left: auto; margin-right: auto; image-rendering: optimizeSpeed; image-rendering: -moz-crisp-edges; image-rendering: -webkit-optimize-contrast; image-rendering: optimize-contrast; -ms-interpolation-mode: nearest-neighbor; border: 5px solid #ddd; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.