mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Just make hex work too here
[LGTM](450a6bfa93/files/examples/jsm/libs/dat.gui.module.js (x3162d59f298337c1)
:1)
This commit is contained in:
parent
c2edd82e39
commit
743a16b398
@ -136,8 +136,9 @@ Object.defineProperty(Color.prototype, 'a', {
|
|||||||
|
|
||||||
Object.defineProperty(Color.prototype, 'hex', {
|
Object.defineProperty(Color.prototype, 'hex', {
|
||||||
get: function() {
|
get: function() {
|
||||||
if (!this.__state.space !== 'HEX') {
|
if (this.__state.space !== 'HEX') {
|
||||||
this.__state.hex = math.rgb_to_hex(this.r, this.g, this.b);
|
this.__state.hex = math.rgb_to_hex(this.r, this.g, this.b);
|
||||||
|
this.__state.space = 'HEX';
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.__state.hex;
|
return this.__state.hex;
|
||||||
|
Loading…
Reference in New Issue
Block a user