(e)
| 435 | inputData[0][e.button] = (inputData[0][e.button]&2) | 4; |
| 436 | } |
| 437 | function onMouseMove(e) |
| 438 | { |
| 439 | mouseInWindow = true; |
| 440 | const mousePosScreenLast = mousePosScreen; |
| 441 | mousePosScreen = mouseEventToScreen(vec2(e.x,e.y)); |
| 442 | |
| 443 | // when pointer is locked use movementX/Y for delta |
| 444 | const movement = pointerLockIsActive() ? |
| 445 | vec2(e.movementX, e.movementY) : |
| 446 | mousePosScreen.subtract(mousePosScreenLast); |
| 447 | mouseDeltaScreen = mouseDeltaScreen.add(movement); |
| 448 | } |
| 449 | function onMouseLeave() { mouseInWindow = false; } // mouse moved off window |
| 450 | function onMouseWheel(e) |
| 451 | { |
nothing calls this directly
no test coverage detected