I am working on a small project in Javascript using Pixi.js as a rendering engine. However, I found several methods for scaling the canvas in a full window, which seems to work best for the current version. However, he has a caution as he creates mailboxes on the sides based on orientation.
Is it possible to avoid a mailbox with Pixi at all?

This is the code that I still have, as it relates to scaling:
var application = null; var GAME_WIDTH = 1060; var GAME_HEIGHT = 840; var ratio = 0; var stage = null; application = new PIXI.Application( { width: GAME_WIDTH, height: GAME_HEIGHT, backgroundColor: 0x00b4f7, view: document.getElementById("gwin") }); stage = new PIXI.Container(true); window.addEventListener("resize", rescaleClient); function rescaleClient() { ratio = Math.min(window.innerWidth / GAME_WIDTH, window.innerHeight / GAME_HEIGHT); stage.scale.x = stage.scale.y = ratio; application.renderer.resize(Math.ceil(GAME_WIDTH * ratio), Math.ceil(GAME_HEIGHT * ratio)); }
My goal is to achieve a similar full screen / window effect for Agar.io/Slither.io, however I have not found a satisfactory method that makes it easy. There seem to be examples that use Pixi to accomplish this, but the code is more often covered by the source, and they seem to use external tools like Ionic and Phonegap.
source share