rcooper383 Posted February 15, 2016 Share Posted February 15, 2016 Does phaser support swapping out sprites based on pixel density? I have folders for 1X, 2X, 3X, etc and I want to preload all of the assets in that folder based on pixel density. I then want to apply a global scale so that every thing in the app is scaled correctly. I also want to design my game using a resolution of 320x480 and have all the coordinates scale as well. I've tried using USER_SCALE but it does not appear to do anything. Link to comment Share on other sites More sharing options...
Zeterain Posted February 16, 2016 Share Posted February 16, 2016 Device.pixelRatio will tell you the pixel density of the current device's screen. From there you can load the appropriate image. Phaser won't do this automatically, though, so you'll have to do the detection yourself and decide what images to load. http://phaser.io/docs/2.4.4/Phaser.Device.html#pixelRatio game.device.pixelRatio Link to comment Share on other sites More sharing options...
Recommended Posts