Spaces:
Running
Running
Show why the 3D view failed, if it does
Browse filesFiles changed (2)
- app.js+5-3
- index.html+2-2
219 unmodified lines22022122222322322422522622722722822923023123123223323423578 unmodified lines314315316317318319320219 unmodified lines}
// ---- detail + 3D viewer -------------------------------------------------------let viewer = null, viewerFailed = false, loadedId = null, rigState = [];let viewer = null, viewerFailed = null, loadedId = null, rigState = [];async function getViewer() { if (viewer || viewerFailed) return viewer; try { const { createViewer } = await import("./viewer.js?v=3"); const { createViewer } = await import("./viewer.js?v=4"); viewer = createViewer(); viewer.setTheme(theme()); } catch (e) { viewerFailed = true; console.error("3D viewer failed to start", e); viewerFailed = String((e && e.message) || e).slice(0, 160); } return viewer;}78 unmodified lines const img = imageView(a); box.append(img.frame); bar.append(...img.controls); if (a.preview && viewerFailed) bar.append(el("span", { class: "hint" }, `3D view unavailable: ${viewerFailed}`)); } else { bar.append(el("span", { class: "hint" }, a.joints.length ? "Drag a part to move it 路 drag to orbit 路 scroll to zoom" : "Drag to orbit 路 scroll to zoom")); }7 unmodified lines8910111112131468 unmodified lines838485868687887 unmodified lines <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap"> <link rel="stylesheet" href="style.css?v=3"> <link rel="stylesheet" href="style.css?v=4"> <script type="importmap"> { "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",68 unmodified lines </aside> </div>
<script src="app.js?v=3"></script> <script src="app.js?v=4"></script></body></html>app.js+5-3
index.html+2-2