index
aiui-pencil — one instrument, three surfaces.
A pencil whose range lives in your hand: pressure darkens and broadens it, laying it over turns the contact patch elliptical and it becomes charcoal. Textured strokes, a real eraser, and vanishing ink, on a raster surface that keeps stroke identity exactly as long as it needs to and not one frame longer.
Design, plan, and status: the aiui-pencil proposal and its plan, in git history. Supersedes the retired aiui-ink and aiui-paint (git history).
The core is layer 1: the pure stroke pipeline — everything from a PointerEvent to a list of dabs, with no DOM anywhere in it. Layered on top, and exported below: the renderer (PencilSurface, surface.ts), the remote wire and its endpoint cores (protocol.ts, remote.ts, the sessions); the command bus ships as its own channel (aiui-remote-bar).
The pipeline, end to end:
PointerEvent → penSample() normalize; derive whichever orientation pair
the browser withheld (telemetry.ts)
→ filterSamples() causal One-Euro low-pass (filter.ts)
→ detectCusps() the corners a spline must NOT
smooth through (corners.ts)
→ densify() centripetal Catmull-Rom, broken
at those corners (spline.ts)
→ resample…() onto the dab grid, by ARC LENGTH (geom.ts)
→ dabAt() pressure/tilt/azimuth/velocity
→ the stamp (dabs.ts)planStroke runs all of it and keeps every intermediate stage, which is what the Lab draws — a tuning rig that can only show you the final stroke can tell you that it looks wrong, never where it went wrong.
Classes
Interfaces
- ClientSessionOptions
- CuspConfig
- Dab
- DensifyConfig
- HostSessionOptions
- HostSessionStatus
- InkSignals
- InkSource
- InkState
- InkStroke
- InputReport
- LinkStats
- OneEuroConfig
- PencilParams
- PencilSurfaceOptions
- PenSample
- PenSupport
- PointerLike
- Range
- Rect
- RemoteClientOptions
- RemoteHostOptions
- RemotePresentation
- SessionInfo
- Signal
- StrokeContext
- StrokeEnd
- StrokeOverrides
- StrokePlan
- Surface
- Telemetry
- Vec
- VideoStatus
- WirePoint
Type Aliases
- CaptureState
- ClientToRelay
- HostToRelay
- InkEvent
- InkIntent
- PencilMode
- PenKind
- PointerKind
- Ramp
- RelayToClient
- RelayToHost
- TiltVerdict
- Tool
- WireMessage