Spaces:
Running
Running
640 px studio thumbnails rendered from the previews
Browse filesFiles changed (5)
33 unmodified lines34353633 unmodified lines*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.glb filter=lfs diff=lfs merge=lfs -text33 unmodified lines3435363733 unmodified lines*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.glb filter=lfs diff=lfs merge=lfs -text*.webp filter=lfs diff=lfs merge=lfs -text
41 unmodified lines4243444546473 unmodified lines51525354555641 unmodified lines- `tools/make_previews.py` makes `previews/<asset>.glb` (a small Draco GLB made withBlender from the USD, textures at 1024 px) and `previews/<asset>.json` (each hinge andslider: the part it moves, pivot, axis and range). Cached in `tools/preview_cache.json`.## Updating3 unmodified lineshf download projectsim/simready-library --repo-type space --local-dir simready-librarycd simready-libraryHF_TOKEN=$(hf auth token) uv run tools/make_previews.pyuv run tools/build_catalog.pyhf upload projectsim/simready-library . --repo-type space --commit-message "Update catalog"```41 unmodified lines4243444546474849503 unmodified lines5455565758596041 unmodified lines- `tools/make_previews.py` makes `previews/<asset>.glb` (a small Draco GLB made withBlender from the USD, textures at 1024 px) and `previews/<asset>.json` (each hinge andslider: the part it moves, pivot, axis and range). Cached in `tools/preview_cache.json`.- `tools/render_thumbs.py` renders `previews/thumbs/<asset>.webp`: 640 px studio thumbnails(Blender Cycles, transparent background, contact shadow) from the preview GLBs. It onlyrenders missing or outdated ones.## Updating3 unmodified lineshf download projectsim/simready-library --repo-type space --local-dir simready-librarycd simready-libraryHF_TOKEN=$(hf auth token) uv run tools/make_previews.pypython3 tools/render_thumbs.pyuv run tools/build_catalog.pyhf upload projectsim/simready-library . --repo-type space --commit-message "Update catalog"```
97 unmodified lines9899100101102103104111 unmodified lines2162172182192202212226 unmodified lines22923023123223323423597 unmodified lines// ---- urls ---------------------------------------------------------------------function fileUrl(a, path) { return `${HF}/datasets/${DATA.dataset}/resolve/${DATA.commit}/${a.id}/${path}`; }function thumbUrl(a, variant) {const suffix = variant === "light" ? "_light" : variant === "transparent" ? "_transparent" : "";return fileUrl(a, `simready_usd/.thumbs/256x256/${a.id}.usd${suffix}.png`);}111 unmodified linesonclick: () => openAsset(a.id), "data-id": a.id,},el("div", { class: "thumb" },el("img", { src: thumbUrl(a, variant), alt: "", loading: "lazy", width: 256, height: 256 }),el("div", { class: "badges" }, el("span", { class: "badge" },a.joints.length ? `${a.joints.length} moving part${a.joints.length > 1 ? "s" : ""}` : "rigid"))),el("div", { class: "card-text" },6 unmodified linesasync function getViewer() {if (viewer || viewerFailed) return viewer;try {const { createViewer } = await import(signed("./viewer.js?v=11"));viewer = createViewer();viewer.setTheme(theme());} catch (e) {97 unmodified lines9899100101102103104105106107111 unmodified lines2192202212222232242256 unmodified lines23223323423523623723897 unmodified lines// ---- urls ---------------------------------------------------------------------function fileUrl(a, path) { return `${HF}/datasets/${DATA.dataset}/resolve/${DATA.commit}/${a.id}/${path}`; }// 640 px studio render from this Space (transparent, works on both themes); the dataset's// 256 px package thumbnail is the fallback.function thumbUrl(a, variant) {if (a.thumb) return signed(`previews/thumbs/${a.id}.webp?v=${encodeURIComponent(a.version || "")}`);const suffix = variant === "light" ? "_light" : variant === "transparent" ? "_transparent" : "";return fileUrl(a, `simready_usd/.thumbs/256x256/${a.id}.usd${suffix}.png`);}111 unmodified linesonclick: () => openAsset(a.id), "data-id": a.id,},el("div", { class: "thumb" },el("img", { src: thumbUrl(a, variant), alt: "", loading: "lazy", decoding: "async", width: 640, height: 640 }),el("div", { class: "badges" }, el("span", { class: "badge" },a.joints.length ? `${a.joints.length} moving part${a.joints.length > 1 ? "s" : ""}` : "rigid"))),el("div", { class: "card-text" },6 unmodified linesasync function getViewer() {if (viewer || viewerFailed) return viewer;try {const { createViewer } = await import(signed("./viewer.js?v=12"));viewer = createViewer();viewer.setTheme(theme());} catch (e) {
7 unmodified lines89101112131468 unmodified lines8384858687887 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=11"><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=11"></script></body></html>7 unmodified lines89101112131468 unmodified lines8384858687887 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=12"><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=12"></script></body></html>
.gitattributes+1
README.md+4
app.js+5-2
data/catalog.json
index.html+2-2