Numeric Controls
All numeric parameters in 3dSynth use a Blender-style numeric field. This control combines a value display, drag-editing, and direct text input into a single compact widget.
Visual Structure
The control appears as a horizontal bar with:
- A left arrow button (decrement)
- A centered numeric value
- A right arrow button (increment)
The arrow buttons are hidden by default and appear on hover or focus.
Interaction Modes
1. Drag Editing (Primary)
Click and drag horizontally anywhere on the field (except the arrow buttons) to adjust the value.
- Drag right → increase value
- Drag left → decrease value
The cursor changes to a horizontal resize icon (↔) during dragging.
Modifier Keys
Hold modifier keys while dragging for more control:
| Modifier | Effect | Use Case |
|---|---|---|
| Shift | Precision mode — 10× finer movement | Fine-tuning small values |
| Ctrl | Snap mode — value snaps to step increments | Jumping to round numbers |
| Ctrl + Shift | Precise snapping — snap to finer increments | Precise round values |
2. Click to Type
If you click the field without dragging (minimal mouse movement), the field enters typing mode:
- The value becomes editable text, selected for easy replacement
- Type your desired value
- Press Enter to confirm
- Press Escape to cancel and revert
- Clicking away (blur) also confirms the value
3. Arrow Buttons
The left and right arrow buttons at the edges of the field:
- Left arrow — decrease by one step
- Right arrow — increase by one step
These provide discrete, deterministic increments and do not trigger drag behavior.
Value Behavior
Clamping
Every numeric field has a min and max range. Values are always clamped to stay within bounds, whether set by dragging, typing, or arrow buttons.
Precision
Precision adapts automatically based on the parameter:
- Large ranges (e.g., 0–1000) → fewer decimal places
- Small ranges (e.g., 0–1) → more decimal places
- If a step is defined, precision matches the step's decimal places
Values are stably rounded to avoid floating-point display drift.
Invalid Input
If you type something that isn't a valid number, the field reverts to the last valid value. No error state is shown — it simply ignores invalid input.
Cursor Feedback
| State | Cursor |
|---|---|
| Default (hovering) | ↔ horizontal resize |
| Dragging | ↔ horizontal resize |
| Typing mode | I text cursor |
| Arrow buttons | Pointer |
Where It's Used
The Blender-style numeric field is used for all numeric parameters throughout the app:
- Profile editor (diameter, height, layer values)
- Effect parameters (frequency, amplitude, etc.)
- Printer settings (layer height, speeds, temperatures)
- Growth curve values
- Height and size controls
Tips
- Quick large changes: Drag without modifiers for fast adjustment
- Fine adjustments: Hold Shift while dragging for 10× precision
- Exact values: Click once to enter typing mode and type the exact number
- Round numbers: Hold Ctrl while dragging to snap to step increments