summaryrefslogtreecommitdiffstats
path: root/platform/javascript
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete GLES3 backendRémi Verschelde2020-02-132-43/+10
| | | | | | | | | | | | | | 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!
* Fix startGame's logic in engine.js.Relintai2020-02-121-4/+2
|
* Custom material support seems complete.Juan Linietsky2020-02-111-1/+1
|
* Texture refactorJuan Linietsky2020-02-113-6/+6
| | | | | | | | -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
* Allow per pixel transparency in javascript platformmuiroc2020-02-102-1/+24
|
* Merge pull request #35381 from Calinou/html5-export-faviconFabio Alessandrelli2020-02-081-15/+40
|\ | | | | Export and reference the icon as favicon when exporting to HTML5
| * 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.
* | Fix javascript platform buildmuiroc2020-02-071-1/+1
| |
* | Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
| |
* | Merge pull request #35451 from Calinou/html5-web-environment-onlyRémi Verschelde2020-01-311-0/+5
|\ \ | | | | | | Only emit the JavaScript support code for Web when building for HTML5
| * | Only emit the JavaScript support code for Web when building for HTML5Hugo Locurcio2020-01-311-0/+5
| | | | | | | | | | | | | | | Excluding other unused environments like Node.js makes the support code about 4 KB smaller.
* | | Fix some URLs to use HTTPS when availableRémi Verschelde2020-01-292-3/+5
| | |
* | | Make `OS.execute()` blocking by default if not specifiedHugo Locurcio2020-01-231-1/+1
|/ / | | | | | | | | This makes `OS.execute()` calls quicker to set up when calling programs in a blocking fashion.
* / Revert "Fix audio capture naming in Javascript"Rémi Verschelde2020-01-201-2/+4
|/ | | | | | This reverts commit 69f7263cd8990b39e4c1cc678b2d0f57686b07b7. Follow-up to #35359.
* HTML5 callbacks rework.Fabio Alessandrelli2020-01-171-31/+37
| | | | | | | | | | | | | | Fixes compatibility with emscripten 1.39.5+ . Most input callbacks now require a target and no longer support NULL defaults. This commit changes all required null targets to the expected default in the binding phase. Since for canvas-related callbacks there is no default, the "#canvas" selector is used instead. Additionally, since canvasX and canvasY event properties are no longer supported, event positions are computed from "clientX" and "clientY" and the "#canvas" bounding client rect.
* HTML5: Address removal of 'timestamp' in Emscripten 1.39.5Rémi Verschelde2020-01-172-2/+3
| | | | | | | | | | | | | | | It was removed as noted in the changelog: https://github.com/emscripten-core/emscripten/blob/1.39.5/ChangeLog.md#v1395-12202019 > Removed `timestamp` field from mouse, wheel, devicemotion and > deviceorientation events. The presence of a `timestamp` on these > events was slightly arbitrary, and populating this field caused > a small profileable overhead that all users might not care about. > It is easy to get a timestamp of an event by calling > `emscripten_get_now()` or `emscripten_performance_now()` inside > the event handler function of any event. Fixes #34648.
* 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-0117-33/+33
| | | | | | | | | | | 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.
* Emscripten: Re-add BINARYEN_TRAP_MODE='clamp' for fastcompRémi Verschelde2019-12-031-0/+7
| | | | | | | | The option is needed when using the 'fastcomp' backend (default before 1.39.0), and must not be defined when using 'upstream' (new default). So we define it conditionally to support both backends. Follow-up to #30751.
* iOS modular build and export implementation.bruvzg2019-12-012-6/+0
|
* Add download_chunk_size property to HTTPRequest.Fabio Alessandrelli2019-11-241-0/+4
| | | | | | This allows setting the `read_chunk_size` of the internal HTTPClient. This is important to reduce the allocation overhead and number of file writes when downloading large files, allowing for better download speed.
* pcre2: Use scons option to disable JIT on some platformsRémi Verschelde2019-11-201-0/+1
| | | | | | | | Third-party platforms (e.g. console ports) need to be able to disable JIT support in the regex module too, so it can't be hardcoded in the module SCsub. This is cleaner this way anyway. Fixes #19316.
* HTML5: Explicitly link idbfs.js for IDBFS supportRémi Verschelde2019-11-191-0/+4
| | | | | | | | | | Upstream Emscripten changed this in 1.39.1+, so IDBFS is no longer included by default and has to be linked manually. The explicit linking doesn't seem to be problematic on earlier versions (tested `1.38.47-upstream`). Fixes #33724.
* HTML5: Fix support for Emscripten 1.39.1+Rémi Verschelde2019-11-151-4/+1
| | | | | | | | | | | | | | | | | | | | | A change in upstream Emscripten 1.39.1+ made our buildsystem error out where it was previously only issuing a warning: ``` [ 5%] Linking Static Library ==> main/libmain.javascript.opt.bc shared:WARNING: Assuming object file output in the absence of `-c`, based on output filename. Please add with `-c` or `-r` to avoid this warning Ranlib Library ==> main/libmain.javascript.opt.bc /opt/emsdk/upstream/bin/llvm-ranlib: error: unable to load 'main/libmain.javascript.opt.bc': file too small to be an archive ``` As advised on emscripten-core/emscripten#9806, we should be using `emar` here to create the static library and not `emcc`. This was apparently done to workaround Emscripten issues in the past, but evidently this is no longer necessary. The rest of the `env` redefinitions should probably be re-assessed against the current state of Emscripten. Fixes #33374.
* Remove ECMAScript 6 "arrow operator".Fabio Alessandrelli2019-10-241-1/+1
| | | | | We don't need it, it's not well supported by compilers, and it was a mistake in the first place.
* 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.
* Optimize images losslessly using `oxipng -o6 --strip all --zopfli`Hugo Locurcio2019-10-121-0/+0
|
* 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.
* Properly revert cursor when using set_custom_mouse_cursor with nullPouleyKetchoupp2019-10-031-0/+2
| | | | Fixes #32486
* Fixed running the export templates with newer emscripten versions.Relintai2019-10-011-8/+5
|
* Added some obvious errors explanationsqarmin2019-09-251-1/+1
|
* https://github.com/godotengine/godot/issues/31297 - HTML5: ↵mellondill2019-08-121-0/+3
| | | | | | this.rtenv.callMain is not a function when using latest-upstream backend Added needed changed for normal compiling with emscripten 1.38.41 and later
* 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.
* Fix audio capture naming in JavascriptSaracen2019-08-091-4/+2
|
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-092-26/+14
| | | | "modules/gdnative", "modules/gdscript" directories.
* Emscripten: Do not define BINARYEN_TRAP_MODE='clamp'Rémi Verschelde2019-07-221-1/+0
| | | | | | | | It is not supported in Emscripten's `latest-upstream` LLVM backend, and doesn't seem necessary in the `latest` backend either. It was initially added in #22857 to solve a compilation error with the latter. Part of #30270.
* Merge pull request #30465 from guilhermefelipecgs/cursor_blinkingRémi Verschelde2019-07-102-0/+18
|\ | | | | Fix cursor blinking in integrated GPUs
| * Fix cursor blinking in integrated GPUsGuilherme Felipe2019-07-092-0/+18
| | | | | | | | | | Optimization for Input::set_custom_mouse_cursor when used inside _process function. (Avoids cursor blinking in low end devices)
* | Better detect Emscripten toolchain.Fabio Alessandrelli2019-07-091-2/+7
|/ | | | | | | | | | | | | | | | | Emscripten is apparently changing the variables in its config file, causing potential breakage of our build system. Binaries of the latest/latest-upstream releases are located in a subfolder of BINARYEN_ROOT called emscripten. Binaries of the other releases (e.g. sdk-1.38.31-64bit) are instead placed under the EMSCRIPTEN_ROOT folder. This PR checks if BINARYEN_ROOT has a subfolder called emscripten, if that does not exists, it falls back to checking the EMSCRIPTEN_ROOT. This way we give precedence to the new releases, given that activating multiple releases sequentially might result in having mismatching BINARYEN_ROOT and EMSCRIPTEN_ROOT.
* Merge pull request #29482 from Calinou/html5-fix-emscripten-rootRémi Verschelde2019-07-011-3/+3
|\ | | | | Fix Emscripten root directory detection when building for HTML5
| * Fix Emscripten root directory detection when building for HTML5Hugo Locurcio2019-06-191-3/+3
| | | | | | | | | | | | Recent Emscripten SDK versions seem to only include the `BINARYEN_ROOT` variable in the Emscripten configuration file, whereas the platform's `detect.py` only looked at `EMSCRIPTEN_ROOT`.
* | Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-191-1/+1
| |
* | Add script to fix style issues and copyright headersRémi Verschelde2019-06-171-1/+1
| | | | | | | | | | This is only meant to check the validity of the whole codebase every now and then, or to apply clang-format config changes when relevant.
* | Merge pull request #10643 from BastiaanOlij/camera_serverRémi Verschelde2019-06-162-0/+6
|\ \ | | | | | | CameraServer class
| * | Adding a new Camera Server implementation to Godot.BastiaanOlij2019-06-152-0/+6
| | | | | | | | | | | | | | | | | | This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server. Other parts of Godot can interact with this to obtain images from the camera as textures. This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
* | | Merge pull request #29786 from dotdigitalgroup/hidpi-javascript-fix-masterRémi Verschelde2019-06-151-4/+18
|\ \ \ | | | | | | | | Fix pointer position in hidpi-corrected resolutions on web
| * | | Fix pointer position in hidpi-corrected resolutions on webLeonardo Giovanni Scur2019-06-141-4/+18
| |/ /