};
        canvas.addEventListener('mousemove', handleMouseMove);
        canvas.addEventListener('mousemove', drawHandleMouseMove);
        canvas.onwheel = function(ev) { handleWheel(ev); };
        canvas.ondblclick = function() {
            drawing = false;
            scanning = true;
            tempPositions = [];
            drawingPositons = [];
            linePositions = [];
        };
        
        function getPickingPoint(x, y) {
            const matrix = getViewProjection();
            c