ByronHsu Posted December 9, 2017 Share Posted December 9, 2017 1. How to resize the window at any time when I change my window size. Something weird will occur in my app now like the image below.(the right size should be black) 2. How can I directly access mouse local position without listening to an event. I want to deliver my mouse local position to the server even if the mouse doesn't move at all. Thx a lot!! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 9, 2017 Share Posted December 9, 2017 Its html thingy, "window.onresize = ..." . Please search forums for code, any "resize" in this pixi subforum , like this thread: , just add "window.onresize=coolResize" instead of putting it in app.ticker and it'll be fine. However you can just take that code and use, it will also work. Quote Link to comment Share on other sites More sharing options...
ByronHsu Posted December 10, 2017 Author Share Posted December 10, 2017 nice solution!! but how to solve my 2nd question? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 10, 2017 Share Posted December 10, 2017 'app.renderer.plugins.interaction.mouse.global` . Interaction here is instance of https://github.com/pixijs/pixi.js/blob/dev/src/interaction/InteractionManager.js that is created for every renderer. I hope that'll be changed in v5, because mouse coords after 5 dots is a strange thing. 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.