Browse Source

add Color.equals.

Ben Houston 12 years ago
parent
commit
49fe06f657
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/math/Color.js

+ 6 - 0
src/math/Color.js

@@ -351,6 +351,12 @@ THREE.extend( THREE.Color.prototype, {
 
 	},
 
+	equals: function ( c ) {
+
+		return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );
+
+	},
+
 	clone: function () {
 
 		return new THREE.Color().setRGB( this.r, this.g, this.b );