Explorar o código

add Color.equals.

Ben Houston %!s(int64=12) %!d(string=hai) anos
pai
achega
49fe06f657
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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 );