@mediapipe/control_utils
Advanced tools
Comparing version 0.0.1605041948 to 0.0.1605045537
@@ -13,3 +13,3 @@ (function(){/* | ||
this.f=a.getContext("2d");v(this,0)};u.prototype.update=function(){};u.prototype.tick=function(){var a=Math.floor(performance.now()/1E3);1<=a-this.c&&(v(this,this.counter),this.c=a,this.counter=0);++this.counter}; | ||
function v(a,c){a.a.shift();a.a.push(c);var b=a.f;b.fillStyle="green";b.clearRect(0,0,b.canvas.width,b.canvas.height);for(var d=0;10>d;++d){var e=Math.min(100,Math.max(0,a.a[d]));b.fillRect(10*d+1,100-e+1,8,e)}b.setLineDash([2,2]);b.strokeStyle="#a0a0a0a0";b.lineWidth=2;b.beginPath();b.moveTo(0,30);b.lineTo(100,30);b.stroke();b.beginPath();b.moveTo(0,60);b.lineTo(100,60);b.stroke();a.b.textContent=c.toFixed(1)+" fps"}function w(a){this.a=a} | ||
function v(a,c){a.a.shift();a.a.push(c);var b=a.f;b.fillStyle="green";b.clearRect(0,0,b.canvas.width,b.canvas.height);for(var d=0;10>d;++d){var e=Math.min(100,Math.max(0,a.a[d]));b.fillRect(10*d+1,100-e+1,8,e)}b.setLineDash([2,2]);b.strokeStyle="#a0a0a0a0";b.lineWidth=2;b.beginPath();b.moveTo(0,30);b.lineTo(100,30);b.stroke();b.beginPath();b.moveTo(0,60);b.lineTo(100,60);b.stroke();a.b.textContent=c.toFixed(0)+" fps"}function w(a){this.a=a} | ||
w.prototype.create=function(a,c,b){a=b.appendChild(document.createElement("div"));a.classList.add("control-panel-entry");a.classList.add("control-panel-text");a.textContent=this.a.title};w.prototype.update=function(){};function x(a){this.b=a} | ||
@@ -16,0 +16,0 @@ x.prototype.create=function(a,c,b){var d=this;this.f=a;this.c=c;this.a=b.appendChild(document.createElement("div"));this.a.classList.add("control-panel-entry");this.a.classList.add("control-panel-toggle");this.a.onclick=function(){d.c[d.b.field]=!d.c[d.b.field];d.f()};a=this.a.appendChild(document.createElement("span"));a.classList.add("label");this.value=this.a.appendChild(document.createElement("span"));this.value.classList.add("value");a.textContent=this.b.title}; |
{ | ||
"name": "@mediapipe/control_utils", | ||
"description": "Mediapipe Simple Control Panel", | ||
"version": "0.0.1605041948", | ||
"version": "0.0.1605045537", | ||
"author": "mhays@google.com", | ||
@@ -6,0 +6,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is too big to display