Kaynağa Gözat

Upgrade dat.gui to 0.7.7.

Mugen87 5 yıl önce
ebeveyn
işleme
f5d10bc88c
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      examples/jsm/libs/dat.gui.module.js

+ 3 - 2
examples/jsm/libs/dat.gui.module.js

@@ -285,7 +285,7 @@ var Common = {
 	},
 	isFunction: function isFunction( obj ) {
 
-		return Object.prototype.toString.call( obj ) === '[object Function]';
+		return obj instanceof Function;
 
 	}
 };
@@ -959,9 +959,10 @@ Object.defineProperty( Color.prototype, 'a', {
 Object.defineProperty( Color.prototype, 'hex', {
 	get: function get$$1() {
 
-		if ( ! this.__state.space !== 'HEX' ) {
+		if ( this.__state.space !== 'HEX' ) {
 
 			this.__state.hex = ColorMath.rgb_to_hex( this.r, this.g, this.b );
+			this.__state.space = 'HEX';
 
 		}
 		return this.__state.hex;