Close the gaps left open after the LFS migration: 177 files that were sitting untracked now enter version control, with every binary going through Git LFS. - labels: milk and orange-juice wrap artwork (SVG/PNG), Seedream sources, prompts and Dreamina job records - orange juice 2L: bottle, cap, empty state and three label variants (blend + glb each) - cup contents: desktop and mobile-optimised variants plus 3 textures - milk 2L: empty and packaged variants with their glb exports - milk frother: low-poly assembly and split base/jug parts - tamper: model, glb and fit test - juicer: seven assembly-part review scenes and their export scripts - playtests: extraction animation scene and grinding/tamping whitebox - reference: Minex page candidates, user review screenshots, sequence analysis frames and tamper STLs - docs: item design draft, bean research notes, region reference and the model-asset audit report Re-renderable preview/check frames stay untracked on purpose.
66 lines
3.1 KiB
Python
66 lines
3.1 KiB
Python
import base64
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
OUT = Path(__file__).resolve().parent
|
|
WIDTH, HEIGHT = 2048, 768
|
|
BLUE = "#07527b"
|
|
ORANGE = "#ed8208"
|
|
YELLOW = "#fff2a6"
|
|
|
|
|
|
def orange_icon(cx, cy, scale=1.0):
|
|
return f'''<g transform="translate({cx} {cy}) scale({scale})">
|
|
<path d="M 4 -29 C 17 -62 43 -68 65 -62 C 56 -37 33 -24 4 -29 Z" fill="#246d37"/>
|
|
<path d="M -2 -27 C -15 -51 -38 -55 -52 -45 C -41 -23 -20 -17 -2 -27 Z" fill="#9bbd3e"/>
|
|
<path d="M 0 -25 Q 9 -42 24 -51" fill="none" stroke="#326b32" stroke-width="5" stroke-linecap="round"/>
|
|
<circle cx="0" cy="14" r="46" fill="#f28a09"/>
|
|
<path d="M -27 2 Q -8 -14 18 -5" fill="none" stroke="#f9ac22" stroke-width="6" stroke-linecap="round" opacity="0.65"/>
|
|
</g>'''
|
|
|
|
|
|
def text(x, y, value, size, fill=BLUE, weight=700, family="Arial, sans-serif", spacing=0):
|
|
return (f'<text x="{x}" y="{y}" text-anchor="middle" font-family="{family}" '
|
|
f'font-size="{size}" font-weight="{weight}" letter-spacing="{spacing}" fill="{fill}">{value}</text>')
|
|
|
|
|
|
base64_image = base64.b64encode((OUT / "decorative_base_cutout.png").read_bytes()).decode("ascii")
|
|
parts = [f'''<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{WIDTH}" height="{HEIGHT}" viewBox="0 0 {WIDTH} {HEIGHT}">
|
|
<defs>
|
|
<linearGradient id="sky" x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0" stop-color="#eaf9ff"/>
|
|
<stop offset="0.58" stop-color="#cceef7"/>
|
|
<stop offset="1" stop-color="#a7ddec"/>
|
|
</linearGradient>
|
|
</defs>
|
|
<rect width="2048" height="768" fill="url(#sky)"/>
|
|
<rect width="2048" height="12" fill="{ORANGE}"/>
|
|
<rect y="716" width="2048" height="52" fill="{ORANGE}"/>
|
|
<path d="M0 701 Q256 681 512 701 T1024 701 T1536 701 T2048 701" fill="none" stroke="#f5a51b" stroke-width="5"/>
|
|
''']
|
|
for x in (0, WIDTH):
|
|
parts.append(orange_icon(x, 346, 1.1))
|
|
for x in (290, 1758):
|
|
parts.append(orange_icon(x, 245, 1.25))
|
|
parts.append(text(x, 385, "ORANGE", 24, weight=700, spacing=1.8))
|
|
parts.append(f'<image x="694" y="34" width="660" height="700" xlink:href="data:image/png;base64,{base64_image}"/>')
|
|
parts.extend([
|
|
text(1024, 309, "ORANGE", 65, weight=900, spacing=1),
|
|
text(1024, 380, "JUICE", 58, weight=900, spacing=4),
|
|
'<path d="M 957 402 L 1091 402" stroke="#ee8909" stroke-width="5" stroke-linecap="round"/>',
|
|
text(1024, 556, "FRESH & FRUITY", 17, fill=YELLOW, weight=700, spacing=2.5),
|
|
text(1024, 616, "鲜橙汁", 45, fill=YELLOW, weight=600, family="PingFang SC, Microsoft YaHei, sans-serif", spacing=4),
|
|
text(1024, 669, "2 L", 28, fill=YELLOW, weight=700, spacing=3),
|
|
'</svg>',
|
|
])
|
|
svg_path = OUT / "orange_juice_wrap.svg"
|
|
svg_path.write_text("\n".join(parts), encoding="utf-8")
|
|
subprocess.run(["sips", "-s", "format", "png", str(svg_path), "--out", str(OUT / "orange_juice_wrap.png")], check=True)
|
|
subprocess.run([
|
|
"ffmpeg", "-hide_banner", "-loglevel", "error", "-y", "-i", str(OUT / "orange_juice_wrap.png"),
|
|
"-vf", "crop=960:768:544:0", "-frames:v", "1", str(OUT / "orange_juice_front.png"),
|
|
], check=True)
|
|
print(OUT / "orange_juice_wrap.svg")
|
|
print(OUT / "orange_juice_wrap.png")
|
|
print(OUT / "orange_juice_front.png")
|