Daniel Parokonnyy Posted March 7, 2018 Share Posted March 7, 2018 Good evening! I am creating web-game using pixi js. I have got blury sprites, shapes, text - everything. How can i fix it? I have macbook pro 2015. I think maybe physical and vitual pixels not assigned properly, feeling like 1 vitual pixel of pixi = 4 or 9 physical pixels. I tried set resolution to 2, 3, but it didn`t solve the problem. How can i fix it? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 7, 2018 Share Posted March 7, 2018 new PIXI.WebGLRenderer(800, 600, {resolution:2, autoResize:true}); autoResize means that pixi will set CSS dimensions to 800x600, while real canvas dimensions will be 1600x1200. You can do that manually: https://github.com/pixijs/pixi.js/blob/dev/src/core/renderers/SystemRenderer.js#L225 All coordinates should be calculated using "renderer.screen" which are CSS coords (0,0,800,600). Also make sure you understand how Application works. Its mashup class that supposed to be overriden in your game: https://github.com/pixijs/pixi.js/blob/dev/src/core/Application.js Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted March 8, 2018 Share Posted March 8, 2018 Hi @Daniel Parokonnyy - I honestly recommend using the Panda 2 engine. It has 'retina' and multi asset support @2x, @4x etc. It's a brilliant engine, that will make everything easier for you! http://panda2.io/ Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 8, 2018 Share Posted March 8, 2018 Yes, Panda is one of ways for multi-asset support if you dont want to implement your own. My https://github.com/pixijs/pixi-compressed-textures also has it. Quote Link to comment Share on other sites More sharing options...
Daniel Parokonnyy Posted March 8, 2018 Author Share Posted March 8, 2018 I solved problem! Thanks a lot! Quote Link to comment Share on other sites More sharing options...
botmaster Posted March 8, 2018 Share Posted March 8, 2018 I modified my asset manager (originally for as3 projects) to work with typescript/PIXI and provide different resolution and coordinates for my assets, it's not a public app since not many people are interested in that kinda app but that's one easy way to manage those problems. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 9, 2018 Share Posted March 9, 2018 Join Pixi Retina Club. Daniel Parokonnyy 1 Quote Link to comment Share on other sites More sharing options...
Daniel Parokonnyy Posted March 13, 2018 Author Share Posted March 13, 2018 ??? 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.