Browse Source

Color: Added setScalar.

Mr.doob 9 years ago
parent
commit
05ade8feea
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/math/Color.js

+ 8 - 0
src/math/Color.js

@@ -40,6 +40,14 @@ THREE.Color.prototype = {
 
 	},
 
+	setScalar: function ( scalar ) {
+
+		this.r = scalar;
+		this.g = scalar;
+		this.b = scalar;
+
+	},
+
 	setHex: function ( hex ) {
 
 		hex = Math.floor( hex );