Compare commits

..

No commits in common. "4b2446a5f46e541e0c5c061b38c96cfe92425865" and "c6d9a2cd777aab63031fd462be167e4603c189ab" have entirely different histories.

4 changed files with 8 additions and 56 deletions

View File

@ -219,8 +219,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL Emscripten)
"-sUSE_WEBGL2=1" "-sUSE_WEBGL2=1"
"-sNO_DISABLE_EXCEPTION_CATCHING=1" "-sNO_DISABLE_EXCEPTION_CATCHING=1"
"-sALLOW_MEMORY_GROWTH=1" "-sALLOW_MEMORY_GROWTH=1"
"-sEXPORTED_FUNCTIONS=_RunMain,_SetName,_SetUrl"
"-sEXPORTED_RUNTIME_METHODS=ccall,cwrap"
"--shell-file" "${CMAKE_SOURCE_DIR}/shell.html" "--shell-file" "${CMAKE_SOURCE_DIR}/shell.html"
"--preload-file" "${CMAKE_SOURCE_DIR}/assets/@/" "--preload-file" "${CMAKE_SOURCE_DIR}/assets/@/"
) )

View File

@ -15,8 +15,6 @@
height: 100%; height: 100%;
background: black; background: black;
color: aqua; color: aqua;
font-family: Verdana, Geneva, Tahoma, sans-serif;
text-align: center;
} }
canvas { canvas {
@ -24,28 +22,6 @@
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
} }
#vyplnitmeno{
font-size: 100pt;
color: red;
font-weight: bold;
margin: 0;
margin-bottom: 100px;
}
#okbut
{
font-size: 20pt;
font-weight: bold;
padding: 10pt;
margin: 10pt;
}
#name, #url
{
font-size: 150%;
margin: 10pt;
}
</style> </style>
</head> </head>
@ -56,11 +32,9 @@
<h1>fekální gtačko</h1> <h1>fekální gtačko</h1>
<form> <form>
kdo <input type="text" name="name" id="name" placeholder="vyplnit"><br> kdo <input type="text" name="name" id="name"><br>
<p id="vyplnitmeno" style="display:none">^ vyplnit</p> kam <input type="text" name="url" id="url"><br>
<input type="button" value="0k" onclick="ok()">
kam <input type="text" name="url" id="url" value="ws://deadfish.cz:11200/ws"><br>
<input id="okbut" type="button" value="0k" onclick="ok()">
</form> </form>
</div> </div>
@ -102,34 +76,14 @@
const name = document.getElementById("name").value; const name = document.getElementById("name").value;
const url = document.getElementById("url").value; const url = document.getElementById("url").value;
if (name == "") { Module.ccall("SetName", name);
document.getElementById("vyplnitmeno").style = ""; Module.ccall("SetUrl", url);
return;
}
localStorage.setItem("fg_name", name);
localStorage.setItem("fg_url", url);
Module.ccall("SetName", null, ["string"], [name]);
Module.ccall("SetUrl", null, ["string"], [url]);
document.getElementById("loginform").style = "display:none"; document.getElementById("loginform").style = "display:none";
document.getElementById("canvas").style = ""; document.getElementById("canvas").style = "";
Module.ccall("RunMain", null, [], []); Module.ccall("RunMain");
} }
function loadConfig()
{
const saved_name = localStorage.getItem("fg_name");
const saved_url = localStorage.getItem("fg_url");
if (saved_name != null)
document.getElementById("name").value = saved_name;
if (saved_url != null)
document.getElementById("url").value = saved_url;
}
loadConfig();
</script> </script>
{{{ SCRIPT }}} {{{ SCRIPT }}}

View File

@ -226,7 +226,7 @@ LIGHT_MATRICES_GLSL
COMPUTE_LIGHTS_GLSL COMPUTE_LIGHTS_GLSL
R"GLSL( R"GLSL(
uniform mediump sampler3D u_deform_tex; uniform sampler3D u_deform_tex;
uniform mat3 u_deform_info; uniform mat3 u_deform_info;
out vec2 v_uv; out vec2 v_uv;

View File

@ -182,7 +182,7 @@ void gui::Context::DrawText(std::string_view text, const glm::vec2& pos, uint32_
else if (cp >= 'a' && cp <= 'f') else if (cp >= 'a' && cp <= 'f')
ch = cp - 'a' + 10; ch = cp - 'a' + 10;
else else
ch = 0; break;
curr_color |= (ch << 16); curr_color |= (ch << 16);
curr_color |= (ch << 20); curr_color |= (ch << 20);