Interface: BrushParamConfig
Defined in: src/lib/brushes/types/index.ts:49
Controls how a brush parameter varies for each stamp along a stroke: its range (min to max), and the sources
that pick a value in it. All source ranges are fractions from 0 to 1.
Each source turned on gives a share, from its input (0–1) through its profile graph (see applyProfile):
- Randomise: between
minRandomiseandmaxRandomise, from a random number - Pressure: between
minPressureandmaxPressure, from the pen's pressure (full for other devices) - Tilt: between
minTiltandmaxTilt, from the pen's tilt (0 = upright, 1 = flat; full for other devices)
The shares multiply into one (1 when no source is on), which sets the value between the range's ends:
- Scale parameters (width, height, alpha, …): from
value × minto the value. - Angle parameters (rotation, hue): from
value + mintovalue + maxdegrees. - Offset parameters (offsetX, offsetY): from
value + mintovalue + maxpixels.
Settings saved without min and max work as before ranges: scale from 0, angle from 0 to 360°; with tilt on, the
rotation follows the direction the pen leans (like a calligraphy nib); offsets scatter up to the share × size in a
random direction.
Example
// Width from half to full size, larger the harder the pen presses
const widthConfig: BrushParamConfig = { min: 0.5, usePressure: true, minPressure: 0, maxPressure: 1 };
Properties
max?
optionalmax?:number
Defined in: src/lib/brushes/types/index.ts:108
The range's high end, for angle (degrees added to the value) and offset (pixels) parameters
maxPressure?
optionalmaxPressure?:number
Defined in: src/lib/brushes/types/index.ts:79
Factor at full pressure (0–1)
Default
1
maxRandomise?
optionalmaxRandomise?:number
Defined in: src/lib/brushes/types/index.ts:64
Highest random factor (0–1)
Default
1
maxTilt?
optionalmaxTilt?:number
Defined in: src/lib/brushes/types/index.ts:94
Factor when the pen is flat (0–1)
Default
1
min?
optionalmin?:number
Defined in: src/lib/brushes/types/index.ts:106
The range's low end: a fraction of the value for scale parameters (0–1), degrees added to it for angle parameters, or pixels for offset parameters
minPressure?
optionalminPressure?:number
Defined in: src/lib/brushes/types/index.ts:74
Factor at the lightest pressure (0–1)
Default
0
minRandomise?
optionalminRandomise?:number
Defined in: src/lib/brushes/types/index.ts:59
Lowest random factor (0–1)
Default
1
minTilt?
optionalminTilt?:number
Defined in: src/lib/brushes/types/index.ts:89
Factor when the pen is upright (0–1)
Default
0
pressureProfile?
optionalpressureProfile?:ProfilePoint[]
Defined in: src/lib/brushes/types/index.ts:110
Pressure's own profile graph (instead of profile)
pressureProfileId?
optionalpressureProfileId?:string
Defined in: src/lib/brushes/types/index.ts:112
The ID of the profile graph pressureProfile came from
profile?
optionalprofile?:ProfilePoint[]
Defined in: src/lib/brushes/types/index.ts:99
The profile graph the input (pressure, tilt or the random number) goes through before setting the factor between
its min and max, e.g. so a light touch goes most of the way (see applyProfile). A straight line by default.
profileId?
optionalprofileId?:string
Defined in: src/lib/brushes/types/index.ts:101
The ID of the profile graph profile came from (a preset's or one of the user's), to show its name
randomiseProfile?
optionalrandomiseProfile?:ProfilePoint[]
Defined in: src/lib/brushes/types/index.ts:118
Randomise's own profile graph (instead of profile)
randomiseProfileId?
optionalrandomiseProfileId?:string
Defined in: src/lib/brushes/types/index.ts:120
The ID of the profile graph randomiseProfile came from
tiltProfile?
optionaltiltProfile?:ProfilePoint[]
Defined in: src/lib/brushes/types/index.ts:114
Tilt's own profile graph (instead of profile)
tiltProfileId?
optionaltiltProfileId?:string
Defined in: src/lib/brushes/types/index.ts:116
The ID of the profile graph tiltProfile came from
usePressure?
optionalusePressure?:boolean
Defined in: src/lib/brushes/types/index.ts:69
Vary the parameter with pen pressure, when the device provides it
Default
false
useRandomise?
optionaluseRandomise?:boolean
Defined in: src/lib/brushes/types/index.ts:54
Vary the parameter randomly for each stamp, between minRandomise and maxRandomise
Default
false
useTilt?
optionaluseTilt?:boolean
Defined in: src/lib/brushes/types/index.ts:84
Vary the parameter with pen tilt, when the device provides it
Default
false