summaryrefslogtreecommitdiff
path: root/platform/javascript
AgeCommit message (Collapse)Author
2021-02-03[HTML5] Make home path persistent in editor.Fabio Alessandrelli
We used to only persist specific sub-folder of /home/web_user/ when running the Web Editor. This resulted in bad UX about default project creation path etc. This PR makes the whole folder persistent, move the zip preloading to a different folder (to avoid persisting it), and automatically prompt the user to import it if present.
2021-02-02[HTML5] Fix mouse_mode and fullscreen detection.Fabio Alessandrelli
The canvas_id is `#`-prefixed to work with emscripten as a CSS selector. When comparing to an event target ID (e.g. when checking if the canvas is fullscreen, or is locking the mouse) we need to skip the first char (the hash).
2021-01-31Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde
Modernize Thread
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-28Don't handle BaseException in JavaScript build scriptMarcel Admiraal
2021-01-25[HTML5] Builtin HTTP server disable browsers cacheFabio Alessandrelli
We don't want browsers to cache our temporary exports (since they will always differ).
2021-01-25[HTML5] Better editor HTML, small refactor.Fabio Alessandrelli
Side and GDNative libraries are now added by engine.js , the dynlink pre js had been deleted.
2021-01-25[HTML5] Fix "initial_memory" build option parsingFabio Alessandrelli
2021-01-18[HTML5] Custom Gamepad library to allow remapping.Fabio Alessandrelli
No longer use emscripten functions for gamepads, implement them as library functions in library_godot_display.js instead. This allows us to do a better job at "guessing" vendorId, productId, OS, etc. thus allowing us to better find the remapping for the controller.
2021-01-12Merge pull request #44514 from madmiraal/split-os-executeRémi Verschelde
Split OS::execute into two methods
2021-01-10[HTML5] Reorganize build script.Fabio Alessandrelli
Simplify helper functions, fix env/sys_env confusion and depends for externs and pre-js.
2021-01-10Fix JavaScript platform after MainLoop methods rename.Fabio Alessandrelli
2021-01-09Split OS::execute into two methodsMarcel Admiraal
1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
2021-01-05Merge pull request #44154 from dsnopek/webxr-masterRémi Verschelde
Add WebXR support (for Godot 4.0)
2021-01-04Add support for WebXRDavid Snopek
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-29Fix missed renamings from empty() to is_empty()Rémi Verschelde
Those were missed in #44401 or added by later PRs.
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-16Make tool menu plugins use Callables for callbackkobewi
2020-12-12Merge pull request #44315 from madmiraal/fix-handles-baseexceptionRémi Verschelde
Don't handle BaseException in build scripts
2020-12-12Don't handle BaseException in build scriptsMarcel Admiraal
2020-12-10HTML5: Code style cleanup for export codeRémi Verschelde
2020-12-09[HTML5] Fix errors when Mic is not allowed.Fabio Alessandrelli
2020-12-09[HTML5] Improve platform buildsystem.Fabio Alessandrelli
Check emcc version requirements when building GDNative. Add more build options (sanitizers, initial memory).
2020-12-09[HTML5] Add logo and favicon to editor html.Fabio Alessandrelli
2020-12-09Merge pull request #44161 from Faless/fix/fa_buffered_removeRémi Verschelde
Remove unused FileAccessBuffered
2020-12-06Remove now unused FileAccessBuffered.Fabio Alessandrelli
2020-12-06[HTML5] Use regular unix FileAccess implementation.Fabio Alessandrelli
2020-12-05[HTML5] Make GDNative support feature-based.Fabio Alessandrelli
This is suboptimal as it requires adding an extra compile flag, but rewriting how feature tags work is beyond the scope of this work.
2020-12-05[HTML5] Allow selecting the export type.Fabio Alessandrelli
Available types: - Regular - GDNative (support dynamic linking and thus GDNative WASM files) - Threads (uses WebAssembly Threads)
2020-12-05[HTML5] EditorRunNative works with GDNative.Fabio Alessandrelli
This "breaks" our loading bar logic (libraries are not counted). Fixing it is non trivial and probably deserves investigating a different strategy.
2020-12-05[HTML5] GDNative support via SIDE_MODULE.Fabio Alessandrelli
Working with emscripten >= 2.0.10
2020-12-04[HTML5] Add function signatures to JS libraries.Fabio Alessandrelli
2020-11-30[HTML5] Fix broken layout on load in HiDPI screensFabio Alessandrelli
This was caused by the devicePixelRatio being applied twice, once by the HTML code, once by the OS code. More specifically, OS.get_window_size() would return the canvas element size, while OS.set_window_size() would set the element size to the specified value times the devicePixelRatio. Calling OS.set_window_size(OS.get_window_size()) would reapply the devicePixelRatio every time. This commit changes the behaviour so that OS.set_window_size() do not apply the devicePixelRatio to the canvas element size, by it divides the CSS size instead.
2020-11-30[HTML5] Remove file flags from writeFile in setup.Fabio Alessandrelli
Flags where deprecated and partly in removed in emscripten 2.0.9.
2020-11-26[Complex Text Layouts] Add third-party TextServer dependencies (ICU, ↵bruvzg
HarfBuzz, Graphite).
2020-11-23[HTML5] Run eslint --fix.Fabio Alessandrelli
Should I write a poem about this whole new world? ;)
2020-11-23[HTML5] Enforce JavaScript style with eslint.Fabio Alessandrelli
Applies to javascript files inside the platform library folder, the exposed Engine code, and any javascript files in modules. Files ending with ".externs.js" will be ignored, you can create a ".eslintignore" file to specify extra files to be ignored.
2020-11-21[HTML5] Libraries refactor for linting.Fabio Alessandrelli
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.
2020-11-20Export: Reorder options for consistency across platformsRémi Verschelde
2020-11-19SCons: Remove unnecessary $LINK overridesRémi Verschelde
As of SCons 4.0.1, the default value for $LINK is $SMARTLINK, which itself is a function that will use $CXX as linker for C++: https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L327-L328 https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L54-L76 So we don't need to manually specify the same value as $CXX for $LINK.
2020-11-17Add missing javascript semi-colons.Marcel Admiraal
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-10[HTML5] AudioWorklet API implementation.Fabio Alessandrelli
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.
2020-11-10[HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli
The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
2020-11-10[HTML5] Update syntax for lto.Fabio Alessandrelli
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-06[HTML5] Fix audio buffer size and latency hint.Fabio Alessandrelli
The size of the audio buffer was incorrectly doubled when creating the script processor. latencyHint is expressed in seconds, not milliseconds. Additionally, on some browsers it actually affect the performance and stability of the audio driver. For this reason it has been completely disabled (interactive) and a not has been left for future reference.
2020-10-18Refactor MethodBind to use variadic templatesreduz
Removed make_binders and the old style generated binders.
2020-10-14[HTML5] Add JavaScriptToolsEditorPlugin.Fabio Alessandrelli
A new editor plugin, specific to HTML5, that provide some extra features needed to make the editor usable on that platform. For now, it adds a "Download project sources" option in the "Tool" menu, so the user can download the work done as a zip file (from the browser storage).