BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
23.11k stars 3.42k forks source link

ScreenSpaceCanvas not resized properly on canvas resize #1937

Closed royibernthal closed 7 years ago

royibernthal commented 7 years ago

When resizing canvas after page load, ScreenSpaceCanvas elements get distorted instead of resizing along with scene. I think it used to work properly at some point. It can't be seen in a PG because it doesn't resize the canvas according to window size, but test on any window with canvas width and height set to % of window (e.g. 100%) and you'll notice it immediately.

ghost commented 7 years ago

In this PG: http://www.babylonjs-playground.com/#22PLQU#0 When the window is resized, the Sprite's position is unstable (DesignMode, should be stable) Also report to @wyklion