These are chat archives for pixijs/pixi.js

4th
Sep 2018
schoening
@schoening
Sep 04 2018 13:10
Wow what a mistake to make.. Interaction Events didnt work. Why? Coz I had a div overlay on top of my canvas facepalm
Ivan Popelyshev
@ivanpopelyshev
Sep 04 2018 13:12
@gapipro maybe graphics drivers are outdated on that computer :)
gapipro
@gapipro
Sep 04 2018 17:03
I think I found the main issue: PC has max resolution of 1280x 720, and pixi is/was running at 2560 x 1440
just too many pixels to render =)
question now would be: whats the best way to quickly do some sort of performance benchmark to determine when to downscale size of canvas.
there is a simple check of resolution, but there are still users with 27" screens and prehistoric graphics
Ivan Popelyshev
@ivanpopelyshev
Sep 04 2018 19:06
no way
you have access only to innerWidth, innerHeight and devicePixelRatio
its better to give user a button to switch resoluitons
and reload the page
gapipro
@gapipro
Sep 04 2018 20:11
so there isn't a proper way of reinitting pixi app with different width/height?
Ivan Popelyshev
@ivanpopelyshev
Sep 04 2018 20:24
renderer resize
but if you change "resolution" param it will be a problem
also pixi doesnt care where do you copy width/height props and wont track them :)
also loader doesnt have "reload all resources with different resolution" option
i dont know if you understand it right now, it takes time to understand
try just "renderer.resize" and see if your app works fine
Sam Stonehouse
@SamStonehouse
Sep 04 2018 22:20
If I update a textures base texture, I've noticed that the frame (and a few other things) don't update to match the new base textures size, but that doesn't seem to matter, the sprites still render fine, is updating the texture.frame something I should be doing?