n-gon
v1.0.0
Published
create regular polygons with n sides
Downloads
6
Readme
n-gon
create regular polygons with
n
sides
usage
A "polygon" is just an array of [ x, y ]
points, which allows you to map
it to a new size and position.
const gon = require('n-gon')
let polygon = gon(7)
.map([ x, y ] => [
x * size + offset[0],
y * size + offset[1]
])
license
MIT © Brandon Semilla