Browse Source

bug-gltfloader-ortho-camera

Don McCurdy 5 years ago
parent
commit
3b1ff01aa4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      examples/js/loaders/GLTFLoader.js
  2. 1 1
      examples/jsm/loaders/GLTFLoader.js

+ 1 - 1
examples/js/loaders/GLTFLoader.js

@@ -2744,7 +2744,7 @@ THREE.GLTFLoader = ( function () {
 
 
 		} else if ( cameraDef.type === 'orthographic' ) {
 		} else if ( cameraDef.type === 'orthographic' ) {
 
 
-			camera = new THREE.OrthographicCamera( params.xmag / - 2, params.xmag / 2, params.ymag / 2, params.ymag / - 2, params.znear, params.zfar );
+			camera = new THREE.OrthographicCamera( - 1 * params.xmag, params.xmag, params.ymag, - 1 * params.ymag, params.znear, params.zfar );
 
 
 		}
 		}
 
 

+ 1 - 1
examples/jsm/loaders/GLTFLoader.js

@@ -2808,7 +2808,7 @@ var GLTFLoader = ( function () {
 
 
 		} else if ( cameraDef.type === 'orthographic' ) {
 		} else if ( cameraDef.type === 'orthographic' ) {
 
 
-			camera = new OrthographicCamera( params.xmag / - 2, params.xmag / 2, params.ymag / 2, params.ymag / - 2, params.znear, params.zfar );
+			camera = new OrthographicCamera( - 1 * params.xmag, params.xmag, params.ymag, - 1 * params.ymag, params.znear, params.zfar );
 
 
 		}
 		}