JSFiddle - React, Tailwind, and code Playground

HTML

<canvas id="foo" width="700" height="500"></canvas>

JavaScript

//an array of indefinite length of boxes
//boxes represented as arrays of four points
//points represented as arrays of two things, an x and a y, measured in
//pixels from the upper left corner

var boxes =...