Spaces:
Running
Running
Download guozu/tools/frames.html from Ethscriptions/POLS: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/Ethscriptions/POLS/resolve/main/guozu/tools/frames.html
- Command line
-
hf download hf://spaces/Ethscriptions/POLS/guozu/tools/frames.html
-
curl -L -o frames.html https://huggingface.co/spaces/Ethscriptions/POLS/resolve/main/guozu/tools/frames.html
1.37 kB
| <meta charset="utf-8"><body style="margin:0;background:#000"><canvas id="c"></canvas> | |
| <script src="../data/matches.js"></script><script src="../js/voice-data.js"></script><script src="../js/pix.js"></script><script src="../js/story.js"></script><script src="../js/stage.js"></script><script src="../js/fonts.js"></script> | |
| <script> | |
| window.ready = loadPixelFont('../'); | |
| const C = () => document.getElementById('c'); | |
| window.snap = async (t, mode) => { await ready; const L = STAGE.LAYOUTS[mode]; const c = C(); c.width = L.W; c.height = L.H; STAGE.render(c.getContext('2d'), t, mode, {}); return c.toDataURL('image/jpeg', .85); }; | |
| window.cover = async (mode) => { await ready; const L = STAGE.LAYOUTS[mode]; const c = C(); c.width = L.W; c.height = L.H; STAGE.cover(c.getContext('2d'), mode); return c.toDataURL('image/png'); }; | |
| window.bench = async (n, mode) => { await ready; const L = STAGE.LAYOUTS[mode]; const c = C(); c.width = L.W; c.height = L.H; const x = c.getContext('2d'); const t0 = performance.now(); for (let i = 0; i < n; i++) STAGE.render(x, i * STORY.total / n, mode, {}); return (performance.now() - t0) / n; }; | |
| window.info = () => ({ total: STORY.total, lines: STORY.lines.map(l => [+l.start.toFixed(2), +l.end.toFixed(2)]), scenes: STORY.scenes.map(s => [s.id, +s.start.toFixed(2)]), cross: STORY.cross.map(v => +v.toFixed(2)) }); | |
| </script> | |