davidfig / pixi-viewport

A highly configurable viewport/2D camera designed to work with pixi.js
https://davidfig.github.io/pixi-viewport/
MIT License
1.04k stars 174 forks source link

Resizing viewport (child element) #86

Closed uahic closed 5 years ago

uahic commented 5 years ago

Hello!

currently I am playing around with the features of the viewport (and pixi of course) and trying to fit the canvas-wrapping div element into some parent container (angular material side nav content).

When using viewport.resize(...) it seems to work internally for the viewport but the actual canvas element keeps its initial size. Am I supposed to rescale this manually (I guess that screws up assumptions made by the viewport and/or pixi) or does the PIXI application object to handle this?

Thank you very much

uahic commented 5 years ago

Argh, ok the live demo shows the solution already, whups sorry :)