Bläddra i källkod

Color: Clean up.

Mr.doob 9 år sedan
förälder
incheckning
db2d026561
1 ändrade filer med 10 tillägg och 10 borttagningar
  1. 10 10
      src/math/Color.js

+ 10 - 10
src/math/Color.js

@@ -381,16 +381,6 @@ THREE.Color.prototype = {
 
 	},
 
-	sub: function( color ) {
-
-		this.r = Math.max( 0, this.r - color.r );
-		this.g = Math.max( 0, this.g - color.g );
-		this.b = Math.max( 0, this.b - color.b );
-
-		return this;
-
-	},
-
 	add: function ( color ) {
 
 		this.r += color.r;
@@ -421,6 +411,16 @@ THREE.Color.prototype = {
 
 	},
 
+	sub: function( color ) {
+
+		this.r = Math.max( 0, this.r - color.r );
+		this.g = Math.max( 0, this.g - color.g );
+		this.b = Math.max( 0, this.b - color.b );
+
+		return this;
+
+	},
+
 	multiply: function ( color ) {
 
 		this.r *= color.r;