Browse Source

PerspectiveCamera: Deprecated .setLens -> Legacy.

tschw 9 years ago
parent
commit
3eff6a5659
2 changed files with 12 additions and 15 deletions
  1. 12 0
      src/Three.Legacy.js
  2. 0 15
      src/cameras/PerspectiveCamera.js

+ 12 - 0
src/Three.Legacy.js

@@ -251,6 +251,18 @@ Object.defineProperties( THREE.Object3D.prototype, {
 
 
 //
 //
 
 
+THREE.PerspectiveCamera.prototype.setLens = function( focalLength, filmGauge ) {
+
+	console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
+			"Use .setFocalLength and .filmGauge for a photographic setup." );
+
+	if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
+	this.setFocalLength( focalLength );
+
+};
+
+//
+
 Object.defineProperties( THREE, {
 Object.defineProperties( THREE, {
 	PointCloud: {
 	PointCloud: {
 		value: function ( geometry, material ) {
 		value: function ( geometry, material ) {

+ 0 - 15
src/cameras/PerspectiveCamera.js

@@ -53,21 +53,6 @@ THREE.PerspectiveCamera.prototype = Object.assign( Object.create( THREE.Camera.p
 
 
 	},
 	},
 
 
-	/**
-	 * Sets the FOV by focal length (DEPRECATED).
-	 *
-	 * Optionally also sets .filmGauge, otherwise uses it. See .setFocalLength.
-	 */
-	setLens: function ( focalLength, filmGauge ) {
-
-		console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
-				"Use .setFocalLength and .filmGauge for a photographic setup." );
-
-		if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
-		this.setFocalLength( focalLength );
-
-	},
-
 	/**
 	/**
 	 * Sets the FOV by focal length in respect to the current .filmGauge.
 	 * Sets the FOV by focal length in respect to the current .filmGauge.
 	 *
 	 *