613 / 627

Ink

A pointermove arrives once per frame, and getCoalescedEvents hands over every sample the hardware delivered since the last one, so a fast stroke keeps its shape instead of being joined from one point per frame. getPredictedEvents adds a short tail where the pen is about to be, which the next frame replaces, so the line trails the pen by less.

  • Pen pressure sets the width; a mouse draws at one width.
  • Finished strokes are drawn once to a layer underneath, and only the stroke in progress is drawn per frame.
  • Without the two methods each event gives one sample and there is no tail.
Shelf
Engineering
Group
Writing 04 of 04
Theme
Light and dark
Live pointer
9 steps, until you take over