diff --git a/globe/globe.js b/globe/globe.js index 806e5697..f54c3a2c 100644 --- a/globe/globe.js +++ b/globe/globe.js @@ -334,9 +334,9 @@ DAT.Globe = function(container, opts) { } function onWindowResize( event ) { - camera.aspect = container.offsetWidth / container.offsetHeight; + camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); - renderer.setSize( container.offsetWidth, container.offsetHeight ); + renderer.setSize( window.innerWidth, window.innerHeight ); } function zoom(delta) {