Alex4co Posted August 7, 2018 Share Posted August 7, 2018 const APP = new PIXI.Application({width: 1920, height: 1080, antialias: true, transparent: false, resolution: 1 }); // ... load page, then APP.renderer.roundPixels = true; APP.renderer.view.style.position = "absolute"; APP.renderer.view.style.display = "block"; APP.renderer.autoDensity = true; APP.renderer.resize(window.innerWidth, window.innerHeight); //... load textures, then let loaderSprite = new Sprite(RESOURCES.preloader.texture); Hi all. On desktop after window resizing - all resources are smooth - it's good. But in mobile, ios for example is VERY VERY crisp. What i can do wrong ? (resize methods below) window.addEventListener("resize" , onResize); function onResize() { let ratio = Math.min(window.innerWidth / MAX_W, window.innerHeight / MAX_H); APP.stage.scale.set(ratio); APP.stage.width = Math.floor(APP.stage.width); APP.stage.height = Math.floor(APP.stage.height); APP.stage.x = Math.floor(window.innerWidth / 2 - APP.stage.width / 2); APP.stage.y = Math.floor(window.innerHeight / 2 - APP.stage.height / 2); APP.renderer.resize(window.innerWidth, window.innerHeight); } Thanks! 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.