tips4design Posted March 13, 2014 Share Posted March 13, 2014 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 tips4design 1 Quote Link to comment Share on other sites More sharing options...
xdiepx Posted March 23, 2014 Share Posted March 23, 2014 http://www.html5gamedevs.com/topic/3108-resize-screen-in-pixel-art-pixijs/ I think that thread should help you. Quote Link to comment Share on other sites More sharing options...
nikolayku Posted March 24, 2014 Share Posted March 24, 2014 HiProbably this can help 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.