From 5cab376c947572d5734ff4545a2cc2757a6400a8 Mon Sep 17 00:00:00 2001 From: Robert Kolner Date: Wed, 28 May 2014 21:26:25 +0200 Subject: [PATCH] Size. --- index.html | 1 - index.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 );