Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(forge): auto-save chip, remix flash/toast, gallery forge section

nirholas7adfd04cf7b9
diff --git a/pages/forge.html b/pages/forge.html
index 6b6b57b88..30f15cf42 100644
--- a/pages/forge.html
+++ b/pages/forge.html
@@ -1385,6 +1385,25 @@
text-overflow: ellipsis;
white-space: nowrap;
}
+ /* Auto-save confirmation chip — shown briefly after generation completes */
+ @keyframes saved-pop {
+ 0% { opacity: 0; transform: translateY(3px); }
+ 20% { opacity: 1; transform: translateY(0); }
+ 80% { opacity: 1; }
+ 100% { opacity: 0; }
+ }
+ .saved-chip {
+ font-size: 0.7rem;
+ color: var(--accent);
+ background: var(--accent-soft);
+ border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
+ border-radius: 999px;
+ padding: 1px 8px;
+ flex: none;
+ white-space: nowrap;
+ animation: saved-pop 3s ease forwards;
+ }
+ .saved-chip.is-hidden { display: none; }
.result-bar .actions {
display: flex;
gap: var(--space-xs);
@@ -2362,6 +2381,7 @@
</div>
<div class="result-bar">
<span class="label" id="result-label"></span>
+ <span class="saved-chip is-hidden" id="result-saved" aria-label="Auto-saved to gallery">Saved ✓</span>
<span
class="views-badge is-hidden"
id="result-views"
diff --git a/public/gallery/index.html b/public/gallery/index.html
index 42bc2ce68..6915a3636 100644
--- a/public/gallery/index.html
+++ b/public/gallery/index.html
@@ -143,6 +143,20 @@
</button>
</div>
</section>
+
+ <!-- From the Forge — auto-saved community 3D models from /forge -->
+ <section class="gallery-forge-section" id="forge-section" hidden>
+ <div class="gallery-forge-head">
+ <div>
+ <h2 class="gallery-forge-title">From the Forge</h2>
+ <p class="gallery-forge-sub">
+ 3D models auto-saved as the community generates them. Click to open in the viewer, or Remix the prompt.
+ </p>
+ </div>
+ <a href="/forge" class="gallery-forge-cta">Create your own →</a>
+ </div>
+ <div class="gallery-forge-grid" id="forge-grid"></div>
+ </section>
</main>
<div id="footer-container"></div>
diff --git a/src/forge-showcase.js b/src/forge-showcase.js
index 590a63338..5f1587562 100644
--- a/src/forge-showcase.js
+++ b/src/forge-showcase.js
@@ -319,10 +319,29 @@ function remixPrompt(prompt) {
if (!box) return;
box.value = prompt;
box.dispatchEvent(new Event('input', { bubbles: true }));
- box.focus();
- // Caret at the end — the natural place to start tweaking.
- box.setSelectionRange(box.value.length, box.value.length);
box.scrollIntoView({ behavior: 'smooth', block: 'center' });
+ // Delay focus + flash until after the scroll settles.
+ setTimeout(() => {
+ box.focus();
+ box.setSelectionRange(box.value.length, box.value.length);
+ // Flash the border so the user clearly sees the prompt landed.
+ box.classList.remove('remix-flash');
+ void box.offsetWidth; // force reflow to restart animation if clicked twice
+ box.classList.add('remix-flash');
+ box.addEventListener('animationend', () => box.classList.remove('remix-flash'), { once: true });
+ }, 300);
+ showRemixToast();
+}
+
+function showRemixToast() {
+ const existing = document.querySelector('.remix-toast');
+ if (existing) existing.remove();
+ const toast = document.createElement('div');
+ toast.className = 'remix-toast';
+ toast.textContent = 'Prompt loaded — edit and Generate';
+ document.body.appendChild(toast);
+ setTimeout(() => toast.classList.add('fade-out'), 2200);
+ setTimeout(() => toast.remove(), 2700);
}
async function loadShowcase() {
diff --git a/src/forge.js b/src/forge.js
index 442fb7381..d5ee5576d 100644
--- a/src/forge.js
+++ b/src/forge.js
@@ -80,6 +80,7 @@ const els = {
errorMessage: document.getElementById('error-message'),
forgeShareBtn: document.getElementById('forge-share-btn'),
segmentBtn: document.getElementById('forge-segment-btn'),
+ savedChip: document.getElementById('result-saved'),
creations: document.getElementById('creations'),
creationsGrid: document.getElementById('creations-grid'),
creationsCount: document.getElementById('creations-count'),
@@ -1206,13 +1207,25 @@ function updateRefineButton() {
}
}
-function showResult(glbUrl, label, meta) {
+function showResult(glbUrl, label, meta, { autoSaved = false } = {}) {
stopElapsed();
resetVerdict();
els.viewer.setAttribute('src', glbUrl);
els.viewer.setAttribute('alt', `3D model: ${label}`);
els.resultLabel.textContent = label;
+ // Hide the saved chip by default; caller re-shows it for fresh generations.
+ if (els.savedChip) els.savedChip.classList.add('is-hidden');
setViewsBadge(meta);
+ if (autoSaved && els.savedChip) {
+ // Re-trigger the animation by forcing a reflow.
+ els.savedChip.classList.remove('is-hidden');
+ void els.savedChip.offsetWidth;
+ els.savedChip.style.animation = 'none';
+ void els.savedChip.offsetWidth;
+ els.savedChip.style.animation = '';
+ // Hide after animation completes (3s).
+ setTimeout(() => els.savedChip?.classList.add('is-hidden'), 3100);
+ }
els.download.href = glbUrl;
els.download.setAttribute(
'download',
@@ -1516,13 +1529,18 @@ async function run(cfg) {
setStep('finish', 'done');
markProgressDone();
// Prefer the poll's recorded meta; fall back to the submit response.
- showResult(done.glb_url, label || 'Forged model', {
- views_used: done.views_used ?? job.views_used,
- multiview: done.multiview ?? job.multiview,
- backend: done.backend ?? job.backend,
- tier: done.tier ?? job.tier,
- path: done.path ?? job.path,
- });
+ showResult(
+ done.glb_url,
+ label || 'Forged model',
+ {
+ views_used: done.views_used ?? job.views_used,
+ multiview: done.multiview ?? job.multiview,
+ backend: done.backend ?? job.backend,
+ tier: done.tier ?? job.tier,
+ path: done.path ?? job.path,
+ },
+ { autoSaved: !!done.creation_id },
+ );
loadGallery();
// Geometry-first and sketch lanes have no reference image — render the
// finished mesh itself as the creation's card visual.