143 lines
2.8 KiB
HTML
143 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
<title>Ants simulation</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
overflow: hidden;
|
|
display: flex;
|
|
}
|
|
|
|
#sidebar {
|
|
width: 220px;
|
|
min-width: 220px;
|
|
height: 100vh;
|
|
background: #0a0a0a;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
#info {
|
|
font-family: monospace;
|
|
color: #777;
|
|
padding: 12px;
|
|
font-size: 12px;
|
|
line-height: 2;
|
|
border-bottom: 1px solid #1a1a1a;
|
|
}
|
|
|
|
#info kbd {
|
|
display: inline-block;
|
|
background: #1a1a1a;
|
|
color: #c43c3c;
|
|
padding: 1px 5px;
|
|
border-radius: 3px;
|
|
font-family: monospace;
|
|
font-size: 11px;
|
|
}
|
|
|
|
#info .label {
|
|
display: inline-block;
|
|
width: 65px;
|
|
}
|
|
|
|
#stats {
|
|
font-family: monospace;
|
|
color: #777;
|
|
padding: 8px 12px;
|
|
font-size: 11px;
|
|
line-height: 1.8;
|
|
border-bottom: 1px solid #1a1a1a;
|
|
}
|
|
|
|
#stats .label {
|
|
display: inline-block;
|
|
width: 65px;
|
|
color: #555;
|
|
}
|
|
|
|
#stats .value {
|
|
color: #c43c3c;
|
|
}
|
|
|
|
.reset-btn {
|
|
width: calc(100% - 16px);
|
|
margin: 12px 8px;
|
|
padding: 6px;
|
|
background: #141414;
|
|
color: #666;
|
|
border: 1px solid #2a2a2a;
|
|
border-radius: 3px;
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.reset-btn:hover {
|
|
background: #1a1a1a;
|
|
color: #c43c3c;
|
|
}
|
|
|
|
#gui-container {
|
|
flex: 1;
|
|
}
|
|
|
|
/* lil-gui noir + red theme */
|
|
#gui-container .lil-gui {
|
|
--background-color: #0a0a0a;
|
|
--widget-color: #1a1a1a;
|
|
--hover-color: #222;
|
|
--focus-color: #2a2a2a;
|
|
--number-color: #c43c3c;
|
|
--string-color: #c43c3c;
|
|
--text-color: #888;
|
|
--title-background-color: #0f0f0f;
|
|
--title-text-color: #999;
|
|
--folder-indent: 8px;
|
|
}
|
|
|
|
/* lil-gui overrides: fill sidebar, labels on top */
|
|
#gui-container .lil-gui.root {
|
|
width: 100% !important;
|
|
position: static;
|
|
}
|
|
|
|
#gui-container .lil-gui .controller {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
#gui-container .lil-gui .controller .name {
|
|
width: 100%;
|
|
min-width: 100%;
|
|
padding-bottom: 2px;
|
|
}
|
|
|
|
#gui-container .lil-gui .controller .widget {
|
|
min-width: 100%;
|
|
}
|
|
|
|
canvas {
|
|
flex: 1;
|
|
min-width: 0;
|
|
height: 100vh;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="sidebar">
|
|
<div id="info">
|
|
<kbd>Q</kbd> <span class="label">home</span><kbd>W</kbd> food<br/>
|
|
<kbd>E</kbd> <span class="label">obstacle</span><kbd>R</kbd> erase<br/>
|
|
<kbd>V</kbd> toggle view mode<br/>
|
|
drag + scroll to move camera
|
|
</div>
|
|
<div id="gui-container"></div>
|
|
</div>
|
|
<canvas id="canvas"></canvas>
|
|
<script type="module" src="/src/App.ts"></script>
|
|
</body>
|
|
</html>
|