DennisMMann

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. I updated the article with HTML and CSS. It should be more complete now. I also added a GitHub repo with a working example.
  2. I wrote an article on this. Thoughts welcome! https://medium.com/@michelfariarj/scale-a-pixi-js-game-to-fit-the-screen-1a32f8730e9c
  3. Thanks a lot! "app.stage.scale.set(number)" fixed it for me. I've had a lot of trouble looking for documentation, guides, examples and tutorials on scaling the game to fit the screen. For such a common use case, I was surprised I couldn't find much about it. The only guide that addressed this the closest was HTML5 Game Scaling { William Malone }, but it did not address the blurriness issue. I may contribute with a tutorial if needed.
  4. Hello, How to scale the Pixi.js view without making the game blurry? I have tried resizing the view with CSS using: app.view.style.width = nvw + "px"; app.view.style.height = nvh + "px"; -- where nvw is the new with of the viewport and nvh is the height of the viewport. However, this makes the game blurry. I have tried: Using app.renderer#resize to set the new width and height for the game, but that does not scale the game's contents - only makes the screen bigger. Initialized the PIXI.Application with the antialias option set to false. In my specific situation, what I need is a way to scale the game window to fit in the browser, while keeping aspect ratio and letterboxing if necessary, without blurring the game contents. Any help is appreciated, thank you for your time.