When programming in javascript, one can utilize the
document.addEventListener('keydown', function(event){...});
method to incorporate a key listener. However, when working with three.js
and trying to control the camera movement using keys, an issue arises where the camera moves initially, pauses briefly, and then resumes movement. This is due to the computer's delay in registering continuous key presses. What steps can be taken to ensure smooth camera movement when a key is pressed?