feat(ui): add InputColor and custom theme

This commit is contained in:
2026-02-09 15:26:18 +01:00
parent 2e6466ceca
commit 64d75b9686
10 changed files with 234 additions and 59 deletions

View File

@@ -2,19 +2,19 @@
import { colors } from '../graph/colors.svelte';
const circleMaterial = new MeshBasicMaterial({
color: colors.connection.clone(),
color: colors.outline.clone(),
toneMapped: false
});
let lineColor = $state(colors.connection.clone().convertSRGBToLinear());
let lineColor = $state(colors.outline.clone().convertSRGBToLinear());
$effect.root(() => {
$effect(() => {
if (appSettings.value.theme === undefined) {
return;
}
circleMaterial.color = colors.connection.clone().convertSRGBToLinear();
lineColor = colors.connection.clone().convertSRGBToLinear();
circleMaterial.color = colors.outline.clone().convertSRGBToLinear();
lineColor = colors.outline.clone().convertSRGBToLinear();
});
});