fps
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
<div id="fps-counter"></div>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@@ -44,3 +45,40 @@
|
|||||||
<p>If you believe this is an error, please <a href="/Contact.html">contact us</a>.</p>
|
<p>If you believe this is an error, please <a href="/Contact.html">contact us</a>.</p>
|
||||||
</body>
|
</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>
|
</div>
|
||||||
</body>
|
</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>
|
||||||
@@ -126,3 +126,41 @@
|
|||||||
|
|
||||||
</body>
|
</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>
|
||||||
+38
@@ -32,3 +32,41 @@
|
|||||||
</body>
|
</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>
|
</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>
|
||||||
+38
@@ -23,3 +23,41 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</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>
|
||||||
@@ -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>
|
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/101393847ns.gif" /></p></noscript>
|
||||||
</body>
|
</body>
|
||||||
<!-- Slope game by y8 games, not me.-->
|
<!-- 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>
|
</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>
|
||||||
@@ -147,3 +147,41 @@ window.JOT_formatRelativeToNow=function(a,b){a=((new Date).getTime()-a)/6E4;if(1
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</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>
|
</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>
|
||||||
@@ -19,3 +19,41 @@
|
|||||||
</center>
|
</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>
|
||||||
@@ -19,3 +19,41 @@
|
|||||||
<embed id="game" src="../Henry Stickmin - Infiltrating the Airship.swf"></embed>
|
<embed id="game" src="../Henry Stickmin - Infiltrating the Airship.swf"></embed>
|
||||||
</center>
|
</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>
|
||||||
@@ -13,3 +13,41 @@
|
|||||||
|
|
||||||
|
|
||||||
</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>
|
||||||
@@ -16,3 +16,41 @@
|
|||||||
</body>
|
</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>
|
||||||
@@ -13,3 +13,41 @@
|
|||||||
|
|
||||||
|
|
||||||
</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>
|
||||||
@@ -16,3 +16,41 @@
|
|||||||
|
|
||||||
|
|
||||||
</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,3 +12,42 @@
|
|||||||
<a href="/games/henreystikman/Stealing_the_Diamond.html">Stealing_the_Diamond</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-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