summaryrefslogtreecommitdiffstats
path: root/platform/javascript
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |/ /
* / / Fix compilation warnings in JS and Windows buildsRémi Verschelde2019-06-151-1/+1
|/ / | | | | | | | | | | | | | | | | | | Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0. JS can now build with `werror=yes warnings=extra`. MinGW64 still has a few warnings to resolve with `warnings=extra`, and only one with `warnings=all`. Part of #29033 and #29801.
* / Fix error macro calls not ending with semicolonRémi Verschelde2019-06-111-1/+1
|/ | | | | | | It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
* Implement Clipboard API read when supported.Fabio Alessandrelli2019-05-292-0/+18
| | | | | | | Being async, the first time a value is pasted GUI elements will still return the previous one. This at least until 'clipboardchange' window event gets implemented by user agents.
* Kinda working HTML5 clipboard paste.Fabio Alessandrelli2019-05-291-0/+10
| | | | | | | | | | | | | | | | Listen to paste events to update local clipboard. CTRL+V still not working out of the box. To do that, We would need to change how we handle keypress, most likely making it worse and less safe. In the end, I'm not sure we can fix it properly for now. Maybe in the future, with the Clipboard API, support of which is still pretty limited on chrome, and only available to extensions in Firefox. For now, you can paste via: - Browser bar -> Edit -> Paste. - Middle mouse click (Linux only, copies secondary clipboard). And THEN press CTRL+V
* Add OS clipboard set support to OS JavascriptFabio Alessandrelli2019-05-282-0/+21
|
* Merge pull request #29032 from akien-mga/tools-exceptions-rttiRémi Verschelde2019-05-211-4/+6
|\ | | | | SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
| * SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools buildRémi Verschelde2019-05-201-4/+6
| | | | | | | | | | | | | | | | | | | | Those were disable to keep size small, and on Android avoid the dependency on the STL, but for tools build (editor) this is not really a concern. Note: as of today it's not possible to build tools=yes for those platforms, but this change is one of the necessary steps to enable it. Fixes #25262.
* | added a const keyword for a methods that return constant literal...hbina0852019-05-212-2/+2
|/
* Fix OS_Javascript execute methodFabio Alessandrelli2019-05-152-2/+2
| | | | | | Signature was changed in OS via: cd4449e7abe97b2bc883e2d182db2cc41eb35f8c
* SCons: Always use env.Prepend for CPPPATHRémi Verschelde2019-04-301-1/+1
| | | | | | Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
* Move IDHandler JS module to platform from WebsockFabio Alessandrelli2019-04-122-0/+69
|
* Remove unused importsHendrikto2019-04-061-1/+0
|
* 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 #26633 from akien-mga/driver-fallback-etcRémi Verschelde2019-03-061-1/+1
|\ | | | | Disable driver fallback to GLES2 by default
| * Disable driver fallback to GLES2 by defaultRémi Verschelde2019-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLES2 is not designed to be a drop-in replacement for the GLES3 backend, so the fallback mode has to be used knowingly. It *can* make sense for simple projects which make sure to handle the differences between both rendering backends, but most users should stick to one supported backend. By making it opt-in, we can now use this parameter to define whether to export ETC textures to Android and iOS when using GLES3 + Fallback. When using GLES3 without Fallback on Android, set the proper min GLES version in the AndroidManifest. Also made the option boolean and renamed it for clarity and to avoid conflict with the previous String option (which would always evaluate as "true" otherwise). Fixes #26569.
* | 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.
* SCons: Move platform-specific Opus config to its moduleRémi Verschelde2019-03-021-4/+0
|
* -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
* -Remove harcoded opengl extension testing from OS, ask rasterizer instead.Juan Linietsky2019-02-261-10/+0
| | | | -Fixed a bug where etc textures were imported broken
* Use stdout/-err for all messages in HTML5 platformLeon Krause2019-02-244-8/+8
|
* Fix file preloading warning in HTML5 platformLeon Krause2019-02-232-5/+2
|
* Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Fix pixelized previews, but also instances of breaking ImageTexture cache. ↵Juan Linietsky2019-01-271-0/+5
| | | | Closes #25378.
* Allow requesting full screen during start-up in HTML5 platformLeon Krause2019-01-231-1/+14
|
* ExportDialog: Make error messages translatableRémi Verschelde2019-01-211-2/+2
| | | | Also fix missing newlines that caused #24202.
* Deal with Google's HTML5 autoplay policyLeon Krause2019-01-203-0/+16
| | | | Resume audio context after mouse, touch or key input.
* Merge pull request #25150 from eska014/html5-warningRémi Verschelde2019-01-201-2/+1
|\ | | | | Fix HTML5 build warning
| * Refactor OS_JavaScript headerLeon Krause2019-01-201-2/+1
| |
* | Fix HTML5 gamepad logic for Emscripten 1.38.22 compat breakageLeon Krause2019-01-201-1/+2
|/
* Implements OS_JavaScript::set_custom_mouse_cursorGuilherme Felipe2019-01-032-2/+124
|