onPaint already queries once per frame at x cycles in the future and remembers all events until they are y cycles in the past.
On each evaluation, all haps that are in the future are invalidated and queried again.
this is a much more performance friendly approach, as each frame consistently queries 1/60s, while .draw currently queries a whole second at once, which can lead to visual jank. draw could also just invalidate / requery at eval time and query only one frame in the future at draw time.
onPaint already queries once per frame at
x
cycles in the future and remembers all events until they arey
cycles in the past. On each evaluation, all haps that are in the future are invalidated and queried again. this is a much more performance friendly approach, as each frame consistently queries 1/60s, while .draw currently queries a whole second at once, which can lead to visual jank. draw could also just invalidate / requery at eval time and query only one frame in the future at draw time.