Function: setSource()
setSource(
config,param,source,on):Partial<BrushConfig>
Defined in: src/lib/brushes/configRanges/index.ts:345
Turn a source on or off for a setting, as config changes. Several can be on at once (their shares multiply). The first source turned on gives the setting a starting range (half to full size, a full turn, or 10 pixels either way), and a source turned on starts with its full range (0–1).
Parameters
config
param
source
on
boolean
Returns
Partial<BrushConfig>
Example
setSource({ width: 40 }, "width", "pressure", true);
// { widthConfig: { usePressure: true, minPressure: 0, maxPressure: 1, min: 0.5, max: 1 } }