Skip to content

12 个视觉参考图库与浏览器无限画布 AI 创作台(5,700+ 素材、中英提示词、多图对比、ComfyUI & MCP)· Visual reference library & infinite-canvas AI studio in the browser

3.6 KB
Raw Blame
const {chromium}=require('playwright');const fs=require('fs');
// A: 衣架即肩线 + 头 = 一个"穿着衣架"的人
const A=c=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="6.6" r="4" fill="${c}"/><path d="M16 13.4 3.4 25.6h25.2z" fill="none" stroke="${c}" stroke-width="3.4" stroke-linejoin="round"/></svg>`;
// B: 举臂人形 Y + 衣领
const B=c=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="6" r="3.2" fill="${c}"/><path d="M6 10l10 7 10-7M16 17v11" fill="none" stroke="${c}" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
// C: 衣架钩 + 字母 P 组合
const C=c=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M13 9a3 3 0 1 1 3 3v2M16 14 4 24h24z" fill="none" stroke="${c}" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
const F="-apple-system,'PingFang SC','Noto Sans CJK SC',sans-serif";
(async()=>{const b=await chromium.launch();const p=await b.newPage();
const col=(n,L,note)=>`<div style="padding:30px;border-right:1px solid #eee"><h3 style="margin:0 0 6px">${n}</h3><p style="color:#888;margin:0 0 20px;font-size:14px">${note}</p><div style="display:flex;gap:22px;align-items:end">${[96,48,32,16].map(s=>`<div style="width:${s}px;height:${s}px">${L('#ff2442')}</div>`).join('')}</div><div style="display:flex;gap:22px;margin-top:22px;align-items:center"><div style="width:48px;height:48px">${L('#111')}</div><div style="width:64px;height:64px;background:#ff2442;border-radius:16px;padding:10px;box-sizing:border-box">${L('#fff')}</div><div style="display:flex;align-items:center;gap:8px"><span style="width:30px;height:30px">${L('#ff2442')}</span><b style="font-size:22px">衣姿</b><small style="color:#999;font-weight:600">PoseWear</small></div></div></div>`;
await p.setViewportSize({width:1500,height:300});await p.setContent(`<body style="margin:0;font-family:${F}"><div style="display:grid;grid-template-columns:repeat(3,1fr)">${col('A · 衣架人(选用)',A,'头 + 衣架肩线:一眼是"人穿衣",16px 仍清楚')}${col('B · 举臂人形',B,'偏运动 / 健身,服装含义弱')}${col('C · 衣架钩',C,'像普通衣架图标,辨识度不够')}</div></body>`);
await p.screenshot({path:'screenshots/v9-logo-concepts.png'});
fs.writeFileSync('src/favicon.svg',A('#ff2442'));fs.writeFileSync('src/logo-mono.svg',A('#111'));
const icon=async(s,pad,name,bg='#fff')=>{await p.setViewportSize({width:s,height:s});await p.setContent(`<body style="margin:0"><div style="width:${s}px;height:${s}px;background:${bg};display:grid;place-items:center"><div style="width:${s*(1-pad*2)}px;height:${s*(1-pad*2)}px">${A('#ff2442')}</div></div>`);await p.screenshot({path:'src/'+name})};
await icon(512,.14,'icon-512.png');await icon(192,.14,'icon-192.png');await icon(512,.24,'icon-maskable-512.png');await icon(180,.16,'apple-touch-icon.png');
await p.setViewportSize({width:1200,height:630});await p.setContent(`<body style="margin:0;font-family:${F}"><div style="width:1200px;height:630px;background:#fff;display:flex;align-items:center;gap:60px;padding:0 100px;box-sizing:border-box"><div style="width:190px;height:190px;flex:none">${A('#ff2442')}</div><div><div style="font-size:110px;font-weight:800;color:#111;line-height:1">衣姿 <span style="font-size:48px;color:#999;font-weight:600">PoseWear</span></div><div style="font-size:40px;color:#555;margin-top:28px">姿势和服装参考图,附提示词</div><div style="font-size:30px;color:#999;margin-top:18px">288 个姿势 · 1407 套服装</div></div></div>`);await p.screenshot({path:'src/og.png'});await b.close()})();