code test pour tester les fps

This commit is contained in:
2023-01-14 17:14:35 +01:00
parent 81b1b3ee04
commit 111a203ee3
3 changed files with 8 additions and 2 deletions

View File

@@ -12,6 +12,8 @@ class CameraEditor {
this.images = {};
this._startup();
this._loadImages();
this.startupTime;
this.frameCount = 0;
}
_startup() {
@@ -59,6 +61,10 @@ class CameraEditor {
}
_frame() {
if(this.startupTime == undefined){
this.startupTime = Date.now();
}
this.frameCount++;
const context = canvas.getContext("2d");
if(this.streaming) {
if (this.width && this.height) {