summaryrefslogtreecommitdiffstats
path: root/platform/javascript/api
Commit message (Collapse)AuthorAgeFilesLines
* [Web] Rename JavaScript platform to Web.Fabio Alessandrelli2022-08-295-438/+0
| | | | Also rename export name from "HTML5" to "Web".
* Fix ZipIO crash when reused (and possible leaks).bruvzg2022-05-111-1/+2
|
* [HTML5] Fix JS "tools" editor plugin.Fabio Alessandrelli2022-05-101-1/+1
| | | | Needed update after file/dir access refactoring.
* Narrow FileAccess scope to prevent deadlocks.bruvzg2022-04-121-6/+8
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-11/+6
|
* Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaksRémi Verschelde2022-03-111-1/+1
| | | | | | | | `DirAccess *` needs to be deleted manually, and this is often forgotten especially when doing early returns with `ERR_FAIL_COND`. `DirAccessRef` is deleted automatically when it goes out of scope. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
* 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 most EditorNode constructor parameters and fieldstrollodel2022-02-142-3/+3
|
* [HTML5] Implement JavaScript PWA update callbacks.Fabio Alessandrelli2022-02-062-0/+11
| | | | | | 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.
* Update copyright statements to 2022Rémi Verschelde2022-01-035-10/+10
| | | | 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
* Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_masterRémi Verschelde2021-10-051-1/+2
|\
| * Provide a getter for the project data directory.ne0fhyk2021-09-151-1/+2
| |
* | [HTML5] Fix build error due to missing string cast.Fabio Alessandrelli2021-09-121-2/+2
|/
* Improve the generated ZIP archive name when using Download Project SourceHugo Locurcio2021-08-161-7/+25
| | | | | | This makes for easier organization since downloading a project several times (or several different projects) will result in more meaningful file names.
* 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 JS build without eval.Fabio Alessandrelli2021-06-141-1/+1
| | | | Also fix download_buffer return type.
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-3/+3
|
* 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.
* Rename File::get_len() get_length()Marcel Admiraal2021-05-251-2/+2
|
* [HTML5] Add easy to use download API.Fabio Alessandrelli2021-05-213-2/+13
| | | | | 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-202-5/+51
|\ | | | | [HTML5] Implement Godot <-> JavaScript interface.
| * [HTML5] Implement Godot <-> JavaScript interface.Fabio Alessandrelli2021-05-202-5/+51
| |
* | Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde2021-04-291-10/+10
| | | | Follow-up to #38736 (these uses were likely added after this PR was merged).
* Update copyright statements to 2021Rémi Verschelde2021-01-015-10/+10
| | | | | | | | | | | | | | 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 🎆
* Fix missed renamings from empty() to is_empty()Rémi Verschelde2020-12-291-1/+1
| | | | Those were missed in #44401 or added by later PRs.
* Make tool menu plugins use Callables for callbackkobewi2020-12-162-10/+1
|
* [HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli2020-11-101-19/+6
| | | | | | | | | 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).
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-073-4/+4
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactor MethodBind to use variadic templatesreduz2020-10-181-1/+1
| | | | Removed make_binders and the old style generated binders.
* [HTML5] Add JavaScriptToolsEditorPlugin.Fabio Alessandrelli2020-10-143-0/+217
| | | | | | | | | 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).
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-6/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Update copyright statements to 2020Rémi Verschelde2020-01-013-6/+6
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Added some obvious errors explanationsqarmin2019-09-251-1/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-013-6/+6
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-122-2/+2
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-053-0/+3
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-013-6/+6
| | | | Happy new year to the wonderful Godot community!
* Facilitate exposing platform-exclusive interfaces to all platformsLeon Krause2017-11-183-0/+156
This makes the interfaces available, without implementation, in other platforms and the editor, which facilitates documenting platform-exclusive classes. Platform-exclusive APIs must be set up in platform/<platform>/api/api.cpp. Provide noop method-implementations where necessary. Also setup and document the HTML5 platform's JavaScript singleton.