Spaces:
Running
Running
rail: curl download flow, new-tab links
Browse files- index.html +7 -7
index.html
CHANGED
|
@@ -77,9 +77,9 @@
|
|
| 77 |
</div>
|
| 78 |
<div id="joints"></div>
|
| 79 |
<h2 style="margin-top:14px">Take it home</h2>
|
| 80 |
-
<div class="meta">Same asset, full 4K, real physics
|
| 81 |
<pre id="oneliner"></pre>
|
| 82 |
-
<button class="copy" id="copy">Copy
|
| 83 |
</aside>
|
| 84 |
</main>
|
| 85 |
<script type="importmap">
|
|
@@ -239,11 +239,11 @@ async function loadItem(cls, item) {
|
|
| 239 |
`${item.mass_kg.toFixed(1)} kg · ${item.tris} tris · ` +
|
| 240 |
`${item.joints.length} joints`;
|
| 241 |
document.getElementById("oneliner").textContent =
|
| 242 |
-
`
|
| 243 |
-
`
|
| 244 |
-
`
|
| 245 |
-
`${
|
| 246 |
-
`
|
| 247 |
const gltf = await loader.loadAsync(dsUrl(cls.dataset, item.glb));
|
| 248 |
if (gen !== loadGen) return; // user already switched away — drop this load
|
| 249 |
model = new THREE.Group();
|
|
|
|
| 77 |
</div>
|
| 78 |
<div id="joints"></div>
|
| 79 |
<h2 style="margin-top:14px">Take it home</h2>
|
| 80 |
+
<div class="meta">Same asset, full 4K, real physics:</div>
|
| 81 |
<pre id="oneliner"></pre>
|
| 82 |
+
<button class="copy" id="copy">Copy commands</button>
|
| 83 |
</aside>
|
| 84 |
</main>
|
| 85 |
<script type="importmap">
|
|
|
|
| 239 |
`${item.mass_kg.toFixed(1)} kg · ${item.tris} tris · ` +
|
| 240 |
`${item.joints.length} joints`;
|
| 241 |
document.getElementById("oneliner").textContent =
|
| 242 |
+
`mkdir -p "$PWD/projectsim-assets"\ncd "$PWD/projectsim-assets"\n\n` +
|
| 243 |
+
`curl --fail --location --progress-bar \\\n` +
|
| 244 |
+
` "${HFDS}/${cls.dataset}/resolve/main/${cls.items_dir}/${item.id}/` +
|
| 245 |
+
`${item.id}.blend?download=true" \\\n --output ${item.id}.blend\n\n` +
|
| 246 |
+
`open -a Blender ${item.id}.blend`;
|
| 247 |
const gltf = await loader.loadAsync(dsUrl(cls.dataset, item.glb));
|
| 248 |
if (gen !== loadGen) return; // user already switched away — drop this load
|
| 249 |
model = new THREE.Group();
|