summaryrefslogtreecommitdiff
path: root/web/hitomezashi_web_shell.html
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-06-01 13:31:24 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-06-01 13:33:56 +0000
commit3a2fef94230f35d948634ffef83660afdffa0bad (patch)
treee4fb261e6fcf6d0b4b3d4b688aa94757700f45ab /web/hitomezashi_web_shell.html
parent316382d74ed4a705c43e2380e7af20a500c24fa9 (diff)
downloadhitomezashi-3a2fef94230f35d948634ffef83660afdffa0bad.tar
hitomezashi-3a2fef94230f35d948634ffef83660afdffa0bad.tar.gz
hitomezashi-3a2fef94230f35d948634ffef83660afdffa0bad.zip
Complete libhitomezashi, reset project
Diffstat (limited to 'web/hitomezashi_web_shell.html')
-rw-r--r--web/hitomezashi_web_shell.html86
1 files changed, 0 insertions, 86 deletions
diff --git a/web/hitomezashi_web_shell.html b/web/hitomezashi_web_shell.html
deleted file mode 100644
index cd19547..0000000
--- a/web/hitomezashi_web_shell.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!doctype html>
-<html lang="en-us">
-
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <!--This is code modified from https://github.com/emscripten-core/emscripten/blob/main/src/shell_minimal.html.-->
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Hitomezashi</title>
- <style>
- canvas {
- padding-right: 0;
- margin-left: auto;
- margin-right: auto;
- display: block;
- border: 0px none;
- background-color: black;
- }
-
- form {
- display: table;
- margin: auto;
- }
-
- form>p {
- display: table-row;
- }
-
- form>p>label {
- display: table-cell;
- }
-
- form>p>label>input {
- display: table-cell;
- }
-
- button#downloadCanvas {
- display: block;
- margin: 0 auto;
- }
-
- p#info {
- text-align: center;
- }
-
- p#info>a {
- margin-left: 1ex;
- margin-right: 1ex;
- }
- </style>
-</head>
-
-<body>
- <form name="hitomezashi parameters" autocomplete="off">
- <p><label>x pattern: <input name="x_pattern"></label></p>
- <p><label>y pattern: <input name="y_pattern"></label></p>
- <p><label>gap: <input name="gap" type="number"></label></p>
- <p><label>line thickness: <input name="line_thickness" type="number"></label></p>
- <p><label>foreground colour: <input name="fg_colour" type="color"></label></p>
- <p><label>background colour: <input name="bg_colour" type="color"></label></p>
- </form>
- <br>
- <canvas class="emscripten" id="canvas" tabindex=-1></canvas>
- <br>
- <button id="downloadCanvas">download as image</button>
- <script type='text/javascript'>
- var Module = {
- canvas: (function () {
- var canvas = document.getElementById('canvas');
-
- canvas.addEventListener("webglcontextlost", function (e) { alert('Error: WebGL context lost. Please reload the page.'); e.preventDefault(); }, false);
-
- return canvas;
- })(),
- };
- function downloadCanvas() {
- let downloadLink = document.createElement("a");
- downloadLink.setAttribute("download", "hitomezashi");
- downloadLink.setAttribute("href", canvas.toDataURL());
- downloadLink.click();
- }
- document.querySelector("#downloadCanvas").addEventListener("click", downloadCanvas);
- </script>
- {{{ SCRIPT }}}
-</body>
-
-</html>