diff --git a/index.html b/index.html index 8118605..ace6fed 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,6 @@ -
diff --git a/index.js b/index.js index af54000..9855af5 100644 --- a/index.js +++ b/index.js @@ -3,8 +3,9 @@ var scene = new THREE.Scene(); //var sceneWidth = 1000; //var sceneHeight = 1000; -var sceneWidth = window.innerWidth; -var sceneHeight = window.innerHeight; +var smallestSize = Math.min(window.innerWidth, window.innerHeight); +var sceneWidth = smallestSize; +var sceneHeight = smallestSize; var camera = new THREE.PerspectiveCamera( 75, sceneHeight / sceneWidth, 0.1, 2500 );