summaryrefslogtreecommitdiff
path: root/platform/javascript
AgeCommit message (Collapse)Author
2022-01-24Merge pull request #56754 from madmiraal/fix-45592Rémi Verschelde
2022-01-23Merge pull request #57074 from Faless/net/4.x_http_client_64Fabio Alessandrelli
[Net] Fix get_response_body_length for large files.
2022-01-23[Net] Fix get_response_body_length for large files.Fabio Alessandrelli
Parsing was fixed, but not the return value for the exposed getter.
2022-01-20Add local web server configuration designed for web editor developmentHugo Locurcio
Running `npm run serve` in `platform/javascript/` will start a web server that uses `bin/` as its root folder. This means you can extract a compiled web editor ZIP in this folder and immediately be able to test the web editor. Headers required for the use of SharedArrayBuffer are automatically added to every response.
2022-01-19Force threads when compiling web editor instead of erroring outHugo Locurcio
This makes the build process more seamless. A similar option is already forced for initial memorywhen needed.
2022-01-17Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde
2022-01-17Remove property hints referencing unsupported svgz extensionRémi Verschelde
The wrongly claimed support for it was removed in #49645. See also #56862.
2022-01-14Fix Actions mapped to triggers not using the full rangeMarcel Admiraal
2022-01-13Use mouse event relative motion to calculate mouse velocityMarcel Admiraal
2022-01-11Merge pull request #56322 from madmiraal/fix-42450Rémi Verschelde
2022-01-06Fix multiple missing UTF-8 decoding.bruvzg
2022-01-05Fix decoding UTF-8 filenames on unzipping.bruvzg
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix various typosluz paz
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
2021-12-29Rename speed to velocity when it's a directional VectorMarcel Admiraal
2021-12-18[Windows] Improve console handling and execute/create_process.bruvzg
Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-03Fix files_dropped in HTML5 export.Luis Sanchez
(Ignore trailing slash when creating the temporary directory)
2021-11-30[HTML5] Fix multi-touch input handling.Fabio Alessandrelli
The code to populate the input data for WebAssembly was incorrectly overriding values when multiple touches were present due to wrong indexing.
2021-11-26[HTML5] Use absolute path for JS lib/pre/externs.Fabio Alessandrelli
Ensure better compatibility when emcc which may run some tools from different paths (e.g. closure compiler). This fixes externs include issues with modern emcc using the closure compiler.
2021-11-26[HTML5] Fix focus (again) in Firefox's iframes.Fabio Alessandrelli
This actually makes sense(?), when running inside an iframe the active element might be our canvas, while the iframe itself is not active in the parent window. Since we consume the event, the iframe does not get focused in Firefox (but does in Chromium-based browsers), so we must always call focus to handle such occasions.
2021-11-19[HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.Fabio Alessandrelli
Note, the editor build requires the mbedtls module to be manually enabled, as it is currently needed as a ResourceUID dependency. This will need to be addressed in a separate PR.
2021-11-19Merge pull request #54499 from Faless/threads/4.x_work_pool_defaultRémi Verschelde
2021-11-19[HTML5] Add checks to Gamepad API events.Fabio Alessandrelli
In some conditions the events might be generated even when the `gamepad` object is not accessible due to Security Context requirements. This commit adds a check to avoid firing the handler in those cases.
2021-11-19[HTML5] Fix input not focusing canvas.Fabio Alessandrelli
mousedown and touchstart should focus the canvas to ensure correct application lifecycle.
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-12Modules: Make sure to include modules_enabled.gen.h where neededRémi Verschelde
2021-11-02[OS] Add ThreadWorkPool default size to OS.Fabio Alessandrelli
Some platforms (*cough* web *cough*) have hard limits on the number of threads that can be spawned. Currently, ThreadPoolWork (mostly used in rendering/physics servers) will spawn as many threads as CPUs available causing exception on machines with high CPU count. This commit adds a new overridable method to OS that returns the default thread pool size (still the CPU count by default), and overrides it for the JavaScript platform so it always allocate only one thread. We can likely improve the whole ThreadPoolWork in the future to always allocate X amount of threads, and assign jobs to them on the fly, but that will require some more architectural changes.
2021-11-01Fix new projects always being created with OpenGLHugo Locurcio
Only Vulkan is fully implemented for now, so OpenGL isn't available in the project manager yet. This also makes the rendering driver checks use lowercase names everywhere for consistency.
2021-10-31Use OpenGL 3.3 core profile instead of compatibility profileClay John
- Rename OpenGL to GLES3 in the source code per community feedback. - The renderer is still exposed as "OpenGL 3" to the user. - Hide renderer selection dropdown until OpenGL support is more mature. - The renderer can still be changed in the Project Settings or using the `--rendering-driver opengl` command line argument. - Remove commented out exporter code. - Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-30Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio
- Use lowercase driver names for the `--rendering-driver` command line argument.
2021-10-30Add GLES2 2D renderer + Linux display managerlawnjelly
First implementation with Linux display manager. - Add single-threaded mode for EditorResourcePreview (needed for OpenGL). Co-authored-by: clayjohn <claynjohn@gmail.com> Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
2021-10-22JS: Bump ansi-regex version for linterRémi Verschelde
Silences warning about a moderate security vulnerability (which doesn't affect us).
2021-10-15SCons: Set `DEBUG_ENABLED` and `DEV_ENABLED` in SConstructRémi Verschelde
They're the same for all platforms so they don't need to be repeated in all platform definitions.
2021-10-14SCons: Add `DEV_ENABLED` defines for `target=debug` buildsRémi Verschelde
This will allow adding developer checks which will be fully compiled out in user builds, unlike `DEBUG_ENABLED` which is included in debug tempates and the editor builds. This define is not used yet, but we'll soon add code that uses it, and change some existing `DEBUG_ENABLED` checks to be performed only in dev builds. Related to godotengine/godot-proposals#3371.
2021-10-12Fix some LGTM errors of "Multiplication result converted to larger type"Aaron Franke
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.