summaryrefslogtreecommitdiffstats
path: root/platform/javascript
Commit message (Collapse)AuthorAgeFilesLines
* Optimize StringName usagereduz2021-07-181-1/+1
| | | | | | | | | | | * 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.
* Modernize Display server to use override keywordHendrik Brucker2021-07-161-54/+54
|
* [HTML5] Make threads build the default.Fabio Alessandrelli2021-07-151-1/+1
| | | | Non-threads build are broken anyway.
* [HTML5] Fix build (with module_webxr_enabled=no).Fabio Alessandrelli2021-07-153-12/+11
| | | | | The XR API changed a bit, and it's not just a rename, though probably an easy update for someone who is qualified :).
* Misc cleanup of header includesRémi Verschelde2021-07-151-1/+1
| | | | | Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
* [HTML5] Raise default initial memory to 32 MiB.Fabio Alessandrelli2021-07-131-2/+1
| | | | | | | | | 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.
* Implement the ability to disable classesreduz2021-07-131-2/+2
| | | | | | | * 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.
* [HTML5] Fix JavaScript string parsing with new interface.Fabio Alessandrelli2021-07-071-1/+1
| | | | | Strings are UTF-8 encoded and should be parsed as such, while it was being parsed as a C string before.
* [HTML5] Add option to focus canvas on start.Fabio Alessandrelli2021-06-253-0/+15
| | | | Enabled by default.
* Strip query string when parsing HTTP request line for pathHaoyu Qiu2021-06-251-2/+5
|
* [Net] Makes HTTPClient a custom instance class.Fabio Alessandrelli2021-06-233-103/+141
|
* [Net] Unify HTTPClient request and request_raw.Fabio Alessandrelli2021-06-232-17/+1
|
* Use mouse and joypad enums instead of plain integersAaron Franke2021-06-201-4/+4
| | | | Also MIDIMessage
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-192-17/+17
|
* Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal2021-06-191-5/+4
| | | | | Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
* [HTML5] JS callback functions now returns passed value.Fabio Alessandrelli2021-06-182-1/+25
| | | | | | | | 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.
* Merge pull request #49592 from Faless/js/4.x_fix_sigsRémi Verschelde2021-06-156-10/+13
|\ | | | | [HTML5] Fix build without eval, library functions signatures.
| * [HTML5] Fix JS build without eval.Fabio Alessandrelli2021-06-142-4/+7
| | | | | | | | Also fix download_buffer return type.
| * [HTML5] Fix some JS library signature.Fabio Alessandrelli2021-06-144-6/+6
| |
* | [HTML5] Update eslint and jsdoc dependencies.Fabio Alessandrelli2021-06-142-488/+522
|/
* Rename Reference to RefCountedPedro J. Estébanez2021-06-112-4/+4
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-2/+2
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Fixed missed IDHandler dependency in GodotFetchArthur Bikmullin2021-06-081-1/+1
|
* Add MOUSE_MODE_CONFINED_HIDDENAaron Franke2021-06-031-2/+3
| | | | Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
* Move remaining dummy drivers to servers.Fabio Alessandrelli2021-06-011-1/+1
|
* LinuxBSD now compiles without vulkan/x11.Fabio Alessandrelli2021-06-011-0/+1
|
* Implement shader cachingreduz2021-05-311-3/+3
| | | | | | | | | | | | * Shader compilation is now cached. Subsequent loads take less than a millisecond. * Improved game, editor and project manager startup time. * Editor uses .godot/shader_cache to store shaders. * Game uses user://shader_cache * Project manager uses $config_dir/shader_cache * Options to tweak shader caching in project settings. * Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled). * Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated). * Added shader compression with SMOLV: https://github.com/aras-p/smol-v
* Rename File::get_len() get_length()Marcel Admiraal2021-05-252-6/+6
|
* Tweak dozens of editor property hints for consistencyHugo Locurcio2021-05-251-1/+1
| | | | | | - Update Viewport MSAA property hints to match the currently exposed values. - Add some performance hints to property hints.
* Merge pull request #48928 from Faless/js/4.x_fix_build_after_renameRémi Verschelde2021-05-211-2/+2
|\ | | | | [HTML5] Fix build after KEY_CTRL rename.
| * [HTML5] Fix build after KEY_CTRL rename.Fabio Alessandrelli2021-05-211-2/+2
| |
* | [HTML5] Add easy to use download API.Fabio Alessandrelli2021-05-217-61/+35
|/ | | | | New `JavaScript.download_buffer` method to create a prompt that let the user download a file.
* Merge pull request #48719 from Faless/js/4.x_interfacesRémi Verschelde2021-05-207-172/+724
|\ | | | | [HTML5] Implement Godot <-> JavaScript interface.
| * [HTML5] Implement Godot <-> JavaScript interface.Fabio Alessandrelli2021-05-207-172/+724
| |
* | Fix typos with codespellRémi Verschelde2021-05-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* | [HTML5] Fix GDNative compilation with emcc 2.0.19+Fabio Alessandrelli2021-05-191-0/+1
| | | | | | | | | | | | Add `WARN_ON_UNDEFINED_SYMBOLS=0` for the main module (which defines `godot_js_main` as extern coming from the "side" module, i.e. the main Godot binary).
* | Merge pull request #48168 from LightningAA/control-to-ctrl-4.0Rémi Verschelde2021-05-171-8/+8
|\ \
| * | Rename "Control" key to "Ctrl" and add "_pressed" suffix to all ↵Lightning_A2021-05-071-8/+8
| | | | | | | | | | | | InputEventWithModifiers properties/methods
* | | Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-172-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* | CI: Update JavaScript linter deps with known security vulnerabilitiesRémi Verschelde2021-05-122-21/+20
| | | | | | | | | | jsdoc has no new release so I'm tracking this PR: https://github.com/jsdoc/jsdoc/pull/1906
* | Merge pull request #48543 from Faless/js/4.x_target_fps_fixFabio Alessandrelli2021-05-081-0/+5
|\ \ | | | | | | [HTML5] Fix target_fps when window loses focus.
| * | [HTML5] Fix target_fps when window loses focus.Fabio Alessandrelli2021-05-071-0/+5
| |/ | | | | | | | | | | | | | | We don't get updates when the window is unfocused/minimized, so we must detect the situation where the counted ticks start drifting away resulting in more frames drawn than needed. This commit adds a check to ensure that the target ticks do not drift away more than one second.
* / OS: Remove native video API only implemented on iOSRémi Verschelde2021-05-071-1/+0
|/ | | | | | See discussion in #43811, it was only implemented on iOS and even that implementation was fairly limited. This would best be provided as plugins for Android and iOS without cluttering the shared OS API.
* [HTML5] Use 64KiB chunk size in JS HTTPClient.Fabio Alessandrelli2021-05-061-1/+2
| | | | For consistency with the native one, and the documentation.
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-3/+3
|
* Rename `doubleclick` to `double_click`Aaron Franke2021-05-041-2/+2
|
* [HTML5] Fix builds with recent emscripten versionsFabio Alessandrelli2021-04-301-4/+4
| | | | | Library suffix should be `.a`, the `EXTRA_` in `EXTRA_EXPORTED_RUNTIME_METHODS` is deprecated.
* Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde2021-04-293-15/+15
| | | | Follow-up to #38736 (these uses were likely added after this PR was merged).
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-1/+1
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* [HTML5] Export as Progressive Web App.Fabio Alessandrelli2021-04-272-150/+361
| | | | | | Adds possibility to export as a progressive web app. Allows customizing base icons, display mode, orientation and offline page.