diff --git a/README.md b/README.md index cdcd0f74..86575ee3 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ First time you start it up you should also run `yarn prep data` - [ ] XYY is probaably now possible - [ ] Bug: rotate in polar coordinates doesn't work right - [ ] Ad hoc lints seem possible, do a spike +- [ ] Directional subtlies for aligns - [x] Similarly, would like to work through the various options for the examples. Delete, Edit, Hide (not Mute) seem good. If you're going to Hide, then ideally you provide a selective unhide (dropdown of names is the easiest) as well as the unhide all. Your Solo means "hide everything else" which I'm not convinced is worth a button. However, a "full screen" or "fit width" "fit height" options that scales it up and reduces the rest to thumbnails might be cool. And I'm sure there are a few more we'll discover as we work with it. - [x] Albers color theory games style examples diff --git a/src/content-modules/contextual-tools/DistributePoints.svelte b/src/content-modules/contextual-tools/DistributePoints.svelte index f2b8c89a..c8924e55 100644 --- a/src/content-modules/contextual-tools/DistributePoints.svelte +++ b/src/content-modules/contextual-tools/DistributePoints.svelte @@ -2,12 +2,13 @@ import { Color, colorPickerConfig } from "../../lib/Color"; import colorStore from "../../stores/color-store"; import focusStore from "../../stores/focus-store"; - import { buttonStyle, buttonStyleDisabled } from "../../lib/styles"; + import { buttonStyle } from "../../lib/styles"; $: colors = $colorStore.currentPal.colors; $: focusedColors = $focusStore.focusedColors; $: colorSpace = $colorStore.currentPal.colorSpace; $: config = colorPickerConfig[colorSpace]; + $: zName = colorPickerConfig[colorSpace].zChannel; type Direction = "horizontal" | "vertical" | "in z space"; function distributePoints(direction: Direction) { @@ -33,10 +34,10 @@ const zIdx = config.zChannelIndex; if (direction === "horizontal") { newPoint[xIdx] = minPoint[xIdx] * (1 - t) + maxPoint[xIdx] * t; - } else if (direction === "in z space") { - newPoint[zIdx] = minPoint[zIdx] * (1 - t) + maxPoint[zIdx] * t; - } else { + } else if (direction === "vertical") { newPoint[yIdx] = minPoint[yIdx] * (1 - t) + maxPoint[yIdx] * t; + } else { + newPoint[zIdx] = minPoint[zIdx] * (1 - t) + maxPoint[zIdx] * t; } return newPoint as Channels; }); @@ -51,7 +52,11 @@ colorStore.setCurrentPalColors(newColors); } - const directions: Direction[] = ["horizontal", "vertical", "in z space"]; + $: directions = [ + "horizontal", + "vertical", + `in ${zName} space`, + ] as Direction[]; {#if focusedColors.length > 2} @@ -60,7 +65,7 @@
{#each directions as direction} {/each}