공용 파일(main.ts·index.html·style.css)에서 서로 얽혀 있어 한 커밋으로 묶음. - 지반: ① 형상 프로젝트 지반모델 관리창(생성·JSON 불러오기·교각별 비교·선택 적용), 프로젝트 JSON 내장 groundModel 추출, 교대 8행 통합 적용·공통지형 중복격자 제외 - 재료표·수량: 상단 ⑤ 메뉴·배근 바로가기, 결과 교각/탭 기억, 수량 워크북·정합 보정 - 랜딩: 옥성교 6교각 히어로 이미지·투영 강조점·좌→우 광선·지형 라운드/도로 연결 - 검증 스크립트(verify-project-ground/ground-abutments/okseong-user-files/quantity-*/landing-hero 등) 정본: DOC/04_실행/실행_*_2026-11-09_v0.1.00.md Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
31 lines
1.8 KiB
Python
31 lines
1.8 KiB
Python
"""Promote one rendered camera variant; preserve the previous landing image."""
|
|
import json
|
|
import shutil
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
root = Path(__file__).resolve().parents[1]
|
|
assets = root / '랜딩페이지/assets'
|
|
variant = sys.argv[1] if len(sys.argv) > 1 else 'horizontal-smooth'
|
|
if variant not in ('balanced', 'low', 'high', 'trim30', 'trim20', 'refined', 'horizontal-smooth'):
|
|
raise SystemExit('Unknown camera variant')
|
|
source = root / ('.verify/landing-horizontal-20261109' if variant == 'horizontal-smooth' else '.verify/landing-hero-20261109')
|
|
metadata = json.loads((source / f'{variant}.json').read_text())
|
|
if variant == 'horizontal-smooth':
|
|
assert metadata['along'] == 0 and metadata['outline']['addedOutsideSourcePixels'] == 0
|
|
assert metadata['piers'] == 6 and metadata['abutments'] == 2
|
|
# Full curve control points remain in the capture audit, outside the service bundle.
|
|
metadata['outline'].pop('path')
|
|
backup = source / ('before-horizontal' if variant == 'horizontal-smooth' else 'before-refined' if variant == 'refined' else 'before-trim30')
|
|
backup.mkdir(exist_ok=True)
|
|
for name in ('okseong-model-hero.png', 'okseong-model-hero.webp', 'okseong-hero-capture.ts'):
|
|
if (assets / name).exists() and not (backup / name).exists():
|
|
shutil.copyfile(assets / name, backup / name)
|
|
for kind in ('png', 'webp'):
|
|
shutil.copyfile(source / f'{variant}.{kind}', assets / f'okseong-model-hero.{kind}')
|
|
metadata['terrainFlow'] = [None if p is None else {'x': p['x'], 'y': p['y']} for p in metadata['terrainFlow']]
|
|
(assets / 'okseong-hero-capture.ts').write_text(
|
|
'// Generated by scripts/promote-landing-hero.py from actual model projection.\n'
|
|
'export const heroCapture = ' + json.dumps(metadata, ensure_ascii=False, indent=2) + ' as const;\n'
|
|
)
|