function getPrimitiveType(points) {
            let primitive = null;
            if (points.length / 3 === 1) {
                primitive = 'points';
            } else if (points.length / 3 === 2) {
                primitive = 'line';
            } else {
                primitive = 'triangles';
            }
            return primitive;
        }

        //鼠标事件相关
        canvas.onmousedown = function(ev) { handleMouseDown(ev); };
        canvas.onmouseup = function(ev) { handleMouseUp(ev); 