hexi
hexi copied to clipboard
How to resize the canvas after a scene is over?
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.
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?