Jump to content

Scaling Sprites changes Resolution


mderryberry
 Share

Recommended Posts

Hi,

I just started working with Pixi.js and am trying to scale down sprites without losing the resolution. For example, if I have an image of size 72x72 and apply a scale to it such as:

 

var texture = PIXI.Texture.fromImage("image.png");

var sprite = new PIXI.Sprite(texture);

sprite.scale.x = 0.1;

sprite.scale.x = 0.1;

 

This scales the size down nicely, however the image becomes extremely blurry. Is there a way to fix this? I have tried using PIXI.SCALE_MODES.NEAREST but it produces the same effect

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...