Spaces:
Running
Running
Download index.html from limxdynamics/luna-viewer: direct link, hf CLI and curl.
- Browser
- Download file 8.26 kB
-
https://huggingface.co/spaces/limxdynamics/luna-viewer/resolve/main/index.html
- Command line
-
hf download hf://spaces/limxdynamics/luna-viewer/index.html
-
curl -L -o index.html https://huggingface.co/spaces/limxdynamics/luna-viewer/resolve/main/index.html
8.26 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> | |
| <title>Luna Viewer</title> | |
| <meta name="description" content="The LimX Luna humanoid in 3D, from its official MuJoCo model: play back a dance from the BeyondMimic reference motions, or pose every joint yourself."> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet"> | |
| <script> | |
| // Module map. A private Space serves files only with its ?__sign=… token, so every module URL carries it over. | |
| (function () { | |
| var sign = new URLSearchParams(location.search).get("__sign"); | |
| var q = sign ? "?__sign=" + encodeURIComponent(sign) : ""; | |
| var url = function (p) { return new URL(p, location.href.split("?")[0]).href; }; | |
| var imports = { three: url("vendor/three.module.min.js") + q }; | |
| if (q) ["viewer.js", "vendor/OrbitControls.js", "vendor/mujoco.js", "vendor/three.core.min.js"] | |
| .forEach(function (p) { imports[url(p)] = url(p) + q; }); | |
| var map = document.createElement("script"); map.type = "importmap"; map.textContent = JSON.stringify({ imports: imports }); | |
| document.head.appendChild(map); | |
| addEventListener("DOMContentLoaded", function () { | |
| var app = document.createElement("script"); app.type = "module"; app.src = url("app.js") + q; document.body.appendChild(app); | |
| }); | |
| })(); | |
| </script> | |
| <style> | |
| :root { | |
| --ink: #14181d; --muted: #5b6470; --line: rgba(20, 24, 29, .10); --card: rgba(255, 255, 255, .88); | |
| --accent: #2f6feb; --accent-ink: #fff; --key: #f2f4f7; | |
| } | |
| * { box-sizing: border-box; margin: 0; } | |
| html, body { height: 100%; overflow: hidden; background: #eef1f5; color: var(--ink); | |
| font: 14px/1.45 Poppins, Inter, system-ui, "PingFang SC", "Noto Sans CJK SC", sans-serif; -webkit-font-smoothing: antialiased; } | |
| canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; } | |
| .card { position: fixed; background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); | |
| border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(20, 24, 29, .08); } | |
| #info { top: 16px; left: 16px; width: min(340px, calc(100vw - 32px)); padding: 16px 18px; } | |
| #info h1 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; padding-right: 48px; } | |
| #info .sub { color: var(--muted); margin-top: 4px; font-size: 13px; } | |
| #lang { position: absolute; top: 14px; right: 14px; padding: 6px 9px; font-size: 12px; border-radius: 8px; } | |
| .seg { display: flex; gap: 4px; padding: 3px; background: var(--key); border-radius: 10px; } | |
| .seg button { flex: 1; padding: 7px 6px; border: 0; background: transparent; border-radius: 8px; font-size: 12px; } | |
| .seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(20,24,29,.12); font-weight: 600; } | |
| #modes { margin-top: 14px; } | |
| .hint { margin-top: 10px; font-size: 12px; color: var(--muted); } | |
| .links { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); } | |
| .links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(20,24,29,.25); } | |
| .links a:hover { border-color: var(--ink); } | |
| button { font: 500 13px/1 Poppins, system-ui, sans-serif; color: var(--ink); background: #fff; border: 1px solid var(--line); | |
| border-radius: 10px; padding: 9px 14px; cursor: pointer; user-select: none; -webkit-user-select: none; } | |
| button:hover { background: #f6f7f9; } | |
| button.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } | |
| button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } | |
| #player { left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); width: min(640px, calc(100vw - 32px)); | |
| padding: 10px 12px; display: flex; align-items: center; gap: 12px; } | |
| #play { min-width: 78px; } | |
| #player .tl { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; } | |
| #time { flex: 1; } | |
| #speeds { flex: none; } | |
| #speeds button { flex: none; padding: 6px 8px; } | |
| #posecard { top: 16px; right: 16px; bottom: 16px; width: min(300px, calc(100vw - 32px)); padding: 12px 14px; display: flex; flex-direction: column; } | |
| #posecard .btns { display: flex; gap: 8px; } | |
| #posecard .btns button { flex: 1; padding: 8px 6px; font-size: 12px; } | |
| #sliders { overflow-y: auto; margin-top: 10px; padding-right: 4px; } | |
| details { border-top: 1px solid var(--line); padding: 6px 0; } | |
| summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; } | |
| .row { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 4px 0; font-size: 12px; color: var(--muted); } | |
| .row output { font-variant-numeric: tabular-nums; color: var(--ink); } | |
| .row input { grid-column: 1 / -1; width: 100%; } | |
| input[type=range] { accent-color: var(--accent); height: 20px; } | |
| body[data-mode="pose"] #player, body:not([data-mode="pose"]) #posecard { display: none; } | |
| body[data-mode="pose"] .hint.dance, body:not([data-mode="pose"]) .hint.pose { display: none; } | |
| @media (max-width: 640px) { | |
| #info { padding: 12px 14px; } #info h1 { font-size: 16px; } #info .sub, .links, .hint { display: none; } | |
| #speeds { display: none; } | |
| #posecard { top: auto; left: 16px; right: 16px; width: auto; height: 42vh; bottom: calc(16px + env(safe-area-inset-bottom)); } | |
| } | |
| #loading { position: fixed; inset: 0; display: grid; place-items: center; background: #eef1f5; z-index: 5; } | |
| #loading .box { width: min(360px, calc(100vw - 32px)); text-align: center; } | |
| #loading h2 { font-size: 18px; font-weight: 600; } | |
| #loading p { color: var(--muted); margin-top: 14px; font-size: 13px; } | |
| #loading .track { height: 4px; background: #dfe4ea; border-radius: 2px; overflow: hidden; margin-top: 18px; } | |
| #bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; } | |
| #loading.err p { color: #b42318; } | |
| body:not(.ready) .card { visibility: hidden; } | |
| [hidden] { display: none ; } | |
| </style> | |
| </head> | |
| <body data-mode="dance"> | |
| <canvas id="view" aria-label="3D view of the LimX Luna humanoid"></canvas> | |
| <section id="info" class="card"> | |
| <h1 data-t="title">Luna in your browser</h1> | |
| <p class="sub" data-t="sub"></p> | |
| <button id="lang" type="button">中文</button> | |
| <div id="modes" class="seg" role="group"> | |
| <button type="button" data-mode="dance" aria-pressed="true" data-t="dance">Dance</button> | |
| <button type="button" data-mode="pose" aria-pressed="false" data-t="pose">Pose</button> | |
| </div> | |
| <p class="hint dance" data-t="keysDance"></p> | |
| <p class="hint pose" data-t="keysPose"></p> | |
| <p class="hint dance" data-t="note"></p> | |
| <p class="links"><span data-t="sources"></span>: | |
| <a href="https://huggingface.co/limxdynamics/luna-description" target="_blank" rel="noopener">luna-description</a> · | |
| <a href="https://github.com/limxdynamics/luna-beyondmimic" target="_blank" rel="noopener">luna-beyondmimic</a></p> | |
| </section> | |
| <div id="player" class="card"> | |
| <button id="play" type="button" class="active">Pause</button> | |
| <div class="tl"><span id="now">0:00.0</span><input id="time" type="range" min="0" max="1" step="0.02" value="0" aria-label="Time"><span id="dur"></span></div> | |
| <div id="speeds" class="seg" role="group" aria-label="Speed"> | |
| <button type="button" data-v="0.25" aria-pressed="false">¼×</button> | |
| <button type="button" data-v="0.5" aria-pressed="false">½×</button> | |
| <button type="button" data-v="1" aria-pressed="true">1×</button> | |
| </div> | |
| </div> | |
| <section id="posecard" class="card"> | |
| <div class="btns"> | |
| <button id="stand" type="button" data-t="stand">Stand pose</button> | |
| <button id="fromDance" type="button" data-t="fromDance">From dance</button> | |
| </div> | |
| <div id="sliders"></div> | |
| </section> | |
| <div id="loading"><div class="box"> | |
| <h2 data-t="title">Luna in your browser</h2> | |
| <div class="track"><div id="bar"></div></div> | |
| <p data-t="loading"></p> | |
| </div></div> | |
| </body> | |
| </html> | |