Here the thing I m trying to make an object move using HTML button but in click it exicute the function ones I want it to exicute the function continuously on press of button Below is the code for the button in JavaScript
var increment = 1;
function moveUp()
{
camera.position.z +=increment;
}
function moveDown()
{
camera.position.z -= increment;
}
function moveRight()
{
camera.position.x +=increment;
}
function moveLeft()
{
camera.position.x -= increment;
}
You should use the events.
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent