From d7eeef6901ea89aa4e6f879653c6ac6eca42eec1 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Tue, 27 Oct 2015 20:51:59 -0400 Subject: [PATCH] max zoom limit --- dependencies/OrbitControls.js | 2 +- js/three/ThreeModel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies/OrbitControls.js b/dependencies/OrbitControls.js index 224e0457..24f82d57 100644 --- a/dependencies/OrbitControls.js +++ b/dependencies/OrbitControls.js @@ -45,7 +45,7 @@ THREE.OrbitControls = function ( object, domElement ) { // Limits to how far you can dolly in and out this.minDistance = 0; - this.maxDistance = Infinity; + this.maxDistance = 600; // Set to true to disable this control this.noRotate = false; diff --git a/js/three/ThreeModel.js b/js/three/ThreeModel.js index a5ac8315..6f02654d 100644 --- a/js/three/ThreeModel.js +++ b/js/three/ThreeModel.js @@ -5,7 +5,7 @@ define(['underscore', 'three'], function(_, THREE){ - var camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 0.01, 5000); + var camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 0.01, 1000); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer({antialias:true});//antialiasing is not supported in ff and on mac+chrome -- GitLab