Skip to content
pixi-silk
GitHub repository
Interface

BrushState

import type { BrushState } from 'pixi-silk/ui/brush';

The reactive state of a BrushCursor.

Properties#

PropertyTypeDescriptionDefined in
hardnessSignal<number>0 (soft) to 1 (hard).ui/brush.ts:53
insideSignal<boolean>True while the pointer is over surface. Always true without a surface.ui/brush.ts:61
opacitySignal<number>0 to 1. The cursor does not draw it: read it in your brush engine.ui/brush.ts:55
pressureSignal<number>Pen pressure, 0 to 1. Mice report 0.5 while a button is down.ui/brush.ts:57
resizingSignal<boolean>True while a resize gesture runs.ui/brush.ts:59
sizeSignal<number>Diameter in the cursor’s coordinates, within minSize and maxSize.ui/brush.ts:51