Back to blogs

Mar 15, 2025 · 7 min read

How CoSketch's Canvas Engine Works

From pointer events to render loops in a custom canvas engine.

This post breaks down the canvas architecture, including scene graphs, render scheduling, and input batching.

I also walk through how shapes are modeled, how hit testing works, and why optimistic updates keep the UI responsive.

The goal is to show a practical, maintainable approach rather than a demo-only prototype.