diff options
author | Adam Scott <ascott.ca@gmail.com> | 2023-07-20 09:42:03 -0400 |
---|---|---|
committer | Adam Scott <ascott.ca@gmail.com> | 2023-10-09 11:50:01 -0400 |
commit | 78c2a08fae9dddb262a0e86ec49ebee2267b4a51 (patch) | |
tree | 0b61d1c4a4b43cd57aa5b3d3f94464f2b4d52263 /platform/web/js/libs/library_godot_input.js | |
parent | c2b916751d7a52e7f002eb7361fe2b12c1cbc488 (diff) | |
download | redot-engine-78c2a08fae9dddb262a0e86ec49ebee2267b4a51.tar.gz |
Add `proxy_to_pthread` option to `platform=web`
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
Diffstat (limited to 'platform/web/js/libs/library_godot_input.js')
-rw-r--r-- | platform/web/js/libs/library_godot_input.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/web/js/libs/library_godot_input.js b/platform/web/js/libs/library_godot_input.js index 1b221e78b3..92113e85c9 100644 --- a/platform/web/js/libs/library_godot_input.js +++ b/platform/web/js/libs/library_godot_input.js @@ -356,6 +356,7 @@ const GodotInput = { /* * Mouse API */ + godot_js_input_mouse_move_cb__proxy: 'sync', godot_js_input_mouse_move_cb__sig: 'vi', godot_js_input_mouse_move_cb: function (callback) { const func = GodotRuntime.get_func(callback); @@ -374,6 +375,7 @@ const GodotInput = { GodotEventListeners.add(window, 'mousemove', move_cb, false); }, + godot_js_input_mouse_wheel_cb__proxy: 'sync', godot_js_input_mouse_wheel_cb__sig: 'vi', godot_js_input_mouse_wheel_cb: function (callback) { const func = GodotRuntime.get_func(callback); @@ -385,6 +387,7 @@ const GodotInput = { GodotEventListeners.add(GodotConfig.canvas, 'wheel', wheel_cb, false); }, + godot_js_input_mouse_button_cb__proxy: 'sync', godot_js_input_mouse_button_cb__sig: 'vi', godot_js_input_mouse_button_cb: function (callback) { const func = GodotRuntime.get_func(callback); @@ -409,6 +412,7 @@ const GodotInput = { /* * Touch API */ + godot_js_input_touch_cb__proxy: 'sync', godot_js_input_touch_cb__sig: 'viii', godot_js_input_touch_cb: function (callback, ids, coords) { const func = GodotRuntime.get_func(callback); @@ -442,6 +446,7 @@ const GodotInput = { /* * Key API */ + godot_js_input_key_cb__proxy: 'sync', godot_js_input_key_cb__sig: 'viii', godot_js_input_key_cb: function (callback, code, key) { const func = GodotRuntime.get_func(callback); @@ -459,23 +464,27 @@ const GodotInput = { /* * Gamepad API */ + godot_js_input_gamepad_cb__proxy: 'sync', godot_js_input_gamepad_cb__sig: 'vi', godot_js_input_gamepad_cb: function (change_cb) { const onchange = GodotRuntime.get_func(change_cb); GodotInputGamepads.init(onchange); }, + godot_js_input_gamepad_sample_count__proxy: 'sync', godot_js_input_gamepad_sample_count__sig: 'i', godot_js_input_gamepad_sample_count: function () { return GodotInputGamepads.get_samples().length; }, + godot_js_input_gamepad_sample__proxy: 'sync', godot_js_input_gamepad_sample__sig: 'i', godot_js_input_gamepad_sample: function () { GodotInputGamepads.sample(); return 0; }, + godot_js_input_gamepad_sample_get__proxy: 'sync', godot_js_input_gamepad_sample_get__sig: 'iiiiiii', godot_js_input_gamepad_sample_get: function (p_index, r_btns, r_btns_num, r_axes, r_axes_num, r_standard) { const sample = GodotInputGamepads.get_sample(p_index); @@ -502,6 +511,7 @@ const GodotInput = { /* * Drag/Drop API */ + godot_js_input_drop_files_cb__proxy: 'sync', godot_js_input_drop_files_cb__sig: 'vi', godot_js_input_drop_files_cb: function (callback) { const func = GodotRuntime.get_func(callback); @@ -524,6 +534,7 @@ const GodotInput = { }, /* Paste API */ + godot_js_input_paste_cb__proxy: 'sync', godot_js_input_paste_cb__sig: 'vi', godot_js_input_paste_cb: function (callback) { const func = GodotRuntime.get_func(callback); @@ -535,6 +546,7 @@ const GodotInput = { }, false); }, + godot_js_input_vibrate_handheld__proxy: 'sync', godot_js_input_vibrate_handheld__sig: 'vi', godot_js_input_vibrate_handheld: function (p_duration_ms) { if (typeof navigator.vibrate !== 'function') { |