280 of 300

Writing 04

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.

From the Engineering page on ramtt.com

  • 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.