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

How to resize the canvas after a scene is over? #55

Open
Mrkd007 opened this issue Dec 11, 2017 · 1 comment
Open

How to resize the canvas after a scene is over? #55

Mrkd007 opened this issue Dec 11, 2017 · 1 comment

Comments

@Mrkd007
Copy link

Mrkd007 commented Dec 11, 2017

I tried changing the width but unfortunately, the extra width becomes black in color. so please help me out to resolve this as soon as possible.

@JamesCraster
Copy link

JamesCraster commented Feb 14, 2018

What do you mean by a scene?
I've run into this problem, and I think I have a solution:

//In order to double the size of a 400x300 canvas after initialization:
g.stage.scale.x = 2;
g.stage.scale.y = 2,
g.renderer.resize(800, 600);

Stuff may look blurry as it has been scaled up, so for pixel art games you'll need to set
PIXI.SCALE_MODES.DEFAULT = PIXI.SCALE_MODES.NEAREST to maintain crispness.

Does this fix your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants