Преглед на файлове

Simplified Plane constructor.

Mr.doob преди 12 години
родител
ревизия
8b97c343ba
променени са 1 файла, в които са добавени 2 реда и са изтрити 11 реда
  1. 2 11
      src/math/Plane.js

+ 2 - 11
src/math/Plane.js

@@ -4,17 +4,8 @@
 
 THREE.Plane = function ( normal, constant ) {
 
-	if ( normal === undefined && constant === undefined ) {
-
-		this.normal = new THREE.Vector3();
-		this.constant = 0;
-
-	} else {
-
-		this.normal = normal.clone();
-		this.constant = constant || 0;
-
-	}
+	this.normal = normal !== undefined ? normal.clone() : new THREE.Vector3();
+	this.constant = constant !== undefined ? constant : 0;
 
 };