commit cec9eb109b0cc5df2615999a13ef18d42a483923
parent df2edb3aab25dc607450e53bdbb6913d72ffa741
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Tue, 22 Mar 2022 20:13:42 +0200
Jump by pressing the canvas.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/html/wtc_plaza_2001-09-11/wtc_plaza_2001-09-11.js b/html/wtc_plaza_2001-09-11/wtc_plaza_2001-09-11.js
@@ -276,6 +276,8 @@ Math.TAU = 2 * Math.PI;
scream_audio_data = await get_audio_data(scream_audio_element.src);
thump_audio_data = await get_audio_data(thump_audio_element.src);
+ let canvas = document.getElementById('canvas');
+ canvas.addEventListener('click', jump);
let jump_button = document.getElementById('jump_button');
jump_button.addEventListener('click', jump);