Skip to content

💃 Free CC0 mannequin pose reference library for AI image tools (Nano Banana, ChatGPT, ComfyUI, Midjourney) — 250+ poses × 5 angles in line art, names in ja/zh/en/ko

feat(web): preload the lightbox's next angles, formats and pose

wquguru56ada9a923be
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f7b07e84..736f13ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,9 @@ the catalog schema.
## [Unreleased]
### Changed
+- The lightbox preloads what the next step needs once the shown images are in: the overview's other angles, an
+ enlarged format's other angles and this angle's other formats, and the next pose's opening view. Low priority,
+ skipped on Save-Data and 2G connections.
- Enlarged formats get a format row under the image: "All" (the overview) and each format of the set, one tap to switch;
it replaces the "← All formats" buttons. On phones, swiping up and down on the image steps through the same row and
flashes the format name. The phone overview shows all five images (three columns, the photo filling the third), and
diff --git a/docs/DESIGN.md b/docs/DESIGN.md
index a5850616..9adde2e7 100644
--- a/docs/DESIGN.md
+++ b/docs/DESIGN.md
@@ -46,6 +46,8 @@
网格卡片和首屏滚动方块都打开总览(实拍模式下打开实拍);从滚动方块进来时,方块那一种格式的格子描黑边、名字加粗,不加文字标签。
手机总览隐藏左右箭头。手机灯箱高度是 100dvh:浏览器地址栏露出时会矮约 180 px,所以手机上标题上方只留「ID · 分类」,机位缩略条压到 44 px 高,
格式说明收进「详情」,让图在首次打开时就有足够高度(之前要滑一下、地址栏收起才正常)。
+ 预加载:当前画面的图加载完后,低优先级预取下一步要用的图——总览预取其他四个机位的格子(w600),单张预取同格式的其他机位和这个机位的其他格式
+ (w900),再加下一套的同一机位;省流量模式和 2G 不预取。换机位、换格式因此几乎没有等待。
- 手机:默认三列网格(只留 ID + 名称一行、不显示圆点),右侧按钮切回两列,选择记在 localStorage。没有筛选面板(2026-10-29 去掉):
吸顶条里系列行随页面滚走,分类胶囊和机位 / 素材 / 视图开关留在顶部,各行横滑不换行。
- 手机首屏:连导航一屏放下(标题 32px、滚动方块只留一行、胶囊缩小),首屏底部露出「全部姿势」。
diff --git a/web/app.js b/web/app.js
index 34ac9169..63713aa3 100644
--- a/web/app.js
+++ b/web/app.js
@@ -740,6 +740,43 @@
if (hasPage) $('lbPage').href = posePage(p.id);
// No suffix is the overview (the default); the line art alone is -line.
history.replaceState(null, '', location.pathname + location.search + '#' + p.id + '-' + VIEWS[LB.v] + (m === 'compare' ? '' : '-' + m));
+ preloadAround(p, m);
+ }
+ /* Preloading: once the shown images are in, fetch what the next step needs, so ← → and the format row are instant.
+ Overview: the other angles' tiles (w600). One format: its other angles (w900), and this angle in the set's other
+ formats (w900, for the format row and the vertical swipe). Then the next pose's opening view. Skipped on
+ Save-Data and 2G; the fetches are low priority and the browser cache (images: a week) keeps them. */
+ const WARM = new Set();
+ const SLOW = (() => { const c = navigator.connection; return !!c && (c.saveData || /2g/.test(c.effectiveType || '')); })();
+ function warm(urls) {
+ urls.forEach((u) => {
+ if (WARM.has(u)) return;
+ WARM.add(u);
+ const im = new Image();
+ im.decoding = 'async';
+ if ('fetchPriority' in im) im.fetchPriority = 'low';
+ im.src = u;
+ });
+ }
+ let warmTimer = 0;
+ function preloadAround(p, m) {
+ if (SLOW || veiled(p)) return;
+ clearTimeout(warmTimer);
+ const v = LB.v, others = VIEWS.map((_, i) => i).filter((i) => i !== v);
+ const kinds = ['line'].concat(p.clay.some(Boolean) ? MAP_KINDS : [], p.photo.some(Boolean) ? ['photo'] : []);
+ const urls = [];
+ if (m === 'compare') others.forEach((i) => kinds.forEach((k) => { if (p[k][i]) urls.push(src(k, 'w600', p[k][i])); }));
+ else {
+ const arr = lbFiles(p, m), kind = m === 'compare' ? 'line' : m;
+ others.forEach((i) => { if (arr[i]) urls.push(src(kind, 'w900', arr[i])); });
+ kinds.forEach((k) => { if (k !== kind && p[k][v]) urls.push(src(k, 'w900', p[k][v])); });
+ }
+ const list = lbList(), next = list[(list.indexOf(p) + 1) % list.length];
+ if (next && next !== p && !veiled(next)) kinds.forEach((k) => { if (next[k] && next[k][v]) urls.push(src(k, m === 'compare' ? 'w600' : 'w900', next[k][v])); });
+ // After the images on screen have had their turn.
+ const go = () => warm(urls);
+ const img = $('lbImg');
+ warmTimer = setTimeout(() => (img.complete || m === 'compare' ? go() : img.addEventListener('load', go, { once: true })), 250);
}
const posePage = (id) => BASE + PREFIX[S.lang] + 'pose/' + id + '/';
// Same rule as tools/build_site.py: only general-rated std poses get a static page.