function handleMouseMove(event) {
        if (!mouseDown) {
            return;
        }
        var newX = event.clientX;
        var newY = event.clientY;

        var deltaX = newX - lastMouseX;
        var newRotationMatrix = glMatrix.mat4.create();
        glMatrix.mat4.identity(newRotationMatrix);
        glMatrix.mat4.rotate(newRotationMatrix, newRotationMatrix, degToRad(deltaX / 10), [0, 1, 0]);

        var deltaY = newY - lastMouseY;
        glMatrix.mat4.rotate(newRotationMatrix, newRotationMatrix, degToRad(deltaY / 10), [1, 0, 0]);

        camera.rotateView(newRotationMatrix);

        lastMouseX = newX;
        lastMouseY = newY;

        triggerAnimation();
    }
/**
     * Handles the mouse move event. In this case, we rotate the camera if the mouse button is down at the same time.
     * @method handleMouseMove
     * @param  {event} event The mouse event.
     */
Handles the mouse move event. In this case, we rotate the camera if the mouse button is down at the same time.
Handles the mouse move event . In this case we rotate the camera if the mouse button is down at the same time .
function handleMouseMove(event) {
        if (!mouseDown) {
            return;
        }
        var newX = event.clientX;
        var newY = event.clientY;
        var deltaX = newX - lastMouseX;
        var newRotationMatrix = glMatrix.mat4.create();
        glMatrix.mat4.identity(newRotationMatrix);
        glMatrix.mat4.rotate(newRotationMatrix, newRotationMatrix, degToRad(deltaX / 10), [0, 1, 0]);
        var deltaY = newY - lastMouseY;
        glMatrix.mat4.rotate(newRotationMatrix, newRotationMatrix, degToRad(deltaY / 10), [1, 0, 0]);
        camera.rotateView(newRotationMatrix);
        lastMouseX = newX;
        lastMouseY = newY;
        triggerAnimation();
    }
function handleMouseMove ( event ) { if ( ! mouseDown ) { return ; } var newX = event . clientX ; var newY = event . clientY ; var deltaX = newX - lastMouseX ; var newRotationMatrix = glMatrix . mat4 . create ( ) ; glMatrix . mat4 . identity ( newRotationMatrix ) ; glMatrix . mat4 . rotate ( newRotationMatrix , newRotationMatrix , degToRad ( deltaX / 10 ) , [ 0 , 1 , 0 ] ) ; var deltaY = newY - lastMouseY ; glMatrix . mat4 . rotate ( newRotationMatrix , newRotationMatrix , degToRad ( deltaY / 10 ) , [ 1 , 0 , 0 ] ) ; camera . rotateView ( newRotationMatrix ) ; lastMouseX = newX ; lastMouseY = newY ; triggerAnimation ( ) ; }
Handles the mouse move event.
Handles the mouse move event .