ikkleh Posted December 18, 2017 Share Posted December 18, 2017 Hi all, Has anyone had any success in converting Window coordinate space to Pixi Stage space? For example, if I wanted to have a Sprite that regardless of how wide the window is in relation to the Stage, it would always be at the edge of the window? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 18, 2017 Share Posted December 18, 2017 After you create renderer or resize it, "renderer.screen" corresponds to current screen space in CSS pixels. Here we think that 1 stage pixel = 1 css pixel, there are no transforms through CSS (width=100% or such). You can update elements coords every tick or every resize using "renderer.screen" instead of "window.innerWidth, window.innerHeight". 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.