fps
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<div id="fps-counter"></div>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -43,4 +44,41 @@
|
||||
<img src="404.gif" alt="404">
|
||||
<p>If you believe this is an error, please <a href="/Contact.html">contact us</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -66,3 +66,41 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -126,3 +126,41 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
+39
-1
@@ -31,4 +31,42 @@
|
||||
<script src="js/slopegame-gitlab-io.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -127,3 +127,41 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
+38
@@ -23,3 +23,41 @@
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -66,3 +66,41 @@ Drop a star on the repo if you enjoy.
|
||||
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/101393847ns.gif" /></p></noscript>
|
||||
</body>
|
||||
<!-- Slope game by y8 games, not me.-->
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -24,3 +24,41 @@
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -146,4 +146,42 @@ window.JOT_formatRelativeToNow=function(a,b){a=((new Date).getTime()-a)/6E4;if(1
|
||||
JOT_postEvent('usercontentrendered', this);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -49,3 +49,41 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -19,3 +19,41 @@
|
||||
</center>
|
||||
|
||||
</body>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -18,4 +18,42 @@
|
||||
<center>
|
||||
<embed id="game" src="../Henry Stickmin - Infiltrating the Airship.swf"></embed>
|
||||
</center>
|
||||
</body>
|
||||
</body>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -12,4 +12,42 @@
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -15,4 +15,42 @@
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -12,4 +12,42 @@
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
@@ -15,4 +15,42 @@
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
</html>
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
+40
-1
@@ -11,4 +11,43 @@
|
||||
<a href="/games/henreystikman/Escaping The Prison.html"> henrey Escaping The Prison</a>
|
||||
<a href="/games/henreystikman/Stealing_the_Diamond.html">Stealing_the_Diamond</a>
|
||||
<a href="/games/flasharchive-main/flasharchive-main/html/hs-ita-1.html">Henry Stickmin - Infiltrating the Airship</a>
|
||||
<a href="/games/flasharchive-main/flasharchive-main/html/hs-ftc.html">Henry Stickmin - Fleeing the Complex</a>
|
||||
<a href="/games/flasharchive-main/flasharchive-main/html/hs-ftc.html">Henry Stickmin - Fleeing the Complex</a>
|
||||
|
||||
<div id="fps-counter"></div>
|
||||
<style>
|
||||
#fps-counter {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: white;
|
||||
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
z-index: 1000; /* Ensure it stays on top */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const fpsCounter = document.getElementById("fps-counter"); // Moved this to the correct place
|
||||
|
||||
function calculateFPS() {
|
||||
let lastFrameTime = performance.now();
|
||||
let frames = 0;
|
||||
|
||||
function frameLoop() {
|
||||
const now = performance.now();
|
||||
frames++;
|
||||
|
||||
if (now - lastFrameTime >= 1000) {
|
||||
const fps = Math.round(frames / ((now - lastFrameTime) / 1000));
|
||||
fpsCounter.textContent = `FPS: ${fps}`;
|
||||
frames = 0;
|
||||
lastFrameTime = now;
|
||||
}
|
||||
requestAnimationFrame(frameLoop);
|
||||
}
|
||||
frameLoop();
|
||||
}
|
||||
|
||||
calculateFPS(); // Ensure the FPS calculation starts
|
||||
</script>
|
||||
Reference in New Issue
Block a user