Skip to content

Roughness words

ADR 0007 (docs/decisions/0007-rufol-brand.md) names three roughness levels so the product teaches its name. ROUGHNESS_WORDS maps each Roughness key to its label and numeric value. Rúfol is the default, DEFAULT_ROUGHNESS. @draw/shapes keeps roughness: number, and the words belong to the UI.

docs/examples/roughness.ts
import { DEFAULT_ROUGHNESS, ROUGHNESS_WORDS, Roughness } from "@draw/brand";
import type { RoughnessWord } from "@draw/brand";
export const slider: readonly RoughnessWord[] = [
Roughness.clear,
Roughness.rufol,
Roughness.storm,
].map((key) => ROUGHNESS_WORDS[key]);
export const initial: number = ROUGHNESS_WORDS[DEFAULT_ROUGHNESS].value;