Selaa lähdekoodia

PerspectiveCamera: Simplified clone().

Mr.doob 11 vuotta sitten
vanhempi
commit
ca472876e6
1 muutettua tiedostoa jossa 1 lisäystä ja 10 poistoa
  1. 1 10
      src/cameras/PerspectiveCamera.js

+ 1 - 10
src/cameras/PerspectiveCamera.js

@@ -119,14 +119,5 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
 
 THREE.PerspectiveCamera.prototype.clone = function () {
 
-	var camera = new THREE.PerspectiveCamera();
-
-	THREE.Camera.prototype.clone.call( this, camera );
-
-	camera.fov = this.fov;
-	camera.aspect = this.aspect;
-	camera.near = this.near;
-	camera.far = this.far;
-
-	return camera;
+	return new THREE.PerspectiveCamera( this.fov, this.aspect, this.near, this.far );
 };