浏览代码

add Color.equals.

Ben Houston 12 年之前
父节点
当前提交
49fe06f657
共有 1 个文件被更改,包括 6 次插入0 次删除
  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 );