From 006516e488c7d03cb1060ee3ae2361a31d132eea Mon Sep 17 00:00:00 2001 From: Roberto Metere Date: Thu, 18 Jun 2020 08:45:07 +0100 Subject: [PATCH] credits to csavage1994 from a pull request #55 devaart --- globe/globe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/globe/globe.js b/globe/globe.js index 82fc7623..d3e79580 100644 --- a/globe/globe.js +++ b/globe/globe.js @@ -563,9 +563,9 @@ DAT.Globe = function(container, opts) { function onWindowResize( event ) { // if (pinchZoomEnabled) { - 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 ); // } }