fuzzyworld

godot-shooter / commit

Manual HTML template, experimenting with customizing the template.

e856dd376a10fcc6f2f34d75105a35bf7fe4f8c7 · Pavel Safronov · 2023-11-07 09:41:09 -0800 · parents 6ae9f305f9c1

Manual HTML template, experimenting with customizing the template.
 export_presets.cfg |  2 +-
 html-template.html | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/export_presets.cfg b/export_presets.cfg
index 8c4868a..1953e32 100644
--- a/export_presets.cfg
+++ b/export_presets.cfg
@@ -19,7 +19,7 @@ variant/export_type=0
 vram_texture_compression/for_desktop=true
 vram_texture_compression/for_mobile=true
 html/export_icon=true
-html/custom_html_shell=""
+html/custom_html_shell="res://html-template.html"
 html/head_include=""
 html/canvas_resize_policy=2
 html/focus_canvas_on_start=true
diff --git a/html-template.html b/html-template.html
new file mode 100644
index 0000000..7dcade4
--- /dev/null
+++ b/html-template.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <title>$GODOT_PROJECT_NAME</title>
+    <meta charset="UTF-8">
+</head>
+
+<body>
+    <canvas id="canvas"></canvas>
+    <script src="$GODOT_URL"></script>
+    <script>
+        var engine = new Engine($GODOT_CONFIG);
+        engine.startGame();
+    </script>
+    <div>
+        <p>
+            <a href="https://gitlab.com/PavelSafronov/godot-shooter">Pavel's Godot shooter</a>
+        </p>
+    </div>
+</body>
+
+</html>
\ No newline at end of file