summaryrefslogtreecommitdiffstats
path: root/platform/javascript/engine.js
Commit message (Collapse)AuthorAgeFilesLines
* [HTML5] Refactor JS, threads support, closures.Fabio Alessandrelli2020-03-111-411/+0
| | | | | | | | | | - 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.
* Fix startGame's logic in engine.js.Relintai2020-02-121-4/+2
|
* Fixed running the export templates with newer emscripten versions.Relintai2019-10-011-8/+5
|
* Fix file preloading warning in HTML5 platformLeon Krause2019-02-231-1/+2
|
* Add comments to javascript wrapper parts.Zaven Muradyan2018-10-151-0/+3
| | | | | | | | The code in pre.js and engine.js is a bit confusing to see in isolation, since the files aren't valid JS files by themselves. This just adds some explanatory text to both files. Fixes #22937.
* Merge pull request #18765 from eska014/enginejs-extaltRémi Verschelde2018-05-101-2/+15
|\ | | | | Facilitate using non-default filename extensions in HTML5 platform
| * Accept non-default main packs in engine.js startGame()Leon Krause2018-05-101-1/+5
| | | | | | | | | | | | Allows using startGame() with main packs exported as .zip, but also any other custom extension, for example if a web game host does not allow the .pck filename extension.
| * Add Engine.setWebAssemblyFilenameExtension()Leon Krause2018-05-101-1/+10
| | | | | | | | | | | | Some web game hosts only allow certain filename extensions. If .wasm is not allowed, this function allows overriding the WebAssembly filename extension to work around that restriction.
* | Fix keyboard focus lock-out with HTML5 canvas in iframeLeon Krause2018-05-101-0/+4
|/
* Fix engine.js startGame() when loading from directoryLeon Krause2018-03-271-3/+14
|
* Allow custom path when using engine.js preloadFile() with URLLeon Krause2018-03-271-3/+3
|
* Fix engine.js preloadFile() with directoriesLeon Krause2018-03-271-3/+13
|
* Expose Emscripten libs to engine.js discreetlyLeon Krause2018-03-271-2/+5
|
* Fix typo in engine.jsLeon Krause2018-03-161-2/+2
|
* Check only for WebGL 1.0, move test to HTML fileLeon Krause2018-03-151-12/+14
| | | | | | | | Whether to use WebGL 1.0 or 2.0 can only be determined at runtime after reading project settings, so check for the lower version. The test is now in the HTML file, so if desired WebGL 2.0 can be checked early by changing the behaviour there.
* Initialize WebGL context in OSLeon Krause2018-01-071-3/+7
|
* Change HTML5 start-up APILeon Krause2017-11-191-59/+105
| | | | | | | | 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().
* Remove asm.js support from HTML5 platformLeon Krause2017-11-181-53/+6
| | | | | Since WebGL 2.0 is required, requiring WebAssembly support as well has little impact on compatibility.
* Use primary WebAssembly.instantiate overloadLeon Krause2017-10-021-3/+3
| | | | | | Previously WebAssembly.compile was used along with the secondary WebAssembly.instantiate overload. Using only the primary overload is recommended to get best performance.
* HTML5 start-up overhaulLeon Krause2017-09-111-0/+366
- Implement promise-based JS interface for custom HTML page integration - Add download progress callback - Add progress bar and indeterminate spinner to default HTML page - Try downloading files multiple times when failing - Get rid of godotfs.js - Separate steps for engine initialization, game initialization and game start - Allow multiple games on one HTML page - Substitution placeholders only used in .html file - Placeholders renamed: $GODOT_BASE => $GODOT_BASENAME, $GODOT_TMEM -> $GODOT_TOTAL_MEMORY - Emscripten Module is now Engine.RuntimeEnvironment (no longer a global)