feat: 코디 일교차 8도 이상이면 겉옷을 5번째 옷으로 그림·이름표에 포함(-outer 그림), 그림 프롬프트에 적힌 옷만 그리기 규칙, warm 꾸안꾸 겉옷 그림 4장
This commit is contained in:
1 parent
368a576bdb
commit
aa9f22a166
11 files changed
+90
-31
No files matched your search
+15
-12
@@ -30,21 +30,24 @@ const outDir = resolve(`src/assets/${kind}`)
|
||||
mkdirSync(outDir, { recursive: true })
|
||||
const outPath = (id) => join(outDir, `${id}.webp`)
|
||||
|
||||
// 그림 한 장 = { id, 프롬프트 }. ootd 는 구간 × 스타일 × 사람, tarot 은 주제 꾸밈(skin)마다
|
||||
// 그림 한 장 = { id, 프롬프트 }. ootd 는 구간 × 스타일 × 사람 × (옷 4개 | 겉옷까지 5개, id 끝에 -outer), tarot 은 주제 꾸밈(skin)마다
|
||||
const jobs = spec.bands
|
||||
? spec.bands.flatMap((b) =>
|
||||
Object.entries(b.outfits).flatMap(([style, byPersona]) =>
|
||||
Object.entries(byPersona).map(([persona, outfit]) => ({
|
||||
id: `${b.id}-${persona}-${style}`,
|
||||
band: b.id,
|
||||
style,
|
||||
prompt: spec.style
|
||||
.replace('{items}', outfit.items)
|
||||
.replace('{persona}', spec.personas[persona].prompt)
|
||||
.replace('{style}', spec.styles[style].prompt)
|
||||
.replace('{trend}', spec.styles[style].trends?.[persona] ?? '')
|
||||
.replace('{layering}', b.layering ?? ''),
|
||||
})),
|
||||
Object.entries(byPersona).flatMap(([persona, outfit]) =>
|
||||
[false, true].map((withOuter) => ({
|
||||
id: `${b.id}-${persona}-${style}${withOuter ? '-outer' : ''}`,
|
||||
band: b.id,
|
||||
style,
|
||||
prompt: spec.style
|
||||
.replace('{items}', withOuter ? `${outfit.items}, (5) ${spec.outers?.[outfit.outer] ?? outfit.outer} as the outer layer` : outfit.items)
|
||||
.replace('{count}', withOuter ? 'five' : 'four')
|
||||
.replace('{persona}', spec.personas[persona].prompt)
|
||||
.replace('{style}', spec.styles[style].prompt)
|
||||
.replace('{trend}', spec.styles[style].trends?.[persona] ?? '')
|
||||
.replace('{layering}', b.layering ?? ''),
|
||||
})),
|
||||
),
|
||||
),
|
||||
)
|
||||
: spec.items.map((it) => ({
|
||||
|
||||
Reference in new issue
Block a user