From c4007cd8732a7a5a8c9c1f26730d6d75f4efc905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Pu=C5=82a?= Date: Wed, 16 Dec 2020 23:17:25 -0500 Subject: [PATCH] Setup a basic custom HTML5 shell. --- README.md | 20 ++- export_presets.cfg | 2 +- fixed-size.html | 427 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 447 insertions(+), 2 deletions(-) create mode 100644 fixed-size.html diff --git a/README.md b/README.md index 9ab9a8e..af0e671 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,22 @@ page. [Working demo page][demo] -[demo]: +## Setup + +* Requires Godot 3.2.x + * Use OpenGL ES 2.0 to allow for the HTML5 export. + +The custom JS and styling (outside of the fixed size template provided by the +Godot devs) can be found between the `` and +`` comment codes in [fixed-size.html](fixed-size.html). + +## Extra Notes + +* [Calling JS from the HTML5 Export][js-from-godot] +* [Using a Custom HTML Shell][custom-html-shell] +* [Custom Fixed Size Shell template][custom-fixed-size-template] + +[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 +[custom-html-shell]: https://docs.godotengine.org/en/stable/tutorials/platform/customizing_html5_shell.html#doc-customizing-html5-shell +[custom-fixed-size-template]: https://github.com/godotengine/godot/blob/master/misc/dist/html/fixed-size.html diff --git a/export_presets.cfg b/export_presets.cfg index db789bb..3de7711 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -16,7 +16,7 @@ script_encryption_key="" vram_texture_compression/for_desktop=true vram_texture_compression/for_mobile=true -html/custom_html_shell="" +html/custom_html_shell="res://fixed-size.html" html/head_include="" custom_template/release="" custom_template/debug="" diff --git a/fixed-size.html b/fixed-size.html new file mode 100644 index 0000000..adbc947 --- /dev/null +++ b/fixed-size.html @@ -0,0 +1,427 @@ + + + + + + $GODOT_PROJECT_NAME + +$GODOT_HEAD_INCLUDE + + +
+
+ + HTML5 canvas appears to be unsupported in the current browser.
+ Please try updating or use a different browser. +
+
+ + + +
+
+
+
+ Output: + +
+
+
+
+ + + + + + + + + +
+

Buy Points and Redeem Your Bonus!

+

High Scores

+
    +
  • Player: 1000
  • +
+
+ + +