example: add fps panel
This commit is contained in:
parent
557f21e9c7
commit
c21be7bcb5
|
@ -415,4 +415,18 @@
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script type="module" src="https://unpkg.com/stats.js@0.17.0/src/Stats.js" integrity="sha384-W71K+d2HbqXqQWSj3Vj4RDsIVvIV7lR8O6RArKAiqB39ntwLci0W08qOn4Z1n8sM" crossorigin="anonymous" async></script>
|
||||||
|
<script type="module" async>
|
||||||
|
import Stats from "https://unpkg.com/stats.js@0.17.0/src/Stats.js";
|
||||||
|
const stats = new Stats();
|
||||||
|
stats.dom.style.left = "";
|
||||||
|
stats.dom.style.right = "0";
|
||||||
|
document.body.appendChild(stats.dom);
|
||||||
|
function loop() {
|
||||||
|
stats.update();
|
||||||
|
requestAnimationFrame(loop)
|
||||||
|
}
|
||||||
|
requestAnimationFrame(loop);
|
||||||
|
</script>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue