import { DEFAULT_CLASS } from './default-class.js'; import { XMLNS } from './xmlns.js'; /** * Draws a polygon * @param g * @param poly the polygon specified as an array of points - the last point does * not have to be specified * @param class_ * @param delay */ function polygon( g : SVGGElement, poly : number[][], class_ = DEFAULT_CLASS, delay? : number) { const $path = document.createElementNS(XMLNS, 'path'); let d = `M${poly[0][0]} ${poly[0][1]} L`; for (let i=0; i $path.remove(), delay); } return [$path]; } export { polygon }