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

fix(web): lightbox arrows past the wipe slider, map gaps get an icon and a gap box

wquguru118a01ee703a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94c4f7fa..7574a091 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,13 @@ the catalog schema.
## [Unreleased]
+### Fixed
+- Lightbox ← → sometimes did nothing: opening a map format focused the line-art slider first, which took the keys.
+ The close button now takes the first focus and the slider no longer swallows the arrow keys.
+- Angle thumbnails for a view without clay, depth or normal said "undefined"; they show a layers icon like the line
+ and photo gaps. Switching format on such an angle stays there and shows the gap box ("斜侧 · 暂无白模") with the
+ ways out (this angle's line art, the nearest angle with that format) instead of jumping to another angle.
+
### Added
- Home marquee: a tile opens its pose in the lightbox at that angle and in that format (a depth tile opens depth).
The rows pause on hover as before and stay out of the tab order; the grid remains the keyboard way in.
diff --git a/web/app.js b/web/app.js
index fd63d56d..23d9b2c3 100644
--- a/web/app.js
+++ b/web/app.js
@@ -101,9 +101,12 @@
const ICON = {
line: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 20h4L19 9a2.1 2.1 0 0 0-3-3L5 17v3z"/><path d="M14 8l3 3"/></svg>',
photo: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 8h3l2-2.5h6L17 8h3v11H4z"/><circle cx="12" cy="13" r="3.5"/></svg>',
+ // Clay, depth and normal share one icon: stacked layers, as they are layers over the line art.
+ map: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 4l8 4-8 4-8-4z"/><path d="M4 12l8 4 8-4"/><path d="M4 16l8 4 8-4"/></svg>',
};
const ARROW = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>';
- const gapIcon = (photo) => '<span class="gap-ic">' + ICON[photo ? 'photo' : 'line'] + '</span>';
+ // kind: 'line' | 'photo' | a map format (true / false still mean photo / line for the grid's two media).
+ const gapIcon = (kind) => '<span class="gap-ic">' + ICON[kind === true ? 'photo' : !kind ? 'line' : MAP_KINDS.includes(kind) ? 'map' : kind] + '</span>';
// Grid card: the way out is the nearest angle in the same medium (the medium switch is page-wide).
function cardGapHtml(arr, v, photo) {
const T = t();
@@ -526,13 +529,15 @@
const list = pool();
return list.some((p) => p.id === LB.id) ? list : poses;
}
- function openLb(id, v, medium) {
+ // keep: a format switch inside the lightbox stays on this angle even when the new format lacks it; the gap box
+ // then offers the way out (the line art of this angle, or the nearest angle that has the format).
+ function openLb(id, v, medium, keep) {
const p = byId.get(id);
if (!p) return;
LB.id = id;
LB.medium = MEDIA.includes(medium) && hasMedium(p, medium) ? medium : 'line';
const arr = lbFiles(p, LB.medium);
- LB.v = arr[v] ? v : firstView(arr);
+ LB.v = arr[v] || (keep && arr.some(Boolean)) ? v : firstView(arr);
renderLb();
if (!$('lb').open) $('lb').showModal();
}
@@ -586,8 +591,18 @@
'<figcaption>' + esc(label) + '</figcaption></figure>';
}
// Lightbox gap: the same angle in the other medium is the best way out when it exists, else the nearest angle.
- function lbGapHtml(p, arr, photo, T) {
+ // A map that did not pass QC points back to the line art it was drawn from, then to the nearest angle with that map.
+ function lbGapHtml(p, arr, m, T) {
const v = LB.v;
+ if (isMap(m)) {
+ const n = nearView(arr, v);
+ const go = (attr, label, dark) => '<button type="button" class="gap-go' + (dark ? ' dark' : '') + '" ' + attr + '>' + esc(label) + (dark ? ARROW : '') + '</button>';
+ const acts = (p.line[v] ? [go('data-lbgm="line"', T.goLine, true)] : []).concat(n >= 0 ? [go('data-lbgo="' + n + '"', T.goView(T.views[n]), !p.line[v])] : []);
+ return gapIcon(m) + '<b>' + esc(T.views[v] + ' · ' + T.gapMap(T[m])) + '</b>' +
+ '<span class="gap-sub">' + esc(p.line[v] ? T.gapPhotoSub : T.gapOther) + '</span>' +
+ (acts.length ? '<span class="gap-acts">' + acts.join('') + '</span>' : '');
+ }
+ const photo = m === 'photo';
const other = photo ? p.line[v] : p.photo[v];
const n = nearView(arr, v);
const btn = (attr, label, dark) => '<button type="button" class="gap-go' + (dark ? ' dark' : '') + '" ' + attr + '>' + esc(label) + (dark ? ARROW : '') + '</button>';
@@ -637,7 +652,7 @@
pair.innerHTML = compare ? pairCell(p, 'line', p.line[LB.v], T) + pairCell(p, 'photo', p.photo[LB.v], T) : '';
const miss = $('lbMissing');
miss.hidden = !!f || compare;
- miss.innerHTML = f || compare ? '' : lbGapHtml(p, arr, photo, T);
+ miss.innerHTML = f || compare ? '' : lbGapHtml(p, arr, m, T);
$('lbCounter').textContent = T.views[LB.v] + ' ' + (LB.v + 1) + '/5';
// With one view or none there is nowhere to step; a live-looking arrow that does nothing reads as broken.
$('lbPrev').disabled = $('lbNext').disabled = arr.filter(Boolean).length < 2;
@@ -654,7 +669,7 @@
const tk = compare ? (p.line[i] ? 'line' : 'photo') : kind;
const both = compare && p.line[i] && p.photo[i];
return '<button type="button" data-lbv="' + i + '" aria-pressed="' + (i === LB.v) + '"' + (arr[i] ? '' : ' disabled') + '>' +
- '<span class="' + tk + (both ? ' both' : '') + '">' + (arr[i] ? '<img src="' + src(tk, 'w300', arr[i]) + '" alt="">' : ICON[kind]) + '</span>' + esc(T.views[i]) + '</button>';
+ '<span class="' + tk + (both ? ' both' : '') + '">' + (arr[i] ? '<img src="' + src(tk, 'w300', arr[i]) + '" alt="">' : ICON[isMap(kind) ? 'map' : kind]) + '</span>' + esc(T.views[i]) + '</button>';
}).join('');
const hasPhoto = p.photo.some(Boolean), hasMaps = p.clay.some(Boolean);
$('lb').classList.toggle('no-photo', !hasPhoto && !hasMaps);
@@ -717,7 +732,7 @@
});
$('lbMedium').addEventListener('click', (e) => {
const b = e.target.closest('[data-lbm]');
- if (b && !b.disabled) openLb(LB.id, LB.v, b.dataset.lbm);
+ if (b && !b.disabled) openLb(LB.id, LB.v, b.dataset.lbm, true);
});
$('lbVeilOne').addEventListener('click', () => reveal(LB.id));
$('lbVeilAll').addEventListener('click', () => setAdult(true));
@@ -742,7 +757,7 @@
// and a dialog-scoped listener would then miss every key until the reader tabbed back in.
document.addEventListener('keydown', (e) => {
// The share sheet opens on top of the lightbox; its keys are its own.
- if (!$('lb').open || document.querySelector('dialog[open]:not(#lb)') || e.target.closest('input, textarea')) return;
+ if (!$('lb').open || document.querySelector('dialog[open]:not(#lb)') || e.target.closest('textarea, input:not([type="range"])')) return;
if (e.key === 'ArrowLeft') { e.preventDefault(); stepAngle(-1); }
else if (e.key === 'ArrowRight') { e.preventDefault(); stepAngle(1); }
else if (e.key === 'ArrowUp') { e.preventDefault(); stepPose(-1); }
diff --git a/web/i18n.js b/web/i18n.js
index dbbb55f2..c79df0fe 100644
--- a/web/i18n.js
+++ b/web/i18n.js
@@ -21,7 +21,7 @@ window.I18N = {
clay: '白模', depth: '深度', normal: '法线', overlay: '对照线稿',
fmtNote: { clay: '灰色人台,带体积和明暗,和线稿一样可以直接当参考图。', depth: '深度图,白近黑远。给 ComfyUI 等的 ControlNet Depth 用,会带上人台的体型。', normal: '法线图,颜色表示表面朝向。给 ControlNet Normal 用,会带上人台的体型。' },
gapLine: '正在补画', gapLineSub: '这个机位还在画,先看看别的吧', gapLineShort: '补画中',
- gapPhoto: '暂无实拍', gapPhotoSub: '这个机位先看线稿吧', gapPhotoShort: '无实拍', gapOther: '先看看别的机位吧',
+ gapPhoto: '暂无实拍', gapPhotoSub: '这个机位先看线稿吧', gapPhotoShort: '无实拍', gapMap: (f) => '暂无' + f, gapOther: '先看看别的机位吧',
goView: (v) => '看' + v, goLine: '看线稿', goPhoto: '看实拍',
empty: '没有找到匹配的姿势', cols2: '两列', cols3: '三列', prevPose: '上一套', nextPose: '下一套', details: '详情',
close: '关闭', prevAngle: '上一个机位', nextAngle: '下一个机位', open: (id) => '打开 ' + id + ' 大图',
@@ -57,7 +57,7 @@ window.I18N = {
clay: 'クレイ', depth: '深度', normal: '法線', overlay: '線画と比較',
fmtNote: { clay: 'グレーのマネキン。立体感と陰影があり、線画と同じく参照画像としてそのまま使えます。', depth: '深度マップ(白が手前、黒が奥)。ComfyUI などの ControlNet Depth 用。マネキンの体型も反映されます。', normal: '法線マップ(色で面の向きを表します)。ControlNet Normal 用。マネキンの体型も反映されます。' },
gapLine: 'ただいま描き足し中', gapLineSub: 'ほかのアングルを先にどうぞ', gapLineShort: '描き足し中',
- gapPhoto: '実写はまだありません', gapPhotoSub: 'このアングルは線画でどうぞ', gapPhotoShort: '実写なし', gapOther: 'ほかのアングルを先にどうぞ',
+ gapPhoto: '実写はまだありません', gapPhotoSub: 'このアングルは線画でどうぞ', gapPhotoShort: '実写なし', gapMap: (f) => f + 'はありません', gapOther: 'ほかのアングルを先にどうぞ',
goView: (v) => v + 'を見る', goLine: '線画を見る', goPhoto: '実写を見る',
empty: '該当するポーズがありません', cols2: '2列', cols3: '3列', prevPose: '前のポーズ', nextPose: '次のポーズ', details: '詳細',
close: '閉じる', prevAngle: '前のアングル', nextAngle: '次のアングル', open: (id) => id + ' を拡大表示',
@@ -93,7 +93,7 @@ window.I18N = {
clay: 'Clay', depth: 'Depth', normal: 'Normal', overlay: 'Line art',
fmtNote: { clay: 'A grey mannequin with volume and shading; use it as a reference image just like the line art.', depth: 'Depth map, white is near. For ControlNet Depth in ComfyUI and similar tools; it carries the mannequin\'s build.', normal: 'Normal map, colour shows which way each surface faces. For ControlNet Normal; it carries the mannequin\'s build.' },
gapLine: 'Still drawing this one', gapLineSub: 'Meanwhile, try another angle', gapLineShort: 'Drawing',
- gapPhoto: 'No photo yet', gapPhotoSub: 'The line art has this angle', gapPhotoShort: 'No photo', gapOther: 'Meanwhile, try another angle',
+ gapPhoto: 'No photo yet', gapPhotoSub: 'The line art has this angle', gapPhotoShort: 'No photo', gapMap: (f) => 'No ' + f.toLowerCase() + ' map', gapOther: 'Meanwhile, try another angle',
goView: (v) => 'See ' + v, goLine: 'See line art', goPhoto: 'See photo',
empty: 'No poses match', cols2: 'Two columns', cols3: 'Three columns', prevPose: 'Previous pose', nextPose: 'Next pose', details: 'Details',
close: 'Close', prevAngle: 'Previous angle', nextAngle: 'Next angle', open: (id) => 'Open ' + id,
@@ -129,7 +129,7 @@ window.I18N = {
clay: '클레이', depth: '깊이', normal: '노멀', overlay: '선화 비교',
fmtNote: { clay: '회색 마네킹으로 입체감과 명암이 있습니다. 선화처럼 참고 이미지로 바로 쓸 수 있습니다.', depth: '깊이 맵(흰색이 가까움). ComfyUI 등의 ControlNet Depth용이며 마네킹 체형이 반영됩니다.', normal: '노멀 맵(색이 표면 방향을 나타냄). ControlNet Normal용이며 마네킹 체형이 반영됩니다.' },
gapLine: '지금 그리는 중이에요', gapLineSub: '먼저 다른 앵글을 보세요', gapLineShort: '그리는 중',
- gapPhoto: '아직 실사가 없어요', gapPhotoSub: '이 앵글은 선화로 보세요', gapPhotoShort: '실사 없음', gapOther: '먼저 다른 앵글을 보세요',
+ gapPhoto: '아직 실사가 없어요', gapPhotoSub: '이 앵글은 선화로 보세요', gapPhotoShort: '실사 없음', gapMap: (f) => f + ' 없음', gapOther: '먼저 다른 앵글을 보세요',
goView: (v) => v + ' 보기', goLine: '선화 보기', goPhoto: '실사 보기',
empty: '일치하는 포즈가 없습니다', cols2: '2열', cols3: '3열', prevPose: '이전 포즈', nextPose: '다음 포즈', details: '상세',
close: '닫기', prevAngle: '이전 앵글', nextAngle: '다음 앵글', open: (id) => id + ' 크게 보기',
diff --git a/web/index.html b/web/index.html
index 2bfae865..56155009 100644
--- a/web/index.html
+++ b/web/index.html
@@ -160,7 +160,7 @@ __NOSCRIPT__
<p class="keys" data-i18n="keys"></p>
</div>
</aside>
- <button type="button" class="lb-close" id="lbClose" data-i18n-aria="close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
+ <button type="button" class="lb-close" id="lbClose" autofocus data-i18n-aria="close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6 6 18"/></svg></button>
</div>
</dialog>