Spaces:
Running
Running
Download assets/TDebug-C_pplWnw.js from Ethscriptions/mx: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/assets/TDebug-C_pplWnw.js
- Command line
-
hf download hf://spaces/Ethscriptions/mx/assets/TDebug-C_pplWnw.js
-
curl -L -o TDebug-C_pplWnw.js https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/assets/TDebug-C_pplWnw.js
1.25 kB
| import{j as b}from"./jsx-dev-runtime-Czb3f8pQ.js";import{r as x}from"./index-Br42UDbl.js";import{E}from"./engine-Bmw5iF75.js";import{f as R}from"./scenes-oUf6rtD_.js";import"./index-BlGQAcOD.js";import"./state-B_bTBsCz.js";function y(){const f=x.useRef(null);return x.useEffect(()=>{var l;const w=(new URLSearchParams(location.search).get("tdebug")||"3").split(",").map(Number),u=new E;u.setSize(540,960);const c=f.current;c.width=540,c.height=960;const d=c.getContext("2d"),a=[];for(const r of w)try{const i=performance.now();u.render(R(r),d,r);const $=performance.now()-i,t=d.getImageData(0,0,540,960).data;let p=0,g=0,h=0;for(let e=0;e<t.length;e+=16){const o=t[e],s=t[e+1],n=t[e+2];p+=(o+s+n)/3,o>170&&s<90&&n<90&&g++,o>150&&s>100&&n>70&&o>s&&s>n&&o-n>40&&h++}const m=t.length/16;a.push(`t=${r} ms=${$.toFixed(0)} lum=${(p/m).toFixed(1)} red=${(g/m*100).toFixed(1)}% skin=${(h/m*100).toFixed(1)}%`)}catch(i){a.push(`t=${r} ERROR ${i.message} ${(l=i.stack)==null?void 0:l.split(` | |
| `).slice(0,3).join(" | ")}`)}console.log("INFO "+a.join(" ;; ")),window.__done=!0},[]),b.jsxDEV("canvas",{ref:f,style:{width:540,height:960}},void 0,!1,{fileName:"/workspaces/frontend/src/video/TDebug.tsx",lineNumber:36,columnNumber:10},this)}export{y as default}; | |