Interface: PencilParams
Defined in: pencil.ts:46
Everything the instrument is. Every field here is a knob in the Lab, and the Lab is the only place any of these numbers should be argued about — they are defaults to be drawn with, not values to be reasoned toward.
Properties
color
color:
string
Defined in: pencil.ts:64
CSS color. A pencil is not black — 6B graphite is a warm dark grey.
cuspThreshold
cuspThreshold:
number
Defined in: pencil.ts:51
How hard a turn counts as a corner (radians), and over what arc-length window (px).
cuspWindow
cuspWindow:
number
Defined in: pencil.ts:52
filter
filter:
OneEuroConfig
Defined in: pencil.ts:49
The causal low-pass. Writing wants it out of the way; sketching wants it working.
flow
flow:
number
Defined in: pencil.ts:62
Base opacity of a single dab, before any dynamics. The graphite's darkness.
grain
grain:
number
Defined in: pencil.ts:92
How much the paper's tooth eats the mark, 0..1. The mechanical-pencil tell.
grainScale
grainScale:
number
Defined in: pencil.ts:94
Tooth size in px. Anchored to the CANVAS, never to the stroke (see grain.ts).
maxStep
maxStep:
number
Defined in: pencil.ts:54
Longest straight step the densified spline may take, px. Fidelity, not taste.
pressureToAlpha
pressureToAlpha:
Ramp
Defined in: pencil.ts:70
Alpha multiplier across pressure 0..1. Pressing harder lays more graphite.
pressureToRadius
pressureToRadius:
Ramp
Defined in: pencil.ts:68
Radius multiplier across pressure 0..1.
size
size:
number
Defined in: pencil.ts:58
Nominal dab radius (px) — the mark of an upright pen at full pressure.
spacing
spacing:
number
Defined in: pencil.ts:60
Dab spacing as a fraction of dab radius. Below ~0.25 the stroke is solid.
tiltToAlpha
tiltToAlpha:
Ramp
Defined in: pencil.ts:80
Alpha multiplier from upright (1) to flat — and covers it more thinly.
tiltToEccentricity
tiltToEccentricity:
number
Defined in: pencil.ts:76
How elliptical the dab becomes as the pen lays over. 0 = always round (tilt ignored); 1 = a fully flat pen draws a maximally elongated dab. THIS is the charcoal knob, and it is the one that dies if Safari won't tell us the tilt.
tiltToRadius
tiltToRadius:
Ramp
Defined in: pencil.ts:78
Radius multiplier from upright (1) to flat — a laid-over pencil covers more paper.
velocityRef
velocityRef:
number
Defined in: pencil.ts:88
Speed (px/ms) at which velocityToAlpha reaches its far end.
velocityToAlpha
velocityToAlpha:
Ramp
Defined in: pencil.ts:86
How much speed thins the mark. The ONLY expressive signal a mouse or a finger has, so it is never zero — a pressure-less device still gets a living line out of it.