dist/preview release/modules/polygonMesh/es6.js
// try splitting polygon into two and triangulate them independently
try splitting polygon into two and triangulate them independently
try splitting polygon into two and triangulate them independently
function splitEarcut(start, triangles, dim, minX, minY, size) {
        var a = start;
        do {
            var b = a.next.next;
            while (b !== a.prev) {
                if (a.i !== b.i && isValidDiagonal(a, b)) {
                    var c = splitPolygon(a, b);
                    a = filterPoints(a, a.next);
                    c = filterPoints(c, c.next);
                    earcutLinked(a, triangles, dim, minX, minY, size, undefined);
                    earcutLinked(c, triangles, dim, minX, minY, size, undefined);
                    return;
                }
                b = b.next;
            }
            a = a.next;
        } while (a !== start);
    }
function splitEarcut ( start , triangles , dim , minX , minY , size ) { var a = start ; do { var b = a . next . next ; while ( b !== a . prev ) { if ( a . i !== b . i && isValidDiagonal ( a , b ) ) { var c = splitPolygon ( a , b ) ; a = filterPoints ( a , a . next ) ; c = filterPoints ( c , c . next ) ; earcutLinked ( a , triangles , dim , minX , minY , size , undefined ) ; earcutLinked ( c , triangles , dim , minX , minY , size , undefined ) ; return ; } b = b . next ; } a = a . next ; } while ( a !== start ) ; }
try splitting polygon into two and triangulate them independently
try splitting polygon into two and triangulate them independently
// look for a valid diagonal that divides the polygon into two // split the polygon in two by the diagonal // filter colinear points around the cuts // run earcut on each half