summaryrefslogtreecommitdiff
path: root/platform/javascript
AgeCommit message (Collapse)Author
2021-10-05Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_masterRémi Verschelde
2021-10-05[HTML5] Refactor JS library listeners to OS.Fabio Alessandrelli
2021-10-05[HTML5] Refactor display/input JS library code.Fabio Alessandrelli
2021-10-05[HTML5] Implement Pointer Lock API in JS library.Fabio Alessandrelli
Removes more emscripten HTML5 library dependencies.
2021-10-05[HTML5] Implement window blur in JS library.Fabio Alessandrelli
Removes more emscripten HTML5 library dependencies.
2021-10-05[HTML5] Implement fullscreenchange in JS library.Fabio Alessandrelli
Removes more emscripten HTML5 library dependencies.
2021-10-05[HTML5] Implement mouse/touch/key events in JS library.Fabio Alessandrelli
This makes us more independent from emscripten libraries, giving us more control on the application lifecycle.
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-29Merge pull request #52809 from selgesel/patch1Fabio Alessandrelli
Release pressed events when the window is blurred on HTML5 platform
2021-09-29HTML5: Fix minification error with Emscripten 1.39.9Rémi Verschelde
It used an old vendored version of acorn.js which seems to choke on this trailing comma. This is not a problem for more recent Emscripten versions. We disable the `comma-dangle` check in ESLint to prevent this issue.
2021-09-23Release pressed events when the window is blurred on HTML5 platformSelgesel
2021-09-21Merge pull request #52649 from Faless/js/4.x_audioworklet_nothreads_prRémi Verschelde
[HTML5] Refactor audio drivers. Implement AudioWorklet w/o threads.
2021-09-16Merge pull request #52720 from Faless/js/4.x_fix_wheelRémi Verschelde
[HTML5] Fix wheel/touch callback modifying event after parse.
2021-09-15Provide a getter for the project data directory.ne0fhyk
2021-09-15[HTML5] Refactor audio drivers. Implement AudioWorklet w/o threads.Fabio Alessandrelli
Performances are not great in general, bad on Firefox, on Chrome, well, it could be an improvement. Leave it as a fallback for now, but can be forced via project settings if desired (or custom JavaScript logic via the "args" option). I'm actually surprised this works, it involves so many allocations, but there's no way around it when SharedArrayBuffer is not available :(.
2021-09-15Merge pull request #52695 from Faless/js/4.x_audio_mix_rateFabio Alessandrelli
[HTML5] Use browser mix rate by default on the Web.
2021-09-15[HTML5] Fix wheel/touch callback modifying event after parse.Fabio Alessandrelli
The events should be duplicated or reinstantiated without assuming that parse_input will consume them immediately.
2021-09-15[HTML5] Fix bug in AudioWorklet when reading output buffer.Fabio Alessandrelli
Would attempt an out of bounds read, causing an exception.
2021-09-15[HTML5] Use browser mix rate by default on the Web.Fabio Alessandrelli
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not allow input (microphone) if the mix rate is not the default one, Chrom* will exhibit worse performances, etc.
2021-09-14Merge pull request #52604 from Faless/js/4.x_input_fixFabio Alessandrelli
[HTML5] Fix input not working when buffered.
2021-09-12[HTML5] Fix input not working when buffered.Fabio Alessandrelli
After input buffering was reworked, input accumulation is now handled outside of OS, and the JavaScript plaform never implemented that. Additionally, the JavaScript platform is quite obnoxious about calling specific APIs outside specific user triggered events. This commit adds event flushing during the main iteration, and forces it during keydown/keyup/mousedown/mouseup/touchstart/touchend/touchcanel events (effectively only accumulating only "move" events).
2021-09-12[HTML5] Fix build error due to missing string cast.Fabio Alessandrelli
2021-09-11Add logo attribution for Android, HTML5 and Linux platform iconsHugo Locurcio
- Tweak the Android platform logo to remove the Android wordmark, as it can't be used without explicit permission.
2021-08-31Make platform feature tag names lowercaseHugo Locurcio
Feature tag names are still case-sensitive, but this makes built-in feature tags more consistent. - `Windows` -> `windows` - `OSX` -> `osx` - `LinuxBSD` -> `linuxbsd` - `Android` -> `android` - `iOS` -> `ios` - `HTML5` -> `html5` - `JavaScript` -> `javascript` - `UWP` -> `uwp`
2021-08-31Merge pull request #49598 from ↵Fabio Alessandrelli
Calinou/web-editor-improve-download-project-source-zip-name Improve the generated ZIP archive name when using Download Project Source
2021-08-19HTML5: Handle GODOT_VERSION_STATUS env var in @GODOT_VERSION@Rémi Verschelde
Follow-up to #51002.
2021-08-18[CI] Upgrade Emscripten to 2.0.27.Fabio Alessandrelli
Update Godot Javascript FS library to manually depend on ERRNO_CODES.
2021-08-16Improve the generated ZIP archive name when using Download Project SourceHugo Locurcio
This makes for easier organization since downloading a project several times (or several different projects) will result in more meaningful file names.
2021-08-12Split javascript export template into multiple filesSergey Minakov
2021-08-10Use Key enum instead of plain integersAaron Franke
2021-07-25Fix various typos with codespellluz paz
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-22Move `alert` function from `DisplayServer` to `OS`.bruvzg
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-16Modernize Display server to use override keywordHendrik Brucker
2021-07-15[HTML5] Make threads build the default.Fabio Alessandrelli
Non-threads build are broken anyway.
2021-07-15[HTML5] Fix build (with module_webxr_enabled=no).Fabio Alessandrelli
The XR API changed a bit, and it's not just a rename, though probably an easy update for someone who is qualified :).
2021-07-15Misc cleanup of header includesRémi Verschelde
Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
2021-07-13[HTML5] Raise default initial memory to 32 MiB.Fabio Alessandrelli
The memory was resized in any case during start. Mitigate Chromium issue: https://bugs.chromium.org/p/v8/issues/detail?id=11863 Also fix a warning about SAFE_HEAP being a linker only flag.
2021-07-13Implement the ability to disable classesreduz
* This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-07[HTML5] Fix JavaScript string parsing with new interface.Fabio Alessandrelli
Strings are UTF-8 encoded and should be parsed as such, while it was being parsed as a C string before.
2021-06-25[HTML5] Add option to focus canvas on start.Fabio Alessandrelli
Enabled by default.
2021-06-25Strip query string when parsing HTTP request line for pathHaoyu Qiu
2021-06-23[Net] Makes HTTPClient a custom instance class.Fabio Alessandrelli
2021-06-23[Net] Unify HTTPClient request and request_raw.Fabio Alessandrelli
2021-06-20Use mouse and joypad enums instead of plain integersAaron Franke
Also MIDIMessage
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-19Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal
Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
2021-06-18[HTML5] JS callback functions now returns passed value.Fabio Alessandrelli
JavaScript callbacks created via the `JavaScript.create_callback` method used to always return void. With this patch they return the value returned by the Godot function as one would expect.
2021-06-15Merge pull request #49592 from Faless/js/4.x_fix_sigsRémi Verschelde
[HTML5] Fix build without eval, library functions signatures.