src/webgl/vertgen.js
function genCap(point, ux, uy, v1i, v2i, pushVert, pushIndices) {
    if (!point.cap) {
        genRoundedCap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
    } else {
        switch (point.cap.type) {
            case LineCaps.LINECAP_TYPE_ARROW:
                genArrowCap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
                break;

            case LineCaps.LINECAP_TYPE_ROUNDED:
                genRoundedCap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
                break;

            case LineCaps.LINECAP_TYPE_HALF_ARROW_A:
                genHalfArrowACap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
                break;

            default:
                // default to no cap
                break;
        }
    }
}
function genCap(point, ux, uy, v1i, v2i, pushVert, pushIndices) {
    if (!point.cap) {
        genRoundedCap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
    } else {
        switch (point.cap.type) {
            case LineCaps.LINECAP_TYPE_ARROW:
                genArrowCap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
                break;

            case LineCaps.LINECAP_TYPE_ROUNDED:
                genRoundedCap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
                break;

            case LineCaps.LINECAP_TYPE_HALF_ARROW_A:
                genHalfArrowACap(point, ux, uy, v1i, v2i, pushVert, pushIndices);
                break;

            default:
                // default to no cap
                break;
        }
    }
}
function genCap ( point , ux , uy , v1i , v2i , pushVert , pushIndices ) { if ( ! point . cap ) { genRoundedCap ( point , ux , uy , v1i , v2i , pushVert , pushIndices ) ; } else { switch ( point . cap . type ) { case LineCaps . LINECAP_TYPE_ARROW : genArrowCap ( point , ux , uy , v1i , v2i , pushVert , pushIndices ) ; break ; case LineCaps . LINECAP_TYPE_ROUNDED : genRoundedCap ( point , ux , uy , v1i , v2i , pushVert , pushIndices ) ; break ; case LineCaps . LINECAP_TYPE_HALF_ARROW_A : genHalfArrowACap ( point , ux , uy , v1i , v2i , pushVert , pushIndices ) ; break ; default : // default to no cap break ; } } }
capgen shouldn't push more than two verts and 6 indices
capgen shouldn t push more than two verts and 6 indices