Feature/Gameloop enhancements (#17)
Reviewed-on: #17 Co-authored-by: Juan Sebastian Montoya <juansmm@outlook.com> Co-committed-by: Juan Sebastian Montoya <juansmm@outlook.com>
This commit is contained in:
parent
77bd5bb395
commit
323f0be900
15 changed files with 1629 additions and 37 deletions
23
index.html
23
index.html
|
|
@ -96,6 +96,20 @@
|
|||
z-index: 100;
|
||||
font-family: 'Courier New', monospace;
|
||||
}
|
||||
#soundStatus {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 100px;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
z-index: 100;
|
||||
user-select: none;
|
||||
opacity: 0.8;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
#soundStatus:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
#perfMonitor {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
|
|
@ -125,6 +139,11 @@
|
|||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
#soundStatus {
|
||||
top: 10px;
|
||||
right: 60px;
|
||||
font-size: 18px;
|
||||
}
|
||||
#perfMonitor {
|
||||
top: 40px;
|
||||
right: 10px;
|
||||
|
|
@ -144,6 +163,8 @@
|
|||
|
||||
<div id="version">v<span id="versionNumber">-</span></div>
|
||||
|
||||
<div id="soundStatus" title="Sound ON (Press M to mute)">🔊</div>
|
||||
|
||||
<div id="perfMonitor">
|
||||
<div><span class="label">FPS:</span> <span id="fps">60</span></div>
|
||||
<div><span class="label">Frame:</span> <span id="frameTime">16.7</span>ms</div>
|
||||
|
|
@ -159,7 +180,7 @@
|
|||
|
||||
<div id="instructions">
|
||||
<p><strong>Controls:</strong> WASD or Arrow Keys to move | Touch and drag to move (mobile) | Collect yellow coins | Avoid red obstacles!</p>
|
||||
<p style="margin-top: 5px; font-size: 11px; opacity: 0.7;">Press "T" or shake device to toggle performance monitor</p>
|
||||
<p style="margin-top: 5px; font-size: 11px; opacity: 0.7;">Press "T" to toggle performance monitor | Press "M" to toggle sound</p>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue