Spaces:
Running
Running
3D viewer with movable joints, theme switch, simpler details
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+1
- README.md+21-20
- app.js+180-112
- data/catalog.json
- index.html+16-3
- previews/adhesive_remover_bottle.glbAdded+3
- previews/adhesive_remover_bottle.jsonAdded+1
- previews/aerosol_can.glbAdded+3
- previews/aerosol_can.jsonAdded+1
- previews/all_purpose_cleaner_bottle.glbAdded+3
- previews/all_purpose_cleaner_bottle.jsonAdded+1
- previews/angle_bracket_long.glbAdded+3
- previews/angle_bracket_long.jsonAdded+1
- previews/angle_bracket_short.glbAdded+3
- previews/angle_bracket_short.jsonAdded+1
- previews/antifreeze_bottle.glbAdded+3
- previews/antifreeze_bottle.jsonAdded+1
- previews/apple.glbAdded+3
- previews/apple.jsonAdded+1
- previews/apple_half.glbAdded+3
- previews/apple_half.jsonAdded+1
- previews/apricot.glbAdded+3
- previews/apricot.jsonAdded+1
- previews/apricot_half.glbAdded+3
- previews/apricot_half.jsonAdded+1
- previews/articulated_desk_lamp.glbAdded+3
- previews/articulated_desk_lamp.jsonAdded+1
- previews/bag_clip.glbAdded+3
- previews/bag_clip.jsonAdded+1
- previews/balsamic_vinegar_bottle.glbAdded+3
- previews/balsamic_vinegar_bottle.jsonAdded+1
- previews/bar_stool_beige_round_back.glbAdded+3
- previews/bar_stool_beige_round_back.jsonAdded+1
- previews/bar_stool_black_armchair.glbAdded+3
- previews/bar_stool_black_armchair.jsonAdded+1
- previews/bar_stool_black_quilted.glbAdded+3
- previews/bar_stool_black_quilted.jsonAdded+1
- previews/bar_stool_black_round_back.glbAdded+3
- previews/bar_stool_black_round_back.jsonAdded+1
- previews/bar_stool_blue_fabric.glbAdded+3
- previews/bar_stool_blue_fabric.jsonAdded+1
- previews/bar_stool_brown_leather.glbAdded+3
- previews/bar_stool_brown_leather.jsonAdded+1
- previews/bar_stool_charcoal_wingback.glbAdded+3
- previews/bar_stool_charcoal_wingback.jsonAdded+1
- previews/bar_stool_dark_brown_shell.glbAdded+3
- previews/bar_stool_dark_brown_shell.jsonAdded+1
- previews/bar_stool_gray_fabric.glbAdded+3
- previews/bar_stool_gray_fabric.jsonAdded+1
- previews/bar_stool_gray_tufted.glbAdded+3
32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.glb filter=lfs diff=lfs merge=lfs -text3 unmodified lines4567789107 unmodified lines1819202122232122232425262 unmodified lines29303132333432333435363637383940414243444546373839404142434445464750514849505152535455565758596061623 unmodified linescolorFrom: redcolorTo: graysdk: staticshort_description: Browse projectsim's sim-ready objects for Isaac Simshort_description: Browse projectsim's sim-ready objects for Isaac Sim in 3Dtags: - robotics - simulation7 unmodified lines# projectsim SimReady Library
Browse every object in [projectsim/simready-assets](https://huggingface.co/datasets/projectsim/simready-assets):sim-ready OpenUSD assets for NVIDIA Isaac Sim, with physics, moving parts and NVIDIASimReady benchmark results. Filter by category, moving parts, size, mass and NVIDIASimReady Central status, open any asset for its details, and copy the download command.sim-ready OpenUSD assets for NVIDIA Isaac Sim, with physics and moving parts. Filter bycategory, moving parts, size and mass, open any asset in 3D, move its doors, lids anddrawers, and copy the download command.
All assets are CC BY 4.0. Credit "projectsim by Kaedim".Need more variations, or your own objects? See the2 unmodified lines
## How it works
The page is static: `index.html`, `app.js` and `style.css` read `data/catalog.json`.Thumbnails and files load straight from the dataset, pinned to the commit the catalogwas built from.The page is static: `index.html`, `app.js` and `style.css` read `data/catalog.json`, and`viewer.js` (three.js) shows the 3D previews. Thumbnails and downloads come straight fromthe dataset, pinned to the commit the catalog was built from. The dataset is only read,never changed.
`tools/build_catalog.py` builds `data/catalog.json`:
- From the dataset, per asset: the package version, the NVIDIA benchmark results, and the SimReady metadata in the root USD layer (category, Wikidata class, mass, size, rigid bodies, joints, whether the base is fixed to the world).- From [NVIDIA-Omniverse/simready-central](https://github.com/NVIDIA-Omniverse/simready-central), through the `gh` CLI: which packages are merged, and which are in an open PR.- Categories are cleaned up and grouped by `tools/groups.json`.
Root USD files are large, so their metadata is cached in `tools/meta_cache.json` bypackage version. A rebuild only downloads new or changed packages.- `tools/build_catalog.py` builds `data/catalog.json` from each package's version and the SimReady metadata in its root USD layer: category, Wikidata class, mass, size, rigid bodies, joints, and whether the base is fixed to the world. `tools/groups.json` cleans up the categories and groups them. Metadata is cached in `tools/meta_cache.json` by package version, so a rebuild only downloads new or changed packages.- `tools/make_previews.py` makes `previews/<asset>.glb` (a small Draco GLB made with Blender from the USD, textures at 1024 px) and `previews/<asset>.json` (each hinge and slider: the part it moves, pivot, axis and range). Cached in `tools/preview_cache.json`.
## Updating
Run this after new packages are uploaded to the dataset, or after an NVIDIA PR isopened or merged:After new packages are uploaded to the dataset:
```bashhf 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"```
`make_previews.py` needs Blender 5 (`--blender /path/to/blender` if it isn't in/Applications). The token only raises Hugging Face's download rate limit.
If the build warns about a category it can't place, add it to `tools/groups.json`(under `aliases` to rename it, or under `categories` to give it a group) and run it again.12343456788910111213141516171819202122239101120 unmodified lines323334505152535455565758353637386339404142664344454647484950515253547576555657585979606162638384856465666768694 unmodified lines747576777879808182838485868788899091929394959697989910010110210315 unmodified lines1191201211261221231242 unmodified lines12712812913513013113713213313413514113613713813914014114214314714814915014414514614714814915015315415515615715815916015115215315415515615715815916016216316116216316416516616715 unmodified lines1831841851851861861871881891901911921931931941951967 unmodified lines2042052062072072082092102112122132142152162172142152162172182192202232242252262272282292302312322332342352362372382392402412422432442452462472482492502212222232242252262272282292302312322332342532542352362372382392 unmodified lines2422432442632642652662672682692452462472712722482492502512752762772522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213225 unmodified lines3283293302913313323333341 unmodified line3363373382993393403013023413423433043053063073443453468 unmodified lines35535635735835936036136236336436536636736836937037137237337437537637737837938038138238338424 unmodified lines4094104114124134144154 unmodified lines42042142242342442542612 unmodified lines439440441442443444445446447448449450451452453454386455456457"use strict";// projectsim SimReady Library: a static catalog of data/catalog.json (built by// tools/build_catalog.py). Images and files load straight from the public dataset,// pinned to the commit the catalog was built from.// tools/build_catalog.py). Thumbnails and files load straight from the public dataset,// pinned to the commit the catalog was built from; 3D previews come from previews/// in this Space (built by tools/make_previews.py) and are shown by viewer.js.
const HF = "https://huggingface.co";const API_DOCS = "https://docs.projectsim.ai/getting-started/quickstart?utm_source=hf_space&utm_medium=detail&utm_content=simready-library";const CENTRAL = "https://huggingface.co/spaces/nvidia/simready-central";const CENTRAL_PRS = "https://github.com/NVIDIA-Omniverse/simready-central/pull/";
const TESTS = { presence: "Renders", pivot: "Pivot at base", ground_drop: "Ground drop", slope_drop: "Slope drop", joint_movement: "Joints move", normals_xz: "Normals", culling_xz: "Back-face culling", light_response: "Light response", preview_surface_renders: "Preview material", semantic_labels_seg_labelled: "Semantic labels", semantic_labels_seg_stripped: "Labels removable",};
const FACETS = [ { key: "moving", title: "Moving parts", options: [20 unmodified lines ["free", "Free-standing", (a) => !a.mounted], ["fixed", "Mounted (fixed base)", (a) => a.mounted], ] }, { key: "nvidia", title: "NVIDIA SimReady Central", options: [ ["merged", "Accepted", (a) => a.nvidia.status === "merged"], ["in_review", "In review", (a) => a.nvidia.status === "in_review"], ["not_submitted", "Not submitted", (a) => a.nvidia.status === "not_submitted"], ] }, { key: "bench", title: "NVIDIA benchmark", options: [ ["pass", "All tests pass", (a) => a.benchmark && a.benchmark.passed], ["issues", "Has known issues", (a) => a.benchmark && !a.benchmark.passed], ] },];
const $ = (id) => document.getElementById(id);const el = (tag, attrs = {}, ...kids) => { const n = document.createElement(tag); const svgTags = { svg: 1, path: 1, circle: 1 }; const n = svgTags[tag] ? document.createElementNS("http://www.w3.org/2000/svg", tag) : document.createElement(tag); for (const [k, v] of Object.entries(attrs)) { if (v == null || v === false) continue; if (k === "class") n.className = v; if (k === "class") n.setAttribute("class", v); else if (k.startsWith("on")) n.addEventListener(k.slice(2), v); else n.setAttribute(k, v === true ? "" : v); } for (const k of kids.flat(Infinity)) if (k != null && k !== false) n.append(k.nodeType ? k : String(k)); return n;};const icon = (d, cls) => el("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", class: cls }, el("path", { d }));const CHEVRON = "M9 6l6 6-6 6";const CROSS = "M6 6l12 12M18 6L6 18";
let DATA = null;const state = { q: "", group: null, category: null, facets: {}, sort: "name", asset: null, open: new Set() };const light = window.matchMedia("(prefers-color-scheme: light)");const state = { q: "", group: null, category: null, facets: {}, sort: "name", asset: null, open: new Set(), view: "3d", bg: null };const systemLight = window.matchMedia("(prefers-color-scheme: light)");
// ---- formatting ---------------------------------------------------------------function maxDim(a) { return a.extents ? Math.max(...a.extents) : 0; }function size(a) { return a.extents ? a.extents.reduce((x, y) => x * y, 1) : 0; }function volume(a) { return a.extents ? a.extents.reduce((x, y) => x * y, 1) : 0; }function fmtLen(m) { return m >= 1 ? `${m.toFixed(2)} m` : m >= 0.01 ? `${(m * 100).toFixed(1)} cm` : `${(m * 1000).toFixed(1)} mm`; }function fmtDims(a) { if (!a.extents) return "—"; const unitM = maxDim(a) >= 1; const f = (v) => unitM ? v.toFixed(2) : (v * 100).toFixed(1); return `${a.extents.map(f).join(" × ")} ${unitM ? "m" : "cm"}`; const metres = maxDim(a) >= 1; const f = (v) => metres ? v.toFixed(2) : (v * 100).toFixed(1); return `${a.extents.map(f).join(" × ")} ${metres ? "m" : "cm"}`;}function fmtMass(kg) { if (kg == null) return "—";4 unmodified lines if (j.type === "hinge") return `${Math.round(j.lower)}° to ${Math.round(j.upper)}°`; return `${fmtLen(Math.abs(j.upper - j.lower))} travel`;}const fmtValue = (type, v) => type === "hinge" ? `${Math.round(v)}°` : fmtLen(Math.abs(v)).replace(/^/, v < 0 ? "−" : "");const partsLabel = (a) => a.joints.length ? `${a.joints.length} moving part${a.joints.length > 1 ? "s" : ""}` : "Rigid";const cap = (s) => s ? s[0].toUpperCase() + s.slice(1) : s;
// ---- theme --------------------------------------------------------------------function theme() { const t = document.documentElement.dataset.theme; return t === "light" || t === "dark" ? t : systemLight.matches ? "light" : "dark";}function applyTheme() { const t = theme(); document.documentElement.classList.toggle("is-light", t === "light"); $("theme").setAttribute("aria-label", t === "light" ? "Switch to dark theme" : "Switch to light theme"); if (viewer) viewer.setTheme(t);}
// ---- 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`);}
// ---- filtering ----------------------------------------------------------------function matchesQuery(a, words) { if (!words.length) return true; const hay = a._hay || (a._hay = [a.id, a.name, a.class, a.category, a.group, ...a.joints.map((j) => `${j.name} ${j.type}`)]15 unmodified lines return true;}function words() { return state.q.toLowerCase().replace(/_/g, " ").split(/\s+/).filter(Boolean); }
function filtered() { const w = words(); const list = DATA.assets.filter((a) => libraryPass(a) && facetPass(a) && matchesQuery(a, w));2 unmodified lines newest: (x, y) => (y.version || "").localeCompare(x.version || "") || x.name.localeCompare(y.name), "mass-desc": (x, y) => (y.mass || 0) - (x.mass || 0), "mass-asc": (x, y) => (x.mass || 0) - (y.mass || 0), "size-desc": (x, y) => size(y) - size(x), "size-desc": (x, y) => volume(y) - volume(x), "parts-desc": (x, y) => y.joints.length - x.joints.length || x.name.localeCompare(y.name), }[state.sort]; }[state.sort] || ((x, y) => x.name.localeCompare(y.name)); return list.sort(by);}
// Library tree: counts reflect search and facets, not the library selection itself.// ---- library ------------------------------------------------------------------// A group row selects the group on first click; clicking the selected group again// collapses or expands it. The caret always just collapses or expands.function renderLibrary() { const w = words(); const pool = DATA.assets.filter((a) => facetPass(a) && matchesQuery(a, w)); const ul = $("library"); ul.replaceChildren(); const row = (label, n, current, onclick, extra = {}) => el("button", { class: "lib-row", type: "button", "aria-current": current ? "true" : "false", onclick, ...extra, }, extra.caret ? el("span", { class: "caret", "aria-hidden": "true" }, "›") : null, label, el("span", { class: "n" }, n)); ul.append(el("li", {}, row("All assets", pool.length, !state.group && !state.category, () => select(null, null)))); const all = !state.group && !state.category; ul.append(el("li", {}, el("button", { class: "lib-row", type: "button", "aria-current": all ? "true" : "false", onclick: () => select(null, null) }, el("span", { class: "spacer" }), "All assets", el("span", { class: "n" }, pool.length)))); for (const g of DATA.groups) { if (!DATA.assets.some((a) => a.group === g)) continue; const open = state.open.has(g); const inGroup = pool.filter((a) => a.group === g); const total = DATA.assets.some((a) => a.group === g); if (!total) continue; const open = state.open.has(g) || state.group === g; const cats = [...new Set(DATA.assets.filter((a) => a.group === g).map((a) => a.category))].sort(); const li = el("li", {}, row(g, inGroup.length, state.group === g && !state.category, () => { if (state.group === g && !state.category) { state.open.has(g) ? state.open.delete(g) : state.open.add(g); renderLibrary(); return; } state.open.add(g); select(g, null); }, { caret: true, "aria-expanded": open ? "true" : "false" })); const current = state.group === g && !state.category; const toggle = (e) => { e.stopPropagation(); open ? state.open.delete(g) : state.open.add(g); renderLibrary(); }; const li = el("li", {}, el("button", { class: "lib-row", type: "button", "aria-current": current ? "true" : "false", "aria-expanded": open ? "true" : "false", onclick: () => { if (current) { open ? state.open.delete(g) : state.open.add(g); renderLibrary(); } else { state.open.add(g); select(g, null); } }, }, el("span", { class: "caret", onclick: toggle }, icon(CHEVRON)), g, el("span", { class: "n" }, inGroup.length))); if (open) { li.append(el("ul", { class: "lib-sub" }, cats.map((c) => el("li", {}, row(cap(c), inGroup.filter((a) => a.category === c).length, state.category === c, () => select(g, c)))))); const cats = [...new Set(DATA.assets.filter((a) => a.group === g).map((a) => a.category))].sort(); li.append(el("ul", { class: "lib-sub" }, cats.map((c) => el("li", {}, el("button", { class: "lib-row", type: "button", "aria-current": state.category === c ? "true" : "false", onclick: () => select(g, c), }, cap(c), el("span", { class: "n" }, inGroup.filter((a) => a.category === c).length)))))); } ul.append(li); }15 unmodified lines }, label, el("span", { class: "n" }, n)); })))); } const active = Object.values(state.facets).some((s) => s.size) || state.q || state.group; $("reset").hidden = !active; $("reset").hidden = !(Object.values(state.facets).some((s) => s.size) || state.q || state.group);}
function renderChips() { const chips = $("chips"); chips.replaceChildren(); const chip = (label, onclear) => el("span", { class: "chip" }, label, el("button", { type: "button", "aria-label": `Remove ${label}`, onclick: onclear }, "×")); el("button", { type: "button", "aria-label": `Remove ${label}`, onclick: onclear }, icon(CROSS))); if (state.category) chips.append(chip(cap(state.category), () => select(state.group, null))); else if (state.group) chips.append(chip(state.group, () => select(null, null))); for (const f of FACETS) for (const v of state.facets[f.key] || []) {7 unmodified lines const n = DATA.assets.length; $("count").replaceChildren(el("strong", {}, list.length), list.length === n ? " assets" : ` of ${n} assets`); $("empty").hidden = list.length > 0; const variant = light.matches ? "light" : "dark"; const variant = theme(); $("grid").replaceChildren(...list.map((a) => el("li", {}, el("button", { class: "card", type: "button", "aria-current": state.asset === a.id ? "true" : "false", onclick: () => 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} joint${a.joints.length > 1 ? "s" : ""}` : "rigid"), a.nvidia.status === "merged" ? el("span", { class: "badge nv", title: "Accepted into NVIDIA SimReady Central" }, "NVIDIA") : a.nvidia.status === "in_review" ? el("span", { class: "badge review", title: "In NVIDIA review" }, "IN REVIEW") : null)), 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" }, el("span", { class: "card-name" }, a.name), el("span", { class: "card-meta" }, `${cap(a.class || a.category)} · ${fmtMass(a.mass)}`))))));}
function benchTable(a) { if (!a.benchmark) return el("p", { class: "note" }, "No benchmark results in this package."); const rows = {}; for (const [t, e, s] of a.benchmark.tests) (rows[t] = rows[t] || {})[e] = s; const res = (s) => { const k = s === "pass" ? "pass" : s === "fail" || s === "error" ? "fail" : s ? "skip" : "none"; return el("span", { class: `res ${k}` }, s ? (s === "skipped" ? "skip" : s) : "–"); }; const order = Object.keys(TESTS).filter((t) => rows[t]).concat(Object.keys(rows).filter((t) => !TESTS[t])); const fails = a.benchmark.tests.filter(([, , s]) => s === "fail" || s === "error").length; return el("div", {}, el("table", { class: "bench" }, el("thead", {}, el("tr", {}, el("th", {}, "Test"), el("th", { class: "r" }, "PhysX"), el("th", { class: "r" }, "Newton"))), el("tbody", {}, order.map((t) => el("tr", {}, el("td", {}, TESTS[t] || t), el("td", { class: "r" }, res(rows[t].physx)), el("td", { class: "r" }, res(rows[t].newton)))))), el("p", { class: "note" }, fails ? `${fails} test${fails > 1 ? "s" : ""} failed. NVIDIA accepts some known benchmark limits (very small objects, dark materials, slopes) when they're disclosed in the submission.` : `All tests passed (Isaac Sim ${a.benchmark.run ? a.benchmark.run.slice(0, 10) : ""}).`));}
function nvidiaStatus(a) { const s = a.nvidia.status; const body = s === "merged" ? ["Accepted into NVIDIA SimReady Central. ", el("a", { href: `${CENTRAL}?q=${encodeURIComponent(a.id.replace(/_/g, " "))}`, target: "_blank", rel: "noopener" }, "Find it there")] : s === "in_review" ? ["In NVIDIA review, ", el("a", { href: CENTRAL_PRS + a.nvidia.pr, target: "_blank", rel: "noopener" }, `PR #${a.nvidia.pr}`)] : ["Not submitted to NVIDIA SimReady Central yet."]; return el("div", { class: `status ${s}` }, el("span", { class: "status-dot", "aria-hidden": "true" }), el("span", {}, body));// ---- detail + 3D viewer -------------------------------------------------------let viewer = null, viewerFailed = false, loadedId = null, rigState = [];async function getViewer() { if (viewer || viewerFailed) return viewer; try { const { createViewer } = await import("./viewer.js?v=2"); viewer = createViewer(); viewer.setTheme(theme()); } catch (e) { viewerFailed = true; } return viewer;}
function copyButton(text, label = "Copy") { const b = el("button", { class: "btn", type: "button" }, label);function copyButton(text, label = "Copy", cls = "btn") { const b = el("button", { class: cls, type: "button" }, label); b.addEventListener("click", async () => { try { await navigator.clipboard.writeText(text); b.textContent = "Copied"; } catch { b.textContent = "Select and copy"; }2 unmodified lines return b;}
function renderDetail() { const a = state.asset && DATA.assets.find((x) => x.id === state.asset); const pane = $("detail"); document.querySelector(".layout").classList.toggle("has-detail", !!a); pane.hidden = !a; if (!a) return; let variant = light.matches ? "light" : "dark";function imageView(a) { let variant = state.bg || theme(); const img = el("img", { src: thumbUrl(a, variant), alt: `${a.name} preview` }); const frame = el("div", { class: `thumb ${variant === "light" ? "light" : ""}` }, img); const bg = (v, label) => el("button", { const frame = el("div", { class: `thumb ${variant === "transparent" ? "checker" : variant}` }, img); const pick = (v, label) => el("button", { class: "opt", type: "button", "aria-pressed": v === variant ? "true" : "false", onclick: (e) => { variant = v; img.src = thumbUrl(a, v); frame.className = `thumb ${v === "light" ? "light" : v === "transparent" ? "checker" : ""}`; e.currentTarget.parentNode.querySelectorAll(".opt").forEach((b) => b.setAttribute("aria-pressed", b === e.currentTarget ? "true" : "false")); variant = state.bg = v; img.src = thumbUrl(a, v); frame.className = `thumb ${v === "transparent" ? "checker" : v}`; e.currentTarget.parentNode.querySelectorAll(".bg").forEach((b) => b.setAttribute("aria-pressed", b === e.currentTarget ? "true" : "false")); }, }, label); return { frame, controls: [pick("dark", "Dark"), pick("light", "Light"), pick("transparent", "Transparent")].map((b) => (b.classList.add("bg"), b)) };}
function jointRows(a) { // One row per joint; in 3D view each row gets a slider bound to the viewer. const list = el("div", { class: "joints" }); const rows = a.joints.map((j) => { const out = el("output", {}, `${j.type}, ${fmtRange(j)}`); const row = el("div", { class: "joint", "data-joint": j.name }, el("div", { class: "joint-head" }, el("code", {}, j.name), out)); row._out = out; row._joint = j; list.append(row); return row; }); return { list, rows };}
function bindSliders(rows, rig) { rigState = rig; rig.forEach((r, i) => { const row = rows.find((x) => x.dataset.joint === r.name); if (!row) return; const step = r.type === "hinge" ? 1 : Math.max((r.hi - r.lo) / 200, 0.0005); const input = el("input", { type: "range", min: r.lo, max: r.hi, step, value: r.val, "aria-label": `${r.name} position` }); input.addEventListener("input", () => viewer.setJoint(i, parseFloat(input.value))); row.append(input); row._input = input; r.row = row; row._out.textContent = fmtValue(r.type, r.val); }); viewer.onJoint((i, v) => { const r = rigState[i]; if (!r || !r.row) return; r.row._input.value = v; r.row._out.textContent = fmtValue(r.type, v); });}
async function renderDetail() { const a = state.asset && DATA.assets.find((x) => x.id === state.asset); const pane = $("detail"); document.querySelector(".layout").classList.toggle("has-detail", !!a); pane.hidden = !a; if (!a) { loadedId = null; return; } const mode = a.preview && !viewerFailed ? state.view : "image"; const box = el("div", { class: "viewer" }); const bar = el("div", { class: "viewer-bar" }); const tab = (v, label) => el("button", { class: "opt", type: "button", "aria-pressed": mode === v ? "true" : "false", onclick: () => { if (state.view !== v) { state.view = v; renderDetail(); } }, }, label); if (a.preview && !viewerFailed) bar.append(tab("3d", "3D"), tab("image", "Image")); const { list: jointList, rows } = jointRows(a); const jointActions = el("div", { class: "joint-actions" });
if (mode === "image") { const img = imageView(a); box.append(img.frame); bar.append(...img.controls); } 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")); } box.append(bar);
const cmd = `hf download ${DATA.dataset} --repo-type dataset --include "${a.id}/*" --local-dir simready-assets`; const folder = `${HF}/datasets/${DATA.dataset}/tree/main/${a.id}`; const usd = `${HF}/datasets/${DATA.dataset}/blob/main/${a.id}/simready_usd/${a.id}.usd`;5 unmodified lines ["Rigid bodies", a.rigid_bodies], ["Moving parts", partsLabel(a)], ["Placement", a.mounted ? "Mounted: base fixed to the world where you place it" : "Free-standing"], ["Physics", "PhysX (Isaac Sim)"], ["Physics", "PhysX (NVIDIA Isaac Sim)"], ["Format", `OpenUSD${a.glass ? ", glass MDL shaders included" : ""}`], ["License", "CC BY 4.0 · credit “projectsim by Kaedim”"], ["Version", a.version],1 unmodified line $("detail-body").replaceChildren( el("div", {}, el("div", { class: "detail-head" }, el("h2", {}, a.name), el("button", { class: "icon-button", type: "button", "aria-label": "Close details", onclick: () => openAsset(null) }, "×")), el("button", { class: "icon-button", type: "button", "aria-label": "Close details", onclick: () => openAsset(null) }, icon(CROSS))), el("p", { class: "detail-sub" }, `${cap(a.class || a.category)} · ${partsLabel(a)}`)), el("div", { class: "viewer" }, frame, el("div", { class: "viewer-bar" }, bg("dark", "Dark"), bg("light", "Light"), bg("transparent", "Transparent"))), nvidiaStatus(a), box, a.joints.length ? el("section", {}, el("h3", { class: "section-title" }, "Moving parts"), jointList, jointActions) : null, el("dl", { class: "facts" }, facts.map(([k, v]) => [el("dt", {}, k), el("dd", {}, v ?? "—")])), a.joints.length ? el("section", {}, el("h3", { class: "section-title" }, "Moving parts"), el("ul", { class: "parts" }, a.joints.map((j) => el("li", {}, el("code", {}, j.name), el("span", { class: "kind" }, `${j.type}, ${fmtRange(j)}`))))) : null, el("section", {}, el("h3", { class: "section-title" }, "NVIDIA benchmark"), benchTable(a)), el("section", { class: "actions" }, el("h3", { class: "section-title" }, "Get it"), el("div", { class: "cmd" }, el("code", {}, cmd), copyButton(cmd)), el("div", { class: "btn-row" },8 unmodified lines el("a", { class: "btn", href: "mailto:team@projectsim.ai" }, "team@projectsim.ai"))), ); $("detail-body").scrollTop = 0;
if (mode !== "3d") return; const v = await getViewer(); if (!v) { renderDetail(); return; } if (state.asset !== a.id) return; box.prepend(v.element); v.resize(); let rig; if (loadedId === a.id && rigState.length) { rig = rigState.map((r) => ({ ...r })); } else { loadedId = a.id; rig = await v.load(`previews/${a.id}.glb`, `previews/${a.id}.json`); if (state.asset !== a.id) return; } if (rig.length) { bindSliders(rows, rig); jointActions.append( el("button", { class: "btn small", type: "button", onclick: () => v.openJoints() }, "Open all"), el("button", { class: "btn small", type: "button", onclick: () => v.resetJoints() }, "Reset")); }}
// ---- state + url --------------------------------------------------------------function syncUrl() { const p = new URLSearchParams(); if (state.q) p.set("q", state.q);24 unmodified lines refresh();}function openAsset(id) { if (id !== state.asset) { state.view = "3d"; state.bg = null; } state.asset = id; renderDetail(); document.querySelectorAll(".card").forEach((c) => c.setAttribute("aria-current", c.dataset.id === id ? "true" : "false"));4 unmodified lines}
async function start() { applyTheme(); try { DATA = await (await fetch("data/catalog.json", { cache: "no-cache" })).json(); } catch {12 unmodified lines const open = $("side").classList.toggle("open"); $("filters-toggle").setAttribute("aria-expanded", open ? "true" : "false"); }); $("theme").addEventListener("click", () => { const next = theme() === "light" ? "dark" : "light"; document.documentElement.dataset.theme = next; try { localStorage.setItem("theme", next); } catch (e) { /* private mode: theme lasts this visit */ } applyTheme(); renderGrid(); if (state.view === "image") renderDetail(); }); systemLight.addEventListener("change", () => { applyTheme(); renderGrid(); }); document.addEventListener("keydown", (e) => { if (e.key === "Escape") { if (state.asset) openAsset(null); else closeSideOnPhone(); } if (e.key === "/" && document.activeElement !== $("q")) { e.preventDefault(); $("q").focus(); } }); light.addEventListener("change", () => { renderGrid(); renderDetail(); }); refresh(); renderDetail();}3 unmodified lines456778910111112131415161718192021222310 unmodified lines3435363738394041424339 unmodified lines838485738687883 unmodified lines <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> <title>projectsim SimReady Library</title> <meta name="description" content="Browse projectsim's sim-ready objects for NVIDIA Isaac Sim: categories, physics, moving parts and NVIDIA benchmark results."> <meta name="description" content="Browse projectsim's sim-ready objects for NVIDIA Isaac Sim: categories, physics and moving parts, with an interactive 3D preview."> <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"> <link rel="stylesheet" href="style.css?v=2"> <script type="importmap"> { "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js", "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/" } } </script> <script> // Apply a saved theme before first paint, so the page doesn't flash the other theme. try { const t = localStorage.getItem("theme"); if (t === "light" || t === "dark") document.documentElement.dataset.theme = t; } catch (e) {} </script></head><body> <header class="top">10 unmodified lines <nav class="top-links"> <a id="link-dataset" href="https://huggingface.co/datasets/projectsim/simready-assets" target="_blank" rel="noopener">Dataset</a> <a class="cta" href="https://docs.projectsim.ai/getting-started/quickstart?utm_source=hf_space&utm_medium=header&utm_content=simready-library" target="_blank" rel="noopener">Generate your own</a> <button id="theme" class="icon-button theme-toggle" type="button" aria-label="Switch to light theme"> <svg class="i-sun" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4.2"/><path d="M12 2.5v2.2M12 19.3v2.2M2.5 12h2.2M19.3 12h2.2M5.3 5.3l1.6 1.6M17.1 17.1l1.6 1.6M5.3 18.7l1.6-1.6M17.1 6.9l1.6-1.6"/></svg> <svg class="i-moon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.2 14.6A8.3 8.3 0 0 1 9.4 3.8a8.3 8.3 0 1 0 10.8 10.8Z"/></svg> </button> </nav> <button id="filters-toggle" class="filters-toggle" type="button" aria-controls="side" aria-expanded="false">Filters</button> </header>39 unmodified lines </aside> </div>
<script src="app.js"></script> <script src="app.js?v=2"></script></body></html>123version https://git-lfs.github.com/spec/v1oid sha256:72cfa32f0572cfd4469333b818e4a1dcc5052bcd968b0b4d6c057628c8ed86desize 2408881{"joints":[{"name":"cap_twist","type":"hinge","parent":"bottle","child":"cap","pivot":[0.0,0.204,-0.0],"axis":[-0.0,1.0,-0.0],"lower":0.0,"upper":360.0}]}123version https://git-lfs.github.com/spec/v1oid sha256:a9eaf175b79bacd2c5ff8dc0193017e1c2644f4c0e43408dc672708c735b4905size 2794121{"joints":[{"name":"cap_lift","type":"slider","parent":"can","child":"cap","pivot":[0.0,0.1715,-0.0],"axis":[-0.0,1.0,-0.0],"lower":0.0,"upper":0.032},{"name":"spray_press","type":"slider","parent":"can","child":"button","pivot":[0.0,0.178,-0.0],"axis":[-0.0,-1.0,0.0],"lower":0.0,"upper":0.0025}]}123version https://git-lfs.github.com/spec/v1oid sha256:6dd30c836986fcf77a2269a55cf4cde39442c0ae1f2847c2b994f3a3b8fed64fsize 3442081{"joints":[{"name":"cap_twist","type":"hinge","parent":"bottle","child":"sprayer","pivot":[0.006,0.23,-0.0],"axis":[-0.0,1.0,-0.0],"lower":0.0,"upper":360.0},{"name":"trigger_squeeze","type":"hinge","parent":"sprayer","child":"trigger","pivot":[-0.026,0.265,-0.0],"axis":[-0.0,-0.0,-1.0],"lower":-18.33465,"upper":0.0}]}123version https://git-lfs.github.com/spec/v1oid sha256:e3a312688a3e961bc3d7866f692f7ceed77325f7b298a6e6edc96b186cdc8ed2size 3312441{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:915fa7226fa59ae0f4d82a57bec33863f63f0f3dbc24d25140b822347f782f16size 3101041{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:5cd66ae94474168a5b573093b669050f5b0e9b23f7611cdd02dde0153a65ddd2size 3321641{"joints":[{"name":"cap_twist","type":"hinge","parent":"bottle","child":"cap","pivot":[-0.061,0.328,-0.0],"axis":[-0.0,1.0,-0.0],"lower":0.0,"upper":359.999969}]}123version https://git-lfs.github.com/spec/v1oid sha256:db214f7f2cfe0f303b867b99bb567292cb14a2963445c6d187dce570b7fac3b0size 3307001{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:8ffc9c213140dd1b2aa8a72300cc8487f4290954839f7bdba0e66f35f05a2e67size 3418361{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:b43767ecc5696061af2d92ee24a2fd936725a8dfe9bf85c1ee96f631b4e631d7size 2306961{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:938f3811e43c1fe9d006c4b16510b85e577eb5589fa690658c51a3bbff5f0fefsize 2525521{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:63a8662d11b8783ecb342d010ba717193f64b575285f9c267f5fcc9ca60140f4size 5708081{"joints":[{"name":"shoulder","type":"hinge","parent":"base","child":"lower","pivot":[0.0,0.121,-0.0],"axis":[-0.0,-0.0,-1.0],"lower":-17.188734,"upper":17.188734},{"name":"elbow","type":"hinge","parent":"lower","child":"upper","pivot":[0.15,0.391,-0.0],"axis":[-0.0,-0.0,-1.0],"lower":-16.042818,"upper":21.772396},{"name":"head_tilt","type":"hinge","parent":"upper","child":"shade","pivot":[-0.083,0.52,-0.0],"axis":[-0.0,-0.0,-1.0],"lower":-22.918312,"upper":22.918312}]}123version https://git-lfs.github.com/spec/v1oid sha256:9dacf9bdb1ba56f1a659b11000b257b17103d500264d40886a30b124f7e70b74size 2645841{"joints":[{"name":"jaw_hinge","type":"hinge","parent":"front","child":"rear","pivot":[0.0,0.052,-0.0],"axis":[1.0,0.0,-0.0],"lower":0.0,"upper":25.7831}]}123version https://git-lfs.github.com/spec/v1oid sha256:0e06fe31154b7337a75013d8b9788bca29cb89c1588a7d64d6262986d1f782edsize 4328921{"joints":[{"name":"stopper_lift","type":"slider","parent":"bottle","child":"closure","pivot":[0.0,0.269,-0.0],"axis":[-0.0,1.0,-0.0],"lower":0.0,"upper":0.065}]}123version https://git-lfs.github.com/spec/v1oid sha256:dc137bca241cc3cc84ad7c787f37616f3b4dba9b7e890d0583d32dbc013871f7size 3480321{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:e8685e49c80c5d72c270b1946a62268fbc5dad3b38166fcc0a40c37b2bb46cffsize 3204201{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:68f54b6970b53cea837283f87de1eb8b0049f375444d0be7ad9671fa89307c9bsize 3313761{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:d4653ffdf9c1f6da57bb3b73c79f6145842da230821d6c53caf0cd1da3a87cc0size 4830281{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:4a6d5fea66915e9a825da9b14b92524495d35766ccbbf04bd461806b41df144asize 2955681{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:993d5c9b01815ca03b66d8490308968cefc725afbcda106afa86abe02c1d2401size 3235281{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:52fe47d3a8a6c51713077ac3c9285e3c2804bf9a28fa31acc6612c2236177994size 2829561{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:fe3bde988b40f8cbbf8781478448e74ca0340864f8099e9e92130b66b3c50106size 5952681{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:9413d772071e9bfa850b289988b8951bfecaaf4550f4220a7aaea076248ec1f6size 3226961{"joints":[]}123version https://git-lfs.github.com/spec/v1oid sha256:755d1a0966601645e193c556bdec2a0adfcc2e42e504508c31db99555a2e86d1size 306204.gitattributes+1
README.md+21-20
app.js+180-112
data/catalog.json
index.html+16-3
previews/adhesive_remover_bottle.glbAdded+3
previews/adhesive_remover_bottle.jsonAdded+1
previews/aerosol_can.glbAdded+3
previews/aerosol_can.jsonAdded+1
previews/all_purpose_cleaner_bottle.glbAdded+3
previews/all_purpose_cleaner_bottle.jsonAdded+1
previews/angle_bracket_long.glbAdded+3
previews/angle_bracket_long.jsonAdded+1
previews/angle_bracket_short.glbAdded+3
previews/angle_bracket_short.jsonAdded+1
previews/antifreeze_bottle.glbAdded+3
previews/antifreeze_bottle.jsonAdded+1
previews/apple.glbAdded+3
previews/apple.jsonAdded+1
previews/apple_half.glbAdded+3
previews/apple_half.jsonAdded+1
previews/apricot.glbAdded+3
previews/apricot.jsonAdded+1
previews/apricot_half.glbAdded+3
previews/apricot_half.jsonAdded+1
previews/articulated_desk_lamp.glbAdded+3
previews/articulated_desk_lamp.jsonAdded+1
previews/bag_clip.glbAdded+3
previews/bag_clip.jsonAdded+1
previews/balsamic_vinegar_bottle.glbAdded+3
previews/balsamic_vinegar_bottle.jsonAdded+1
previews/bar_stool_beige_round_back.glbAdded+3
previews/bar_stool_beige_round_back.jsonAdded+1
previews/bar_stool_black_armchair.glbAdded+3
previews/bar_stool_black_armchair.jsonAdded+1
previews/bar_stool_black_quilted.glbAdded+3
previews/bar_stool_black_quilted.jsonAdded+1
previews/bar_stool_black_round_back.glbAdded+3
previews/bar_stool_black_round_back.jsonAdded+1
previews/bar_stool_blue_fabric.glbAdded+3
previews/bar_stool_blue_fabric.jsonAdded+1
previews/bar_stool_brown_leather.glbAdded+3
previews/bar_stool_brown_leather.jsonAdded+1
previews/bar_stool_charcoal_wingback.glbAdded+3
previews/bar_stool_charcoal_wingback.jsonAdded+1
previews/bar_stool_dark_brown_shell.glbAdded+3
previews/bar_stool_dark_brown_shell.jsonAdded+1
previews/bar_stool_gray_fabric.glbAdded+3
previews/bar_stool_gray_fabric.jsonAdded+1
previews/bar_stool_gray_tufted.glbAdded+3