summaryrefslogtreecommitdiff
path: root/platform/javascript/javascript_main.cpp
AgeCommit message (Collapse)Author
2020-12-05[HTML5] GDNative support via SIDE_MODULE.Fabio Alessandrelli
Working with emscripten >= 2.0.10
2020-11-10[HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli
The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
2020-09-23JS synchronous start, better persistent FS sync.Fabio Alessandrelli
The engine now expects to emscripten FS to be setup and sync-ed before main is called. This is exposed via `Module["initFS"]` which also allows to setup multiple persistence paths (internal use only for now). Additionally, FS syncing is done **once** for every loop if at least one file in a persistent path was open for writing and closed, and if the FS is not syncing already. This should potentially fix issues reported by users where "autosave" would not work on the web (never calling `syncfs` because of too many writes).
2020-09-23Expose request_quit method to JS in HTML5 export.Fabio Alessandrelli
2020-07-27Merge pull request #40755 from Faless/js/fix_and_cancel_swapRémi Verschelde
Cancel/OK swap on HTML5 platform, small fixes.
2020-07-27Correctly include <stdlib.h> in javascript main.Fabio Alessandrelli
Already fixed in 3.2, this header is needed since it's where setenv is declared and we should not assume it to be already included.
2020-07-24t Add unit testing to Godot using DocTest and added to GitHub Actions CIRevoluPowered
Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix.
2020-07-01Use dummy driver when JS AudioContext is unavailable.Fabio Alessandrelli
2020-07-01Limit FPS in JS by skipping iterations.Fabio Alessandrelli
2020-07-01[JS] Check canvas size each loop, force redraw.Fabio Alessandrelli
Fix compatibility issues, achieve smoother resizing.
2020-07-01Refactor canvas ID and locale handling.Fabio Alessandrelli
2020-07-01Fix FS error on JS startup due to existing folder.Fabio Alessandrelli
2020-06-14Immediately run first iteration after JS FS sync.Fabio Alessandrelli
Which is now run inside an animation frame. This avoid a 1 frame black screen when setting up the canvas.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-10Add drop files functionFabio Alessandrelli
2020-05-10DisplayServerJavaScript implementation.Fabio Alessandrelli
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
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.
2018-07-10Refactor OS_JavaScriptLeon Krause
2018-05-24Javascript: Remove weird logMax Hilbrunner
2018-03-26Refactor JavaScript platform build scriptLeon Krause
2018-01-06Fix internal Emscripten JS API callsLeon Krause
Emscripten 1.37.24 no longer exports these by default
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
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.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-11-19Change HTML5 start-up APILeon Krause
Rename engine.start() to startGame(), new start() takes string arguments handed directly to main(). Rename Engine.loadEngine() to load(). Add setLocale(), setResizeCanvasOnStart(), setExecutableName() and preloadFile().
2017-10-02Add OS::is_userfs_persistent to check user:// persistenceLeon Krause
Allows starting HTML5 export when IndexedDB is not available.
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-04-28Remove GLUT usage in HTML5 platformL. Krause
2017-04-25Reimplement HTML5 mouse input without GLUTL. Krause
Fixes inverted scrolling on Chromium
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-29WebGL 2 export per WebAssembly or asm.jseska
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-02-22Fixes to webgl/opengl es 3.0 for compatibility with webgl2.0, still does not ↵Juan Linietsky
work though
2017-02-21-renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky
modified files) -.pck and .zip exporting redone, seems to be working..
2017-01-16Style: Prevent clang-format on JS codeRémi Verschelde
2017-01-15Merge pull request #7519 from eska014/web-presentationRémi Verschelde
Improve Web export presentation
2017-01-14Improve usability and style in web export presentationeska
- Check for WebGL support, don't load if unsupported - Check for IndexedDB support - Make canvas support check message visible - Colored debug output for warnings and errors - Make it obvious status can be closed by clicking - Don't use status to display non-critical errors - Limit output message count - Add clear output button - Fix setting total memory
2017-01-14Style: Fix whole-line commented codeRémi Verschelde
They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
2017-01-01Welcome in 2017, dear changelog reader!Rémi Verschelde
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
2016-11-30Fix some mouse bugs in WebAssembly/asm.jseska
- Emit mouse wheel release events - Set button masks, fixes #5092
2016-11-30OS additions and fixes for WebAssembly/asm.jseska
- Implement alert, shell_open, set_window_title - Add locale lookup, fixes #2477 - Print without color control sequences - Move get_executable_path implementation to OS_JavaScript
2016-04-19Reimplement key input events in Emscripten exporteska
Scancodes work, but unicode values are now completely broken in some browser/OS combinations.
2016-03-04html5: workaround for echo key events.hondres
2016-01-01Update copyright to 2016 in headersGeorge Marques
2015-09-12HTML5 exporter seems to be fully functionalJuan Linietsky
-user:// filesystem implemented -default template page could look prettier, help appreciated
2015-09-10HTML5 exporter ImprovementsJuan Linietsky
-Better template handling -Voice support -Stream support
2015-04-18Updated copyright year in all headersJuan Linietsky
2014-02-09GODOT IS OPEN SOURCEJuan Linietsky