MikaFil commited on
Commit
4fbbd97
·
verified ·
1 Parent(s): f97559f

Update interface.js

Browse files
Files changed (1) hide show
  1. interface.js +7 -4
interface.js CHANGED
@@ -83,10 +83,11 @@ const currentScriptTag = document.currentScript;
83
 
84
  // Color choices: add more as needed
85
  const colorChoices = [
86
- { title: "Blanc", color: [1, 1, 1], emit: [1, 1, 1], opacity: 0.9, swatch: "#fff" },
87
- { title: "Rouge", color: [0.7, 0.05, 0.05], emit: [0.372, 0.07, 0.003], opacity: 0.9, swatch: "#d00" },
88
  { title: "Vert", color: [0, 1, 0.07], emit: [0, 0.7, 0.05], opacity: 0.9, swatch: "#18c560" },
89
- { title: "Rose", color: [1, 0.15, 0.108], emit: [0.991112, 0.45, 0.891], opacity: 0.9, swatch: "#E49CCFFF"}
 
90
  // Add more: { title: "...", color: [r, g, b], swatch: "#hex" }
91
  ];
92
 
@@ -100,6 +101,7 @@ const currentScriptTag = document.currentScript;
100
  data-dr="${c.color[0]}" data-dg="${c.color[1]}" data-db="${c.color[2]}"
101
  data-er="${c.emit[0]}" data-eg="${c.emit[1]}" data-eb="${c.emit[2]}"
102
  data-a ="${c.opacity}"
 
103
  aria-label="${c.title}"
104
  title="${c.title}"
105
  tabindex="0"
@@ -462,7 +464,8 @@ const currentScriptTag = document.currentScript;
462
  const er = parseFloat(btn.getAttribute('data-er'));
463
  const eg = parseFloat(btn.getAttribute('data-eg'));
464
  const eb = parseFloat(btn.getAttribute('data-eb'));
465
- viewerModule.changeColor(dr, dg, db, a, er, eg, eb);
 
466
  }
467
  closeColorPanel();
468
  });
 
83
 
84
  // Color choices: add more as needed
85
  const colorChoices = [
86
+ { title: "Blanc", color: [1, 1, 1], emit: [1, 1, 1], opacity: 0.9, boolTrans: 0, swatch: "#fff" },
87
+ { title: "Rouge", color: [0.7, 0.05, 0.05], emit: [0.372, 0.07, 0.003], opacity: 0.9, boolTrans: 0, swatch: "#d00" },
88
  { title: "Vert", color: [0, 1, 0.07], emit: [0, 0.7, 0.05], opacity: 0.9, swatch: "#18c560" },
89
+ { title: "Rose", color: [1, 0.15, 0.108], emit: [0.991112, 0.45, 0.891], opacity: 0.9, boolTrans: 0, swatch: "#E49CCFFF"},
90
+ { title: "Rose", color: [1, 0.15, 0.108], emit: [0.991112, 0.45, 0.891], opacity: 0.9, boolTrans: 1, swatch: "#E49CCFFF"}
91
  // Add more: { title: "...", color: [r, g, b], swatch: "#hex" }
92
  ];
93
 
 
101
  data-dr="${c.color[0]}" data-dg="${c.color[1]}" data-db="${c.color[2]}"
102
  data-er="${c.emit[0]}" data-eg="${c.emit[1]}" data-eb="${c.emit[2]}"
103
  data-a ="${c.opacity}"
104
+ data-boolTrans="${c.boolTrans}"
105
  aria-label="${c.title}"
106
  title="${c.title}"
107
  tabindex="0"
 
464
  const er = parseFloat(btn.getAttribute('data-er'));
465
  const eg = parseFloat(btn.getAttribute('data-eg'));
466
  const eb = parseFloat(btn.getAttribute('data-eb'));
467
+ const bt = parseFloat(btn.getAttribute('data-boolTrans'))
468
+ viewerModule.changeColor(dr, dg, db, a, er, eg, eb, bt);
469
  }
470
  closeColorPanel();
471
  });