feat(tools): add brush controls
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user