Spaces:
Running
Running
Update interface.js
Browse files- interface.js +1 -8
interface.js
CHANGED
|
@@ -82,14 +82,7 @@ const currentScriptTag = document.currentScript;
|
|
| 82 |
const colorPanelId = `color-panel-${instanceId}`;
|
| 83 |
|
| 84 |
// Color choices: add more as needed
|
| 85 |
-
const colorChoices = [
|
| 86 |
-
{ title: "Blanc", color: [1, 1, 1], emit: [1, 1, 1], boolTrans: 1, swatch: "#fff" },
|
| 87 |
-
{ title: "Rouge", color: [0.7, 0.05, 0.05], emit: [0.372, 0.07, 0.003], boolTrans: 0, swatch: "#d00" },
|
| 88 |
-
//{ title: "Vert", color: [0, 1, 0.07], emit: [0, 0.7, 0.05], swatch: "#18c560" },
|
| 89 |
-
{ title: "Rose", color: [1, 0.15, 0.11], emit: [0.8, 0.40, 0.79], boolTrans: 0, swatch: "#E49CCFFF"},
|
| 90 |
-
{ title: "RoseTrans", color: [1, 0.15, 0.11], emit: [0.99, 0.65, 0.89], boolTrans: 1, swatch: "#E50CCFF1"}
|
| 91 |
-
// Add more: { title: "...", color: [r, g, b], swatch: "#hex" }
|
| 92 |
-
];
|
| 93 |
|
| 94 |
// Generate color swatch HTML
|
| 95 |
const colorPanelHTML = `
|
|
|
|
| 82 |
const colorPanelId = `color-panel-${instanceId}`;
|
| 83 |
|
| 84 |
// Color choices: add more as needed
|
| 85 |
+
const colorChoices = Array.isArray(config.colorChoices) ? config.colorChoices : [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
// Generate color swatch HTML
|
| 88 |
const colorPanelHTML = `
|