A script to generate any regular polygon.
You can see the script running here.
To use the polygonJS you just need add to your project the polygon script and css.
<link rel="stylesheet" href="path/polygon.css" />
<script src="path/polygon.js"></script>
NOTE: PolygonJS runs normally just the css code version. The pre-processor LESS is used just for a faster and easily development.
HTML
<div id="polygon"></div>
SCRIPT
Put the script on bottom of your code.
<script>
//polygon(element, sides);
polygon('#square', 4);
</script>