Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

PIXI.Texture.fromImage doesn't apply sourceScale


freddyInKorea
 Share

Recommended Posts

Hello guys,

I realize that my sprites were beautiful when I zoom in and quite ugly when I zoom out,

so I decided to define two sprites to keep a good quality in zoom out or in:

this._zoomOut[name] = new PIXI.Sprite(PIXI.Texture.fromImage(name,undefined,undefined,0.5));
this._zoomIn[name] = new PIXI.Sprite(PIXI.Texture.fromImage(name,undefined,undefined,1));

when I use this two lines of code separately it works well. But when I use both of them, the second call doesn't apply the 4th parameter "sourceScale". It means this._zoomIn[name] receives a sprite from a texture with 0.5 of sourceScale too. That's super weird, are there any cache to clear?

zoom in.png

zoom out.png

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