Brush Configuration
Brush config controls the stamp used for each rendered point.
Change color, size, spacing, flow, opacity, roundness-related behavior, and eraser mode to see how brush config affects each stamp.
interface BrushBasicConfig {
size: number;
opacity: number;
flow: number;
color: string;
angle: number;
roundness: number;
spacing: number;
eraser: boolean;
rotation?: RotationConfig;
}
BrushConfig is the partial version accepted by constructors and loadConfig.
Defaults
{
size: 20,
opacity: 1,
flow: 1,
color: "#000000",
angle: 0,
roundness: 1,
spacing: 0.12,
eraser: false,
}
Fields
| Field | Description |
|---|---|
size | Base stamp size in pixels. Pressure also scales size. |
opacity | Stroke opacity from 0 to 1. |
flow | Paint buildup from 0 to 1. Pressure also scales flow. |
color | CSS color used to fill ellipse stamps or recolor image stamps. |
angle | Base stamp angle as a fraction of one turn, from 0 to 1. |
roundness | Ellipse/image width ratio from 0 to 1. |
spacing | Distance between stamps as a multiplier of brush size. |
eraser | When true, the brush erases content instead of painting it. |
rotation | Optional stamp rotation behavior. |
opacity, flow, and roundness are clamped to 0..1 while rendering.
Pressure is also clamped to 0..1; it scales both stamp size and flow.
Flow And Dense Spacing
opacity is a stroke-level ceiling. flow is the rate at which paint builds up
through the stamps that make up the stroke.
Since 0.8.7, Fuderu normalizes flow against the active brush size and spacing.
This prevents very dense stamp overlap from making low-flow strokes immediately
flatten into solid color. Modules still receive the pressure-adjusted flow value
in onChangeConfig; the brush renderer applies the spacing-aware per-stamp
alpha when the point is queued for drawing.
Rotation
rotation?: {
mode?: "fixed" | "flow" | "random";
offset?: number;
jitter?: number;
smoothing?: number;
};
fixed: usesrotation.offsetwhen a rotation config is present. Omitrotationto use the brush'sanglefield.flow: follows the direction of the stroke.random: varies rotation between stamps.offset: adds an angle offset in radians.jitter: adds random rotation variation in radians.smoothing: smooths flow-based direction changes.