Files
muuhd/frontend/ascii_dungeon_crawler.html
Kim Ravn Hansen f8bf42a68e asdasd
2025-09-20 20:05:47 +02:00

119 lines
3.4 KiB
HTML
Executable File

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ASCII Dungeon Crawler</title>
<style>
#color-lens {
color: yellow;
font-size: 40px;
/* Shape and Color */
width: 50px;
height: 50px;
background-color: none;
border-radius: 50%; /* Makes it a circle */
/* Positioning and Layering */
position: fixed; /* Floats on top of the page */
z-index: 9999;
/* Make it invisible to the cursor */
pointer-events: none;
/* The color blending effect! */
mix-blend-mode: color; /* try 'hue' or 'color' for different effects */
opacity: 1;
/* Initially hide it and center it on the cursor */
display: none;
transform: translate(-50%, -50%);
}
body {
margin: 0;
padding: 20px;
background-color: #000;
color: #ccc;
font-family: "Courier New", monospace;
overflow: hidden;
}
#gameContainer {
text-align: center;
}
#viewport {
font-size: 8px;
line-height: 8px;
white-space: pre;
border: 2px solid #0f0;
display: inline-block;
background-color: #000;
padding: 10px;
overflor: ignore;
}
#controls {
margin-top: 20px;
color: #0f0;
}
#mapInput {
margin-top: 20px;
}
textarea {
background-color: #001100;
color: #ccc;
border: 1px solid #0f0;
font-family: "Courier New", monospace;
padding: 10px;
}
button {
background-color: #001100;
color: #0f0;
border: 1px solid #0f0;
padding: 5px 10px;
font-family: "Courier New", monospace;
cursor: pointer;
}
button:hover {
background-color: #002200;
}
</style>
</head>
<body>
<div id="gameContainer">
<div id="viewport"></div>
<div id="controls">
<div>Use WASD or Arrow Keys to move and arrow keys to turn</div>
</div>
<div id="mapInput">
<div>Load your map (# = walls, space = floor):</div>
<br />
<textarea id="mapText" rows="10" cols="50">
####################
# # #
# # ### #
# # # #
# #### # #
# # #
# # # #
# # #### # #
# # # #
# ### ### #
# #
####################
</textarea
>
<br /><br />
<button onclick="loadMap()">Load Map</button>
</div>
</div>
<script type="module" src="./ascii_dungeon_crawler.js"></script>
</body>
</html>