Function: stepOpacity()
stepOpacity(
percent,direction):number
Defined in: src/lib/classes/BrushSettings/index.ts:40
The next opacity step up or down, in percent: to the next multiple of BRUSH_OPACITY_STEP, from
MIN_BRUSH_OPACITY to 100.
Parameters
percent
number
direction
-1 | 1
Returns
number
Example
stepOpacity(45, 1); // 50
stepOpacity(10, -1); // 1
stepOpacity(1, 1); // 10