Mr.doob 10 лет назад
Родитель
Сommit
05ade8feea
1 измененных файлов с 8 добавлено и 0 удалено
  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 );

粤ICP备19079148号