feat(tools): add brush controls

This commit is contained in:
syntaxbullet
2026-07-03 17:49:00 +02:00
parent e75f8bc0a7
commit 64aebbe23a
12 changed files with 139 additions and 19 deletions

View File

@@ -6,14 +6,22 @@ export type InteractionMode =
| { type: "tool"; tool: ToolId }
| { type: "temporary-pan"; previousTool: ToolId };
export type BrushSettings = {
color: string;
size: number;
hardness: number;
};
export type ToolState = {
activeTool: ToolId;
interactionMode: InteractionMode;
brush: BrushSettings;
};
export const initialToolState: ToolState = {
activeTool: "select",
interactionMode: { type: "tool", tool: "select" },
brush: { color: "#111827", size: 8, hardness: 100 },
};
export function isPanInteractionMode(interactionMode: InteractionMode): boolean {