summaryrefslogtreecommitdiffstats
path: root/platform/javascript/export
Commit message (Collapse)AuthorAgeFilesLines
* Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-163-6/+6
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Fix ZipIO crash when reused (and possible leaks).bruvzg2022-05-111-1/+2
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-112-31/+16
|
* Fix some issues found by cppcheck.bruvzg2022-04-061-1/+1
|
* HTML5: Explain why export templates are missingRémi Verschelde2022-03-261-0/+9
| | | | | | | Same for UWP. This is skipped in DEV_ENABLED builds so contributors can still test the export pipeline (and CI still compiles it on debug builds).
* Implement GDExtension export plugin.bruvzg2022-03-161-1/+1
|
* Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaksRémi Verschelde2022-03-111-11/+11
| | | | | | | | `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>
* 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.
* 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.
* Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-122-1/+6
|
* [HTML5] PWA service worker prefers cached version.Fabio Alessandrelli2022-02-061-23/+29
| | | | | | | | 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
|
* 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 decoding UTF-8 filenames on unzipping.bruvzg2022-01-051-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-035-10/+10
| | | | Happy new year to the wonderful Godot community!
* 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 new projects always being created with OpenGLHugo Locurcio2021-11-011-2/+2
| | | | | | | | 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.
* Use OpenGL 3.3 core profile instead of compatibility profileClay John2021-10-312-673/+1
| | | | | | | | | | - 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.
* Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio2021-10-302-2/+2
| | | | | - Use lowercase driver names for the `--rendering-driver` command line argument.
* Add GLES2 2D renderer + Linux display managerlawnjelly2021-10-301-0/+672
| | | | | | | | | 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>
* clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-1/+1
| | | | | | | | | 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`.
* Use range iterators for `Map`Lightning_A2021-09-301-2/+2
|
* Make platform feature tag names lowercaseHugo Locurcio2021-08-311-1/+1
| | | | | | | | | | | | | | Feature tag names are still case-sensitive, but this makes built-in feature tags more consistent. - `Windows` -> `windows` - `OSX` -> `osx` - `LinuxBSD` -> `linuxbsd` - `Android` -> `android` - `iOS` -> `ios` - `HTML5` -> `html5` - `JavaScript` -> `javascript` - `UWP` -> `uwp`
* Split javascript export template into multiple filesSergey Minakov2021-08-125-964/+1081
|
* [HTML5] Add option to focus canvas on start.Fabio Alessandrelli2021-06-251-0/+2
| | | | Enabled by default.
* Strip query string when parsing HTTP request line for pathHaoyu Qiu2021-06-251-2/+5
|
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-9/+9
|
* Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal2021-06-191-5/+4
| | | | | Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-1/+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-251-4/+4
|
* 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.
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-3/+3
|
* Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde2021-04-291-2/+2
| | | | Follow-up to #38736 (these uses were likely added after this PR was merged).
* [HTML5] Export as Progressive Web App.Fabio Alessandrelli2021-04-271-148/+339
| | | | | | 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.
* Style: Apply clang-tidy's `modernize-use-nullptr`Rémi Verschelde2021-04-051-1/+1
|
* [HTML5] Opt-in virtual keyboard support.Fabio Alessandrelli2021-03-111-0/+2
| | | | | | | | | | | | | | | Added as an export option "Experimental Virtual Keyboard". There is no zoom, so text/line edit must be in the top part of the screen, or it will get hidden by the virtual keyboard. UTF8/Latin-1 only (I think regular UTF-8 should work out of the box in 4.0 but I can't test it). It uses an hidden textarea or input, based on the multiline variable, and only gets activated if the device has a touchscreen. This could cause problems on devices with both touchscreen and a real keyboard (although input should still work in general with some minor focus issues). I'm thinking of a system to detect the first physical keystroke and disable it in case, but it might do more harm then good, so it must be well thought.
* [HTML5] Export process writes sizes in template.Fabio Alessandrelli2021-03-051-16/+30
| | | | | | This allow the loading bar to be much more reliable, even in cases where realible stream loading status is not detectable (server-side compression, chunked encoding).
* [HTML5] Better fullscreen, canvas resizing.Fabio Alessandrelli2021-02-191-2/+2
| | | | | | | | | | | Three canvas resize policies: - `None`: Godot window settings are ignored. - `Project`: Godot handles the canvas like a native app (resizing it when setting the window size). - `Adaptive`: Canvas size will always adapt to browser window size. Use `None` if you want to control the canvas size with custom JavaScript code.
* [HTML5] Easier HTML templates, better deinit/cleanup.Fabio Alessandrelli2021-02-191-11/+16
|
* Reorganize Project Settingsreduz2021-02-181-1/+1
| | | | | | | -Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
* Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde2021-01-311-4/+3
|\ | | | | Modernize Thread
| * Modernize ThreadPedro J. Estébanez2021-01-291-4/+3
| | | | | | | | | | | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* | [HTML5] Builtin HTTP server disable browsers cacheFabio Alessandrelli2021-01-251-0/+1
|/ | | | | We don't want browsers to cache our temporary exports (since they will always differ).
* Update copyright statements to 2021Rémi Verschelde2021-01-012-4/+4
| | | | | | | | | | | | | | 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 🎆