src/index.js
function polygonDecomp(polygon){
    var edges = polygonGetCutEdges(polygon);
    if(edges.length > 0){
        return polygonSlice(polygon, edges);
    } else {
        return [polygon];
    }
}
function polygonDecomp(polygon){
    var edges = polygonGetCutEdges(polygon);
    if(edges.length > 0){
        return polygonSlice(polygon, edges);
    } else {
        return [polygon];
    }
}
function polygonDecomp ( polygon ) { var edges = polygonGetCutEdges ( polygon ) ; if ( edges . length > 0 ) { return polygonSlice ( polygon , edges ) ; } else { return [ polygon ] ; } }
Decomposes the polygon into one or more convex sub-Polygons.
@method decomp
@return {Array} An array or Polygon objects.
Decomposes the polygon into one or more convex sub - Polygons .