build/physics/physics.js
function(poly1, poly2)
{
    var mini1 = findMSA(poly2, poly1.tPlanes);
    if(mini1 == -1) return NONE;
    var min1 = last_MSA_min;
    
    var mini2 = findMSA(poly1, poly2.tPlanes);
    if(mini2 == -1) return NONE;
    var min2 = last_MSA_min;
    
    // There is overlap, find the penetrating verts
    if(min1 > min2)
        return findVerts(poly1, poly2, poly1.tPlanes[mini1].n, min1);
    else
        return findVerts(poly1, poly2, vneg(poly2.tPlanes[mini2].n), min2);
}
function(poly1, poly2)
{
    var mini1 = findMSA(poly2, poly1.tPlanes);
    if(mini1 == -1) return NONE;
    var min1 = last_MSA_min;
    
    var mini2 = findMSA(poly1, poly2.tPlanes);
    if(mini2 == -1) return NONE;
    var min2 = last_MSA_min;
    
    // There is overlap, find the penetrating verts
    if(min1 > min2)
        return findVerts(poly1, poly2, poly1.tPlanes[mini1].n, min1);
    else
        return findVerts(poly1, poly2, vneg(poly2.tPlanes[mini2].n), min2);
}
function ( poly1 , poly2 ) { var mini1 = findMSA ( poly2 , poly1 . tPlanes ) ; if ( mini1 == - 1 ) return NONE ; var min1 = last_MSA_min ; var mini2 = findMSA ( poly1 , poly2 . tPlanes ) ; if ( mini2 == - 1 ) return NONE ; var min2 = last_MSA_min ; // There is overlap, find the penetrating verts if ( min1 > min2 ) return findVerts ( poly1 , poly2 , poly1 . tPlanes [ mini1 ] . n , min1 ) ; else return findVerts ( poly1 , poly2 , vneg ( poly2 . tPlanes [ mini2 ] . n ) , min2 ) ; }
Collide poly shapes together.
Collide poly shapes together .