Overview
This is a p5.js sketch to explore some optimizations in rendering Voronoi diagrams.
Of note, used Chrome Performance Tools to do some performance profiling and fine tuning.
Controls
Mouse
hover
Moving the mouse around will highlight the cell under the mouse cursor;
Touch
press
Touching anywhere (and pressing and moving around) will highlight the cell under touch point.
References:
- [p5.voronoi.js][p5_voronoi] - The main p5.js extension that enables drawing of of a Voronoi diagram.
- gorhill-voronoi - The primary underlying implementation of the Voronoi algorithm in Javascript.
- Chrome Performance Tools