Opus Motion Library
루트: 이 저장소가 클론된 폴더 또는 현재 호스트 프로젝트 내의 복사본입니다. 먼저 그곳의 AGENTS.md를 읽으십시오 — 의사 결정 절차, 레이어링 규칙, 웹 성능 규칙 및 안티 패턴. 그런 다음 docs/CHOOSING.md (의도 → 모션) 및 docs/INTEGRATION.md (스택별)를 읽으십시오.
1. 선택 (절대 기억에서 추측하지 마십시오)
node cli/mgl.mjs suggest "<사용자 말로 된 브리프>"— ★ 레시피와 모션을 순위화하고, 이유를 설명하며, props 스니펫을 출력합니다.--overlay --image --text --loop --light --category <c> --json필터를 지원합니다.node cli/mgl.mjs recipes— 기성 혼합 (미리보기는recipes/previews/<id>.jpg): hero-aurora-night, hero-paper-sketch, hero-blueprint-logo, product-launch, stats-reveal, testimonial-chat, testimonial-quote, loading-loop, section-divider, success-celebration, error-glitch, onboarding-steps, event-countdown, music-neon-promo, ocean-explainer, history-timeline, app-store-preview (9:16), social-short-captions (9:16), end-card.node cli/mgl.mjs info <id>— props +roles,overlay/overlayProps,loopable,mood,weight,pairsWith,textProps.- 믹스 = 배경 + 대상 + 유형 + 미묘한 악센트; 샷당 하나의 히어로; 지원 레이어는 흐리게 처리; 모든 샘플 텍스트 교체; 브랜드 색상 전달.
2. 비디오 (Remotion)
node cli/mgl.mjs render <id> --props '{"key":"value"}' [--format landscape|square|portrait] [--frames N] --out out/<name>.mp4
node cli/mgl.mjs recipe <id> --overrides '{"<motion-id>":{…}}' [--format …] --out out/<name>.mp4
node cli/mgl.mjs still <id> --at 10,60,120 --out out/<name>-sheet.jpg # 먼저 미리보기, 시트 읽기
node cli/mgl.mjs compose specs/<name>.json --out out/<name>.mp4 # scenes[] (motion 또는 layers[]), transitions, overlays, audio
node cli/direct.mjs storyboards/<name>.json # 나레이션: 로컬 Qwen3-TTS -> 캡션 -> 렌더 -> 마스터
이미지: public/ 경로 ("demo/owl.jpg") 또는 https URL. 클라우드 음성/음악 서비스를 절대 사용하지 마십시오; 음악/sfx는 public/music, public/sfx에서 사용.
다른 Remotion 프로젝트 내부: node cli/mgl.mjs add <motions|recipes> --to <host>/src (필요한 소스만 복사 + 로컬 레지스트리; npm install 라인 출력).
3. 웹사이트 / 웹 앱
- 라이브러리에서
npm run build:lib실행 후,import {MotionBackground, MotionPlayer, MotionMix} from 'opus-motion-library/web'(Vite:resolve.dedupereact/remotion/@remotion/*/three), 또는mgl add … --player --to <app>/src(Next.js:'use client'파일에서 사용). - 일반 HTML / WordPress / Vue / Svelte:
<script src="opus-motion.element.js">+<opus-motion recipe="…" background>/<opus-motion motion="…" props='{…}'>. MotionBackground위의 HTML 단어 (type레이어 드롭);overlay모션은 페이지 위에 떠다님;playOnView, 축소 모션 정지 프레임, 지연 마운트, 뷰포트당 최대 2개의 활성 플레이어; 무거운 3D → 모바일에서는 내보낸 비디오 사용.- 사용된 라이브러리
public/파일 제공 (또는assetBase/ 절대 URL).
4. 네이티브 앱, 슬라이드, 편집기
node cli/mgl.mjs export <motion|recipe> --as mp4|webm|webm-alpha|prores-alpha|gif|png|poster [--format …] [--props …]
(알파 내보내기는 overlayProps 적용; ffprobe -c:v libvpx-vp9 … pix_fmt → yuva420p로 확인).
5. 인계 전 확인
렌더 타일링 (ffmpeg -i out/x.mp4 -vf "fps=1,scale=480:-2,tile=6x5" -frames:v 1 out/x-sheet.jpg) 또는 페이지 스크린샷
(node examples/screenshot.mjs <url> <dir> --targets "top,#section" — 1초 간격으로 두 장의 샷, 변경된 % 보고), 읽고, 수정.
라이브러리에 모션 추가
docs/AUTHORING.md를 따르고, src/motions/<family>/<id>.tsx에 배치한 후 node cli/gen-registry.mjs && npx tsc --noEmit && node cli/gen-docs.mjs를 실행; 선택적으로 node cli/probe-meta.mjs --only <id> (루프/오버레이/루마 측정)를 실행하고 docs/motion-meta.json에 재정의를 추가합니다.