BrushCursorOptions
import type { BrushCursorOptions } from 'pixi-silk/ui/brush';
Options of BrushCursor. Sizes are diameters in the cursor’s coordinates.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
bracketKeys? | boolean | [ and ] step the size. Default true. | ui/brush.ts:28 |
color? | string | number | Ring colour. Default white. | ui/brush.ts:41 |
hardness? | number | 0 (soft) to 1 (hard). Default 0.7. | ui/brush.ts:16 |
hardnessRate? | number | Hardness change per unit of vertical drag while resizing. Default 1 / 200. | ui/brush.ts:32 |
hideCursor? | boolean | Hide the OS cursor over surface. Default true. | ui/brush.ts:39 |
maxSize? | number | Largest diameter that resizing and BrushCursor.setBrushSize allow. Default 500. | ui/brush.ts:22 |
minSize? | number | Smallest diameter that resizing and BrushCursor.setBrushSize allow. Default 1. | ui/brush.ts:20 |
opacity? | number | Starting brush opacity, 0 to 1. Only stored on state.opacity for your brush engine. Default 1. | ui/brush.ts:18 |
outline? | string | number | Second ring for contrast on light backgrounds. Default black. | ui/brush.ts:43 |
resizeKey? | string | null | Hold this key (a KeyboardEvent.code) and move to resize. Default KeyF. null turns it off. | ui/brush.ts:24 |
rightDragResize? | boolean | Right-button drag resizes too. Default true. | ui/brush.ts:26 |
size? | number | Starting diameter. Default 32. | ui/brush.ts:14 |
sizeRate? | number | Size change per unit of horizontal drag while resizing. Default 1. | ui/brush.ts:30 |
surface? | Container<ContainerChild> | Painting area. The OS cursor is hidden over it, and right-drags on it resize. Its eventMode becomes static if it was not interactive. Without a surface, state.inside stays true. | ui/brush.ts:37 |
ticker? | Ticker | null | Ticker driving the animation. Default Ticker.shared. null for manual BrushCursor.tick. | ui/brush.ts:45 |