feat: reset button

This commit is contained in:
stitchy 2024-12-26 04:15:00 +00:00
parent 55eaa057ad
commit 62838e3b64
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8

View file

@ -60,6 +60,15 @@ function draw(gl, program) {
requestAnimationFrame(() => draw(gl, program));
}
const button = document.getElementById("reset_button");
button.addEventListener("click", reset_transform);
function reset_transform() {
camera_pos = [0, 0, 0];
mouse_pos = [0, 0];
}
//** MAIN PROGRAM **//
// Initialize the shader