Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing a Scene & Its Elements: Best methods? #65

Open
kburke3 opened this issue Dec 5, 2017 · 0 comments
Open

Resizing a Scene & Its Elements: Best methods? #65

kburke3 opened this issue Dec 5, 2017 · 0 comments

Comments

@kburke3
Copy link

kburke3 commented Dec 5, 2017

Hello!
What would be the best way to resize a Pixi Animate scene with a window resize event? I see that PIXI.animate.Scene has width and height properties. Would this be the same values as in the scene.renderer? This was the way I saw many people resizing Pixi:

window.onresize = function (event)
{
    var w = window.innerWidth;
    var h = window.innerHeight;
    scene.renderer.view.style.width = w + "px";
    scene.renderer.view.style.height = h + "px";
}

Also, I'm not sure how to go about resizing the contents of my scene so they match the new dimensions. Any tips would be wonderful. Thank you.

@kburke3 kburke3 changed the title Resizing a Scene & its elements: Best methods? Resizing a Scene & Its Elements: Best methods? Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant