"use client"; import type { VisualizerControls } from "@/lib/types"; type ControlsPanelProps = { controls: VisualizerControls; onChange: (controls: VisualizerControls) => void; }; const controlFields = [ { key: "scale", label: "Tile Scale", min: 0.25, max: 2.5, step: 0.05 }, { key: "opacity", label: "Blend Opacity", min: 0.1, max: 1, step: 0.01 }, { key: "rotation", label: "Rotation", min: -90, max: 90, step: 1 }, ] satisfies Array<{ key: keyof VisualizerControls; label: string; min: number; max: number; step: number; }>; export function ControlsPanel({ controls, onChange }: ControlsPanelProps) { return (

Adjustments

{controlFields.map((field) => ( ))}
); } function formatValue(key: keyof VisualizerControls, value: number) { if (key === "opacity") return `${Math.round(value * 100)}%`; if (key === "rotation") return `${value}°`; return `${value.toFixed(2)}×`; }