Skip to content

Type Alias: InkIntent

InkIntent = { id: string; mode: PencilMode; overrides?: StrokeOverrides; point: WirePoint; pointerType: PointerKind; tool: Tool; type: "strokeBegin"; } | { id: string; points: WirePoint[]; type: "strokePoints"; } | { id: string; point?: WirePoint; type: "strokeEnd"; } | { id: string; type: "strokeCancel"; } | { type: "undo"; } | { type: "clear"; } | { du: number; dv: number; type: "scroll"; } | { centerU: number; centerV: number; scale: number; type: "zoom"; }

Defined in: protocol.ts:81

iPad → host: drawing intent. Never synthetic events — the host owns the model.

Union Members

Type Literal

{ id: string; mode: PencilMode; overrides?: StrokeOverrides; point: WirePoint; pointerType: PointerKind; tool: Tool; type: "strokeBegin"; }

id

id: string

mode

mode: PencilMode

overrides?

optional overrides?: StrokeOverrides

User brush knobs, present only when the host's presentation offers them.

point

point: WirePoint

pointerType

pointerType: PointerKind

tool

tool: Tool

Which end of the instrument, and which preset. The host resolves both.

type

type: "strokeBegin"


Type Literal

{ id: string; points: WirePoint[]; type: "strokePoints"; }


Type Literal

{ id: string; point?: WirePoint; type: "strokeEnd"; }


Type Literal

{ id: string; type: "strokeCancel"; }


Type Literal

{ type: "undo"; }

Lift the last stroke — an eraser can itself be undone (see surface.ts).


Type Literal

{ type: "clear"; }


Type Literal

{ du: number; dv: number; type: "scroll"; }

Navigation gestures against the plane — the shapes retired paint v1 proved (D5 keeps them HERE, not on the bar: they are continuous gestures, not commands, and routing 60 of them a second through a mode-engine reducer would be wrong). Scroll is a fraction of the plane per step; zoom multiplies about a normalized center.


Type Literal

{ centerU: number; centerV: number; scale: number; type: "zoom"; }