dataarts / webgl-globe

WebGL Globe is a platform for visualizing latitude longitude based information using WebGL.
https://experiments.withgoogle.com/chrome/globe
Other
3.61k stars 1.16k forks source link

closes #54 - Issue with globe disappearing on window resize #55

Open csavage1994 opened 8 years ago

csavage1994 commented 8 years ago

In the master branch of this repo, any time the window is resized the globe will disappear. The issue persisted across Chrome and Safari. There was a PR that was merged which caused this problem, so the changes I made were to revert the faulty code.

mrdoob commented 8 years ago

How about copying what's done in init()?

w = container.offsetWidth || window.innerWidth;
h = container.offsetHeight || window.innerHeight;

camera.aspect = w / h;
camera.updateProjectionMatrix();
renderer.setSize( w, h );
geekkid1 commented 6 years ago

Hmm... Still hangs on loading.gif when I resize the window with these changes.