Jump to content

having issue rotating pixel art


ariyan
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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;	  }
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...