The job.polygon(points) example in API reference uses objects instead of arrays for points. The example doesn't work and throws an error. It should instead look like this:
const job = plotter.Job('my-awesome-drawing')
let points = []
for (let i = 0; i < 100; i++) {
let point = [Math.random() * plotter.width, Math.random() * plotter.height]
points.push(point)
}
job.polygon(points)
The job.polygon(points) example in API reference uses objects instead of arrays for points. The example doesn't work and throws an error. It should instead look like this: