src/Tools/babylon.earcut.js
// if one belongs to the outer ring and another to a hole, it merges it into a single ring
if one belongs to the outer ring and another to a hole, it merges it into a single ring
if one belongs to the outer ring and another to a hole it merges it into a single ring
function splitPolygon(a, b) {
        var a2 = new Node(a.i, a.x, a.y), b2 = new Node(b.i, b.x, b.y), an = a.next, bp = b.prev;
        a.next = b;
        b.prev = a;
        a2.next = an;
        an.prev = a2;
        b2.next = a2;
        a2.prev = b2;
        bp.next = b2;
        b2.prev = bp;
        return b2;
    }
function splitPolygon ( a , b ) { var a2 = new Node ( a . i , a . x , a . y ) , b2 = new Node ( b . i , b . x , b . y ) , an = a . next , bp = b . prev ; a . next = b ; b . prev = a ; a2 . next = an ; an . prev = a2 ; b2 . next = a2 ; a2 . prev = b2 ; bp . next = b2 ; b2 . prev = bp ; return b2 ; }
if one belongs to the outer ring and another to a hole, it merges it into a single ring
if one belongs to the outer ring and another to a hole it merges it into a single ring