feat: reset button
This commit is contained in:
parent
55eaa057ad
commit
62838e3b64
1 changed files with 9 additions and 0 deletions
9
main.mjs
9
main.mjs
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue