summaryrefslogtreecommitdiffstats
path: root/platform/javascript/engine/utils.js
Commit message (Collapse)AuthorAgeFilesLines
* [HTML5] Libraries refactor for linting.Fabio Alessandrelli2020-11-211-51/+0
| | | | | | | | | | | | Initial work to make liniting easier. This includes: - Rename http_request.js to library_godot_http_request.js. - Rename externs.js to engine.externs.js. - New library_godot_runtime.js (GodotRuntime) wraps around emscripten functions. - Refactor of XMLHttpRequest handler in engine/preloader.js. - Few fixes to bugs spotted by early stage linting.
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-2/+0
|
* [HTML5] AudioWorklet API implementation.Fabio Alessandrelli2020-11-101-0/+2
| | | | | | | | | | | | Rewrote AudioDriverJavaScript to support multiple processor nodes. The old (and deprecated) ScriptProcessorNode when threads are not available, and the new AudioWorklet API when threads are enabled. The new implementation uses two ring buffers and a shared state to communicated with the AudioWorklet thread. The audio.worklet.js JavaScript file is always added to the export template, but only really used (and downloaded) in the thread build.
* Fix Closure compiler build, python style.Fabio Alessandrelli2020-05-101-18/+0
| | | | Move copyToFS into utils.js library included with '--pre-js'.
* [HTML5] Refactor JS, threads support, closures.Fabio Alessandrelli2020-03-111-0/+69
- Refactored the Engine code, splitted across files. - Use MODULARIZE option to build emscripten code into it's own closure. - Enable lto support (saves ~2MiB in release). - Enable optional closure compiler pass for JS and generated code. - Enable optional pthreads support. - Can now build with tools=yes (not much to see yet). - Dropped some deprecated code for older toolchains.