summaryrefslogtreecommitdiffstats
path: root/platform/javascript/os_javascript.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix javascript platform buildmuiroc2020-02-071-1/+1
|
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* 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-171-1/+2
| | | | | | | | | | | | | | | 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.
* 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.
* iOS modular build and export implementation.bruvzg2019-12-011-3/+0
|
* 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.
* Properly revert cursor when using set_custom_mouse_cursor with nullPouleyKetchoupp2019-10-031-0/+2
| | | | Fixes #32486
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-18/+10
| | | | "modules/gdnative", "modules/gdscript" directories.
* Fix cursor blinking in integrated GPUsGuilherme Felipe2019-07-091-0/+17
| | | | | Optimization for Input::set_custom_mouse_cursor when used inside _process function. (Avoids cursor blinking in low end devices)
* Merge pull request #10643 from BastiaanOlij/camera_serverRémi Verschelde2019-06-161-0/+3
|\ | | | | CameraServer class
| * Adding a new Camera Server implementation to Godot.BastiaanOlij2019-06-151-0/+3
| | | | | | | | | | | | 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.
* | Fix pointer position in hidpi-corrected resolutions on webLeonardo Giovanni Scur2019-06-141-4/+18
|/
* 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-291-0/+17
| | | | | | | 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-281-0/+19
|
* added a const keyword for a methods that return constant literal...hbina0852019-05-211-1/+1
|
* Fix OS_Javascript execute methodFabio Alessandrelli2019-05-151-1/+1
| | | | | | Signature was changed in OS via: cd4449e7abe97b2bc883e2d182db2cc41eb35f8c
* 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.
* -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-241-2/+2
|
* 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
|
* Deal with Google's HTML5 autoplay policyLeon Krause2019-01-201-0/+6
| | | | Resume audio context after mouse, touch or key input.
* 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-031-2/+123
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #20385 from moiman100/unify-double-clickingRémi Verschelde2018-12-141-0/+28
|\ | | | | Added double clicking to all buttons on Linux and Javascript
| * Added double clicking to all buttonsMikko Mustonen2018-08-121-0/+28
| |
* | Merge pull request #20063 from moiman100/fix-button-maskRémi Verschelde2018-12-141-1/+4
|\ \ | | | | | | Unified button mask behavior across platforms
| * | Fixed button mask behaviormm2018-07-111-1/+4
| | |
* | | Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()Leon Krause2018-10-291-0/+18
| | | | | | | | | | | | Avoids linker warnings and errors about undefined references.
* | | Fix compiler warnings in HTML5 platformLeon Krause2018-10-021-13/+11
| | |
* | | Fix build for Javascript platformmuiroc2018-10-011-4/+4
| | |
* | | Implement OS::set_icon in HTML5 platformLeon Krause2018-09-161-0/+52
| | |
* | | Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde2018-09-131-1/+1
|\ \ \ | | | | | | | | Misc. typos
| * | | Misc. typosluz.paz2018-09-121-1/+1
| | | | | | | | | | | | Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
* | | | 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 HTML5 gamepad inputLeon Krause2018-08-301-2/+5
| | |
* | | Fall back to GLES2 if GLES3 is not workingHein-Pieter van Braam2018-08-261-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a static is_viable() method to all rasterizers which has to be called before initializing the rasterizer. This allows us to check what rasterizer to use in OS::initialize together with the GL context initialization. This commit also adds a new project setting "rendering/quality/driver/driver_fallback" which allows the creator of a project to specify whether or not fallback to GLES2 is allowed. This setting is ignored for the editor so the editor will always open even if the project itself cannot run. This will hopefully reduce confusion for users downloading projects from the internet. We also no longer crash when GLES3 is not functioning on a platform. This fixes #15324
* | | Merge pull request #21330 from eska014/html5-canvas-resizeRémi Verschelde2018-08-231-55/+60
|\ \ \ | | | | | | | | Facilitate external modification of HTML5 canvas size
| * | | Facilitate external modification of HTML5 canvas sizeLeon Krause2018-08-231-55/+60
| |/ /
* | / use console.warn instead of Module.printErr: emscripten no longer exports ↵Alon Zakai (kripken)2018-08-111-1/+1
| |/ |/| | | | | printErr by default, and instead err() should be used in code seen by the optimizer; however, as Godot only runs on the Web (and not in node.js or elsewhere), using console.warn directly is good enough, and will work in all versions if emscripten
* | -Project/Editor settings now use new inspectorJuan Linietsky2018-07-191-0/+5
|/ | | | | | | -Project/Editor settings now show tooltips properly -Settings thar require restart now will show a restart warning -Video driver is now visible all the time, can be changed easily -Added function to request current video driver
* Refactor OS_JavaScriptLeon Krause2018-07-101-597/+560
|
* Added support for extra mouse buttons.unknown2018-07-091-1/+4
|
* Merge pull request #18753 from eska014/html5-iframefocusMax Hilbrunner2018-05-101-5/+5
|\ | | | | Fix keyboard focus lock-out with HTML5 canvas in iframe
| * Fix keyboard focus lock-out with HTML5 canvas in iframeLeon Krause2018-05-101-5/+5
| |
* | Fix relative mouse motion when captured in HTML5 platformLeon Krause2018-05-101-1/+1
|/