summaryrefslogtreecommitdiffstats
path: root/platform/javascript
Commit message (Collapse)AuthorAgeFilesLines
...
* [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.
* [HTML5] HTTP server uses optional SSL.Fabio Alessandrelli2021-04-271-12/+88
| | | | | | | | | | | | | Generates a key/cert snakeoil pair or use a custom SSL cert/key. This is of course false security, and potentially detrimental for it. But, so long, those are the requirements browser vendors agreed on to use things like the Gamepad API, and more advanced topics like wasm threads. You don't need this if you run on localhost (at least!), but you do need this (or a much safer nginx proxy) to try those things on your local network (e.g. when debugging a phone, networking, etc).
* [HTML5] Optional icon generation, use export name for it.Fabio Alessandrelli2021-04-271-13/+24
| | | | | | | | We used to only generate the favicon if it was specified in the user project settings, now it's optional, will export it to `NAME.icon.png`, (falling back to the default project icon if none is set in project settings), and the `<link>` tag is added using the `$HEAD_INCLUDE` instead of being hardcoded in the template.
* [HTML5] Debug HttpServer now runs in `web` cache subdir.Fabio Alessandrelli2021-04-271-41/+31
| | | | | Serving all files in that folder and using a known list of mime types. Makes it easy to add more exported files, while still playing safe.
* [JS, Android] Re-add "no-exceptions" for export templates builds with ICU.bruvzg2021-04-201-1/+2
|
* [HTML5] Implement WebGL fallback.Fabio Alessandrelli2021-04-062-0/+12
| | | | | According to project settings and when WebGL2 is not available. This does nothing in current master, as we have no rendering yet!
* Style: Apply clang-tidy's `modernize-use-nullptr`Rémi Verschelde2021-04-051-1/+1
|
* [HTML5] Disable body_size in fetch.Fabio Alessandrelli2021-04-032-29/+1
| | | | | | | | | | | | | | We were using `Content-Length` from the server when `Content-Encoding` was not set (i.e. response was not compressed). Sadly, in CORS requests accessing headers is restricted, and while `Content-Length` is enabled by default, `Content-Encoding` is not. This results in the impossibility of knowing if the content was compressed, unless the server explicitly enabled the encoding header via `Access-Control-Expose-Headers`. To keep maximum compatibility we must disable `body_size` completely.