-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesynchronized_canvas.html
33 lines (32 loc) · 1.05 KB
/
desynchronized_canvas.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<title>Input lag measuring tool</title>
<meta charset="UTF-8">
<style>
.anim {
animation: anim 1s alternate;
animation-iteration-count: infinite;
width: 1px;
height: 1px;
background-color: rgba(0,0,0,0);
}
@keyframes anim {
0% {opacity: 0}
100% {opacity: 1}
}
</style>
</head>
<body>
<h3>Input lag measuring tool- Desynchronized canvas</h3>
<p>You can use this tool to measure the input lag of the browser.</p>
<p>Move your mouse around at constant speed and adjust the slider until the outer circle matches your mouse pointer.</p>
<div><input id="input-lag-slider" type="range" min="1" max="200" step="0.1" value="48" style="width:300px"></div>
<p>Milliseconds of input lag: <span id="input-lag-display">48</span></p>
<p>FPS: <span id="fps">0</span></p>
<div class="anim"></div>
<canvas id="canvas" style="width:100%; height:800px; border: 1px solid black" ></canvas>
<script>window.useDesynchronizedCanvas = true</script>
<script src="script.js"></script>
</body>
</html>