Siddi Posted March 23, 2017 Share Posted March 23, 2017 Hi, I have a question about the resolution in PIXI.js: If I create a PIXI.Graphic object (for example a rectangle) with the size 50 pixels by 50 pixels, this rectangle will be the same size on my desktop machine (devicePixelRatio 1) as a 50 pixel by 50 pixel div element. When I look at the same page with an iPad Air 2 (devicePixelRatio 2), the rectangle drawn with PIXI is twice the size of the div element. In my opinion, on the iPad, both elements should be equally large, right? I have created a CodePen: http://codepen.io/fresh5/pen/jBxNjO Thanks for your support! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 23, 2017 Share Posted March 23, 2017 Yes, you are right. The problem is that application does not modify CSS of canvas element, you can either do it yourself, either you ask PIXI, add "autoResize: true" into the options. Siddi 1 Quote Link to comment Share on other sites More sharing options...
Siddi Posted March 23, 2017 Author Share Posted March 23, 2017 Perfect, thank you!!! ivan.popelyshev 1 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.