Fix issues with starting up the game.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4bf15fdd97
commit
58be256f8a
|
@ -21,6 +21,10 @@ Godot devs) can be found between the `<!-- Start of Custom Game block -->` and
|
||||||
* [Calling JS from the HTML5 Export][js-from-godot]
|
* [Calling JS from the HTML5 Export][js-from-godot]
|
||||||
* [Using a Custom HTML Shell][custom-html-shell]
|
* [Using a Custom HTML Shell][custom-html-shell]
|
||||||
* [Custom Fixed Size Shell template][custom-fixed-size-template]
|
* [Custom Fixed Size Shell template][custom-fixed-size-template]
|
||||||
|
* Some minor tweaks are needed to work the custom shell with Godot 3.2:
|
||||||
|
* Remove the line: `const EXTRA_ARGS = JSON.parse('$GODOT_ARGS');`
|
||||||
|
* Update the starting of game engine by removing `EXTRA_ARGS` from `engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => {` making it
|
||||||
|
`engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
|
||||||
|
|
||||||
[demo]: https://games.birch-tree.net/godot-html-js-integration-demo/
|
[demo]: https://games.birch-tree.net/godot-html-js-integration-demo/
|
||||||
[js-from-godot]: https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script
|
[js-from-godot]: https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script
|
||||||
|
|
|
@ -234,7 +234,6 @@ $GODOT_HEAD_INCLUDE
|
||||||
(function() {
|
(function() {
|
||||||
const EXECUTABLE_NAME = '$GODOT_BASENAME';
|
const EXECUTABLE_NAME = '$GODOT_BASENAME';
|
||||||
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
const MAIN_PACK = '$GODOT_BASENAME.pck';
|
||||||
const EXTRA_ARGS = JSON.parse('$GODOT_ARGS');
|
|
||||||
const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
|
const DEBUG_ENABLED = $GODOT_DEBUG_ENABLED;
|
||||||
const INDETERMINATE_STATUS_STEP_MS = 100;
|
const INDETERMINATE_STATUS_STEP_MS = 100;
|
||||||
|
|
||||||
|
@ -381,7 +380,7 @@ $GODOT_HEAD_INCLUDE
|
||||||
} else {
|
} else {
|
||||||
setStatusMode('indeterminate');
|
setStatusMode('indeterminate');
|
||||||
engine.setCanvas(canvas);
|
engine.setCanvas(canvas);
|
||||||
engine.startGame(EXECUTABLE_NAME, MAIN_PACK, EXTRA_ARGS).then(() => {
|
engine.startGame(EXECUTABLE_NAME, MAIN_PACK).then(() => {
|
||||||
setStatusMode('hidden');
|
setStatusMode('hidden');
|
||||||
initializing = false;
|
initializing = false;
|
||||||
}, displayFailureNotice);
|
}, displayFailureNotice);
|
||||||
|
|
Loading…
Reference in New Issue