1c837766cd
Add backend-driven assembly and simulation experiences, MAKE branding, mobile rendering budgets and desktop-only CAD/PCB routes. Improve logo loading progress, document image recovery and URDF request handling; include dev packaging and regression coverage.
29 lines
2.5 KiB
HTML
29 lines
2.5 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
|
<title>小鸭子上传前核验 · make</title>
|
|
<link rel="stylesheet" href="/css/fonts.css"><link rel="stylesheet" href="/css/style.css"><link rel="stylesheet" href="/css/assembly.css">
|
|
<script type="importmap">{"imports":{"three":"/vendor/three/build/three.module.min.js","three/addons/":"/vendor/three/examples/jsm/"}}</script>
|
|
<style>main{max-width:1100px;margin:40px auto;padding:24px}h1{font-size:28px}p{color:#8b939e;line-height:1.8;margin:16px 0}.stage{height:60vh;min-height:340px;margin-top:24px}.actions{display:flex;gap:12px;flex-wrap:wrap}output{display:block;margin-top:16px;color:#c8ff3e}.btn{min-height:44px}</style>
|
|
</head><body><main>
|
|
<h1>Microduck · 上传前本地核验</h1>
|
|
<p>这是本次上传文件的本地预览,使用与社区详情相同的资源字段和播放器。文件尚未重新上传后台。整机按原运动学和原配色导出;运动资源保持原样。</p>
|
|
<div class="actions"><button class="btn btn-primary" id="walk" disabled>行走演示</button><button class="btn" id="reset">重置视角</button><a class="btn" href="/project/?id=b7drj14qq1nf">查看后端 Microban 项目</a></div>
|
|
<output id="status">正在读取上传资料…</output><div class="stage" id="stage"></div>
|
|
</main><script type="module">
|
|
import {AssemblyViewer} from '/js/assembly-viewer.js';
|
|
import {openWalkingDemo} from '/js/walking.js';
|
|
const $=id=>document.getElementById(id);
|
|
const controller=new AbortController();let viewer;
|
|
try {
|
|
const project=await fetch('/deliverables/upload-retest/microduck.project.json').then(r=>r.json());
|
|
// Rebase this local-only fixture for LAN checks; production uses exact API URLs.
|
|
for(const key of ['modelGlbUrl','walkingResourcesBaseUrl'])project[key]=new URL(new URL(project[key]).pathname,location.origin).href;
|
|
project.walkingResourcesFiles.forEach(f=>f.url=new URL(new URL(f.url).pathname,location.origin).href);
|
|
viewer=new AssemblyViewer($('stage'));await viewer.loadGlb(project.modelGlbUrl,controller.signal);
|
|
$('status').textContent='整机已加载 · 166 个运动文件 · 原版小鸭子运行器';
|
|
$('walk').disabled=false;$('walk').onclick=()=>openWalkingDemo(project);
|
|
$('reset').onclick=()=>viewer.resetView();
|
|
}catch(e){$('status').textContent=e.message;}
|
|
addEventListener('pagehide',()=>{controller.abort();viewer?.dispose();},{once:true});
|
|
</script></body></html>
|