summaryrefslogtreecommitdiffstats
path: root/platform/javascript/export/export.cpp
Commit message (Collapse)AuthorAgeFilesLines
* HTML5: Code style cleanup for export codeRémi Verschelde2020-12-101-15/+8
|
* [HTML5] Make GDNative support feature-based.Fabio Alessandrelli2020-12-051-0/+6
| | | | | This is suboptimal as it requires adding an extra compile flag, but rewriting how feature tags work is beyond the scope of this work.
* [HTML5] Allow selecting the export type.Fabio Alessandrelli2020-12-051-8/+32
| | | | | | | Available types: - Regular - GDNative (support dynamic linking and thus GDNative WASM files) - Threads (uses WebAssembly Threads)
* [HTML5] EditorRunNative works with GDNative.Fabio Alessandrelli2020-12-051-15/+45
| | | | | | This "breaks" our loading bar logic (libraries are not counted). Fixing it is non trivial and probably deserves investigating a different strategy.
* Export: Reorder options for consistency across platformsRémi Verschelde2020-11-201-2/+4
|
* [HTML5] AudioWorklet API implementation.Fabio Alessandrelli2020-11-101-0/+7
| | | | | | | | | | | | Rewrote AudioDriverJavaScript to support multiple processor nodes. The old (and deprecated) ScriptProcessorNode when threads are not available, and the new AudioWorklet API when threads are enabled. The new implementation uses two ring buffers and a shared state to communicated with the AudioWorklet thread. The audio.worklet.js JavaScript file is always added to the export template, but only really used (and downloaded) in the thread build.
* Add COOP/COEP headers to HTML5 "run" server.Fabio Alessandrelli2020-10-021-0/+3
| | | | | | This allow the page to be considered a SecureContext if the address is localhost (127.0.0.1/::1) and let Firefox (and future Chrome versions) enable extra features needed for the HTML5 threaded export.
* Make canvas resize optional in HTML5.Fabio Alessandrelli2020-09-231-0/+2
|
* Add override keywords.Marcel Admiraal2020-07-101-18/+18
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-8/+14
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-27/+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.
* Add WebSocket debugger, use it for Javascript.Fabio Alessandrelli2020-05-121-4/+12
|
* Set the `title` tag in the HTML5 export immediatelyHugo Locurcio2020-04-221-0/+1
| | | | | This makes the project title display without having to wait for the project to finish loading.
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|
* [HTML5] Refactor JS, threads support, closures.Fabio Alessandrelli2020-03-111-0/+8
| | | | | | | | | | - Refactored the Engine code, splitted across files. - Use MODULARIZE option to build emscripten code into it's own closure. - Enable lto support (saves ~2MiB in release). - Enable optional closure compiler pass for JS and generated code. - Enable optional pthreads support. - Can now build with tools=yes (not much to see yet). - Dropped some deprecated code for older toolchains.
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-14/+13
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Remove obsolete GLES3 backendRémi Verschelde2020-02-131-4/+2
| | | | | | | | | | | | | | Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
* Texture refactorJuan Linietsky2020-02-111-4/+4
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Export and reference the icon as favicon when exporting to HTML5Hugo Locurcio2020-02-011-15/+40
| | | | | | This makes the project icon display immediately as a favicon when opening the page, without having to wait for the project to finish loading.
* Properly close files served by debug HTTP server.Fabio Alessandrelli2020-01-141-2/+9
|
* Add mime type to responses from debug HTTP server.Fabio Alessandrelli2020-01-141-0/+7
| | | | | Get rid of warnings in firefox mentioning performance loss when no mime type is given for wasm files.
* Export: Improve usability of command line interfaceRémi Verschelde2020-01-071-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm barely scratching the surface of the changes needed to make the --export command line interface easy to use, but this should already improve things somewhat. - Streamline `can_export()` templates check in all platforms, checking first for the presence of official templates, then of any defined custom template, and reporting on the absence of any. Shouldn't change the actual return value much which is still true if either release or debug is usable - we might want to change that eventually and better validate against the requested target. - Fix discrepancy between platforms using `custom_package/debug` and `custom_template/debug` (resp. `release`). All now use `custom_template`, which will break compatibility for `export_presets.cfg` with earlier projects (but is easy to fix). - Use `can_export()` when attempting a command line export and report the same errors that would be shown in the editor. - Improve error reporting after a failed export attempt, handling missing template and invalid path more gracefully. - Cleanup of unused stuff in EditorNode around the export workflow. - Improve --export documentation in --help a bit. Fixes #16949 (at least many of the misunderstandings listed there). Fixes #18470.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Implement HTTP server for HTML5 exportFabio Alessandrelli2019-10-231-8/+220
| | | | | | | | Since most browsers no longer allow making async requests from a page loaded from `file://`, we now need a proper HTTP server to load the exported HTML5 game. This should also allow us to get the debugger to work over a WebSocket connection.
* Improve EditorExportPlatform interface.Fabio Alessandrelli2019-10-231-8/+8
| | | | | Convert all get_device* methods to get_option* and normalize their usage as icon, label, tooltip.
* Remove dependency on the editor directory being in the build's include path.Marcel Admiraal2019-10-101-1/+1
| | | | | | | - Add or remove the necessary subdirectorires to the includes to remove dependency on the editor directory being in the build's include path. - Ensure includes in modified files conform to style guideline. - Remove editor from the build include path.
* Export: Remove temp files from cache after exportRémi Verschelde2019-08-121-2/+11
| | | | | | | | | So far we left most temporary files lying around, so this attempts to fix that. I added a helper method to DirAccess to factor out the boilerplate of creating a DirAccess, checking if the file exists, remove it or print an error on failure.
* Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-191-1/+1
|
* HTML5: Fix ETC export for GLES2 fallback on mobileRémi Verschelde2019-03-111-0/+3
|
* Fix directory check when exporting projectvolzhs2019-03-061-1/+1
| | | | Fix #26702
* Merge pull request #26626 from rluders/misleading-error-message-exportRémi Verschelde2019-03-051-0/+4
|\ | | | | Fixing misleading error message when trying to export
| * Fixes misleading error message when trying to exportRicardo Lüders2019-03-051-0/+4
| | | | | | | | | | | | | | This patch fixes the misleading error message when users try to "export all" into an invalid destination path. Closes #26539
* | Fix HTML5 quick preview URLbruvzg2019-03-051-1/+1
|/
* Improve VRAM texture compression checks for mobile/webRémi Verschelde2019-03-031-14/+19
| | | | | | | | | | | For HTML5, we need to support S3TC if running on desktop, and ETC or ETC2 for mobile, so make this explicit. Add logic to check for ETC2 support on GLES3, and remove incorrect ETC feature for GLES3 on Android. Fix ETC check invalidating templates on HTML5. Fixes #26476.
* -Properly handle missing ETC support on exportJuan Linietsky2019-02-261-0/+6
| | | | | -Added ability for resource importers to save metadata -Added ability for resource importers to validate depending on project settings
* ExportDialog: Make error messages translatableRémi Verschelde2019-01-211-2/+2
| | | | Also fix missing newlines that caused #24202.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Export for OS X on OS X now lets you select .dmg or .zipMarcelo Fernandez2018-11-011-3/+5
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | 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.
* Fix file hintsMarcin Zawiejski2018-08-231-3/+3
| | | | Fixes file hints so the file dialog actually displays the files with given extension (e.g. *.apk).
* BPTC supportelasota2018-08-211-0/+3
|
* fix Android/HTML5 custom templates option does not workAlessandro2018-08-201-6/+27
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Use local path for custom HTML5 shell exportLeon Krause2018-05-101-1/+1
|
* HTML export: Make s3tc the standard Texture Formatx12122018-01-201-3/+3
|
* Fix HTML5 feature tagsLeon Krause2018-01-121-2/+2
| | | | | | | 'HTML5' is the platform tag, the 'JavaScript' tag indicates availability of the JavaScript.eval singleton. Also report texture compression support.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Fixed missing parenthesisArtem Varaksa2018-01-041-1/+1
|
* Add missing translation in Javascript export dialogRémi Verschelde2018-01-041-9/+9
| | | | Also remove newlines from translated strings.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!