Jump to content

Scale PIxij.js


tips4design
 Share

Recommended Posts

I have just started with Pixi.js and I really couldn't find anything about canvas scaling.

 

Now I am simply using CSS scaling, but the quality is not good enough.

 

Before this I was using Processing.js and I there I could simply use the ctx.scale() function (and it worked perfectly because I was actually drawing SVG images).

 

What is the best practice to scale a Pixi.js game?

Can I still use SVGs? I tried using them but in WebGL some textures were being drawn twice or in wrong positions (in CanvasRenderer they worked fine), so I switched to PNG sprites.

 

Now, if I manage to somewhat scale the game how will be the images scaled? Can I for example save multiple resolution sprites and let Pixi choose the right one? Or can I use the SVG images, draw them separate canvases at the resolution I need and then create TextureFromCanvas?

 

Waiting for replies from some of the more experienced users :)

Link to comment
Share on other sites

  • 2 weeks later...

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