summaryrefslogtreecommitdiffstats
path: root/platform/javascript
Commit message (Collapse)AuthorAgeFilesLines
...
* Discern between virtual and abstract class bindingsreduz2022-03-101-2/+2
| | | | | | | | | | | | | | * Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
* Remove VARIANT_ARG* macrosreduz2022-03-091-2/+2
| | | | | | | | * Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
* Revert "[HTML5] Fetch API now passes credentials."Rémi Verschelde2022-03-071-1/+0
|
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-163-5/+9
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* HTML5: Fix build after #52742Rémi Verschelde2022-02-161-1/+2
| | | | Fixes #58172.
* Editor: Cleanup some includes dependenciesRémi Verschelde2022-02-153-4/+2
| | | | | | | | | | | Removes some unnecessary includes from `editor_node.h`, and instead add those where they're used. Removes unnecessary `editor_node.h` includes in various editor classes. Renames `dynamicfont` to `dynamic_font` in a couple files. Misc cleanup while jumping through that rabbit hole.
* Merge pull request #58081 from tavurth/bugfix/high-macos-cpu-usageRémi Verschelde2022-02-151-1/+1
|\
| * Fix new performance regressions (short delay_usec)Will Whitty2022-02-151-1/+1
| | | | | | | | | | | | | | | | My Mac was using 20% cpu again, which was related to the Javascript Export plugin. I had however no export templates setup in the project so this is more of a stopgap fix.
* | Remove most EditorNode constructor parameters and fieldstrollodel2022-02-142-3/+3
|/
* Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-122-1/+6
|
* [HTML5] Fetch API now passes credentials.Fabio Alessandrelli2022-02-101-0/+1
| | | | | Used default value before, i.e. "same-origin", now uses "include" (i.e. include for cross-origin if cross-origin is allowed).
* [HTML5] Implement JavaScript PWA update callbacks.Fabio Alessandrelli2022-02-067-0/+97
| | | | | | Allows detecting when a new version of the progressive web app service worker is waiting (i.e. an update is pending), along a function to force the update and reload all clients.
* [HTML5] PWA service worker prefers cached version.Fabio Alessandrelli2022-02-063-23/+40
| | | | | | | | Use an offline first approach, where we prefer the cached version over the network one. This forces games using PWA to always re-export the project and not just the PCK, so that the service worker version gets updated correctly, and the end-user cache is correctly cleared on update.
* Add missing SNAME macro optimization in some function callsjmb4622022-02-062-2/+2
|
* Merge pull request #57341 from bruvzg/win_multiwin_fsRémi Verschelde2022-02-041-1/+2
|\
| * [Windows] Add WS_BORDER flag to windows in WINDOW_MODE_FULLSCREEN mode to ↵bruvzg2022-02-041-1/+2
| | | | | | | | | | | | allow multi-window interface in full-screen. [Windows] Add WINDOW_MODE_EXCLUSIVE_FULLSCREEN without WS_BORDER flag enabled (no multi-window support).
* | Merge pull request #57335 from jordigcs/display-refresh-rateRémi Verschelde2022-02-042-0/+5
|\ \ | |/ |/|
| * Add screen_get_refresh_rate to DisplayServerjordi2022-02-032-0/+5
| |
* | Revert "[HTML5] Better engine config parsing."Fabio Alessandrelli2022-02-031-21/+22
| | | | | | | | | | | | | | This reverts commit 2f509f1b12c33234a0d8f0e254c727fd92e57720. Breaks closure compiler builds. And adds a warning for future readers.
* | Merge pull request #56771 from mhilbrunner/unacceptableFabio Alessandrelli2022-02-021-0/+5
|\ \ | | | | | | Verify custom HTTP headers, fix off by one error
| * | Verify custom HTTP headers, fix off by one errorMax Hilbrunner2022-01-271-0/+5
| |/
* | [HTML5] Fix gamepad samples not being properly reset.Fabio Alessandrelli2022-01-311-1/+1
| |
* | [HTML5] Better engine config parsing.Fabio Alessandrelli2022-01-311-20/+21
|/
* Merge pull request #56754 from madmiraal/fix-45592Rémi Verschelde2022-01-241-3/+0
|\
| * Use mouse event relative motion to calculate mouse velocityMarcel Admiraal2022-01-131-3/+0
| |
* | Merge pull request #57074 from Faless/net/4.x_http_client_64Fabio Alessandrelli2022-01-232-2/+2
|\ \ | | | | | | [Net] Fix get_response_body_length for large files.
| * | [Net] Fix get_response_body_length for large files.Fabio Alessandrelli2022-01-232-2/+2
| | | | | | | | | | | | Parsing was fixed, but not the return value for the exposed getter.
* | | Add local web server configuration designed for web editor developmentHugo Locurcio2022-01-203-7/+3567
|/ / | | | | | | | | | | | | | | | | | | 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.
* | Force threads when compiling web editor instead of erroring outHugo Locurcio2022-01-191-3/+3
| | | | | | | | | | This makes the build process more seamless. A similar option is already forced for initial memorywhen needed.
* | Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde2022-01-173-5/+4
|\ \
| * | [Windows] Improve console handling and execute/create_process.bruvzg2021-12-183-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Remove property hints referencing unsupported svgz extensionRémi Verschelde2022-01-171-3/+3
| | | | | | | | | | | | | | | The wrongly claimed support for it was removed in #49645. See also #56862.
* | | Fix Actions mapped to triggers not using the full rangeMarcel Admiraal2022-01-141-11/+3
| |/ |/|
* | Merge pull request #56322 from madmiraal/fix-42450Rémi Verschelde2022-01-111-1/+1
|\ \
| * | Rename speed to velocity when it's a directional VectorMarcel Admiraal2021-12-291-1/+1
| |/
* | Fix multiple missing UTF-8 decoding.bruvzg2022-01-061-2/+2
| |
* | Fix decoding UTF-8 filenames on unzipping.bruvzg2022-01-051-1/+1
| |
* | Update copyright statements to 2022Rémi Verschelde2022-01-0333-66/+66
| | | | | | | | Happy new year to the wonderful Godot community!
* | Fix various typosluz paz2022-01-021-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-3/+3
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Fix files_dropped in HTML5 export.Luis Sanchez2021-12-031-1/+1
| | | | (Ignore trailing slash when creating the temporary directory)
* [HTML5] Fix multi-touch input handling.Fabio Alessandrelli2021-11-301-3/+3
| | | | | | The code to populate the input data for WebAssembly was incorrectly overriding values when multiple touches were present due to wrong indexing.
* [HTML5] Use absolute path for JS lib/pre/externs.Fabio Alessandrelli2021-11-261-3/+3
| | | | | | | | 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.
* [HTML5] Fix focus (again) in Firefox's iframes.Fabio Alessandrelli2021-11-261-2/+6
| | | | | | | | 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.
* [HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.Fabio Alessandrelli2021-11-194-64/+67
| | | | | | | 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.
* Merge pull request #54499 from Faless/threads/4.x_work_pool_defaultRémi Verschelde2021-11-191-0/+1
|\
| * [OS] Add ThreadWorkPool default size to OS.Fabio Alessandrelli2021-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | [HTML5] Add checks to Gamepad API events.Fabio Alessandrelli2021-11-191-2/+6
| | | | | | | | | | | | 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.
* | [HTML5] Fix input not focusing canvas.Fabio Alessandrelli2021-11-191-0/+6
| | | | | | | | | | mousedown and touchstart should focus the canvas to ensure correct application lifecycle.
* | Use "enum class" for input enumsAaron Franke2021-11-123-38/+39
| |