사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/nphu0811/pmg-skills --skill pmg-morph시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
PMG Morph Engine (pmg-morph)
Responsibility and dependencies
Technical cross-slide Morph compilation: XML, object matching, persistent !! identities, geometry compatibility, anchor validation and Morph parameters. Choreography invokes these helpers and owns narrative motion choices.
Dependencies: pmg-engine; motiongraphkit transition APIs; shared object identities. All generated candidates must pass PMGOrchestrator before delivery; direct save/COM snippets below are lower-level composition examples, not independent production entrypoints.
PowerPoint Morph is the hardware-accelerated motion interpolation engine of PMG. When configured with strict OpenXML attributes, it produces continuous animations whose actual playback frame rate must be measured.
1. The !! Naming Invariant
To morph Shape A on Slide 1 into Shape B on Slide 2, both shapes must share an identical custom name prefixed with !! in PowerPoint's shape tree:
<!-- Slide 1 -->
<p:cNvPr id="101" name="!!Hero_Focus"/>
<!-- Slide 2 -->
<p:cNvPr id="205" name="!!Hero_Focus"/>When PowerPoint detects matching !! prefixes:
- Compatible objects can be matched explicitly; unsupported pairs can still cross-fade.
- PowerPoint interpolates coordinates:
(x1, y1, w1, h1, rot1) -> (x2, y2, w2, h2, rot2). - It smoothly blends fills, outlines, and opacity channels subject to PowerPoint compatibility and measured playback.
2. Dynamic Thematic Traveling Entity ("Vật Thể Bay Xuyên Slide")
A persistent traveling entity must match the specific topic of the presentation:
- Space & Aerospace: 3D Rotating Planet, Satellite Probe, Rocket, Astronaut
- Music & Media (Spotify Style): Glowing Vinyl Disc, Soundwave Pulse, 3D Floating Earbud
- Technology & AI: Cyber Core, Neural Data Orb, Glowing Tech Badge
- Environment & Ecology: Floating Green Leaf, Pure Water Droplet, Sprout
- Business & Finance: 3D Growth Arrow, Golden Token, Metric Compass Pin
- Healthcare & Biotech: DNA Double Helix, Molecular Sphere, Heartbeat Pulse
- Culture & Literature: Floating Lantern, Calligraphy Quill, Imperial Seal
Slide 1 (Entry / Launch):
[ !!Traveling_Hero ] at (x: -2.5", y: 4.2", rot: +20°) ---> Enters from left margin
↓ (Morph 1.6s)
Slide 2 (Ascent & Survey):
[ !!Traveling_Hero ] at (x: 5.8", y: 1.8", rot: -10°) ---> Glides above Hero Title
↓ (Morph 1.6s)
Slide 3 (Spotlight & Docking):
[ !!Traveling_Hero ] at (x: 10.2", y: 4.0", rot: +15°) ---> Hovers near Key Metrics
↓ (Morph 1.6s)
Slide 4 (Graceful Exit):
[ !!Traveling_Hero ] at (x: 14.5", y: 1.0", rot: -25°) ---> Departs into right marginStaging Rules for Traveling Entities
- Off-Screen Safe Coordinates:
- Left Off-Screen: $X \le -2.0 \text{ inches}$ ($X \le -1828800 \text{ EMUs}$)
- Right Off-Screen: $X \ge 13.5 \text{ inches}$ ($X \ge 12344400 \text{ EMUs}$)
- Top Off-Screen: $Y \le -2.0 \text{ inches}$
- Bottom Off-Screen: $Y \ge 7.8 \text{ inches}$
- Dynamic Rotation (`rot`):
- In PowerPoint OpenXML, rotation is expressed in 60,000ths of a degree (e.g., $15^\circ = 900,000$).
- As the entity ascends, tilt upwards ($-10^\circ$ to $-20^\circ$); as it swoops down, tilt forwards ($+15^\circ$ to $+25^\circ$).
- Aspect-Ratio Lock:
$$\frac{W2}{W1} = \frac{H2}{H1}$$ Never scale width or height disproportionately during flight.
3. OpenXML Morph Specification
The morph transition element must be injected into the slide's XML root (ppt/slides/slide{N}.xml):
<p:transition xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"
xmlns:p159="http://schemas.microsoft.com/office/powerpoint/2015/09/main"
spd="slow"
advClick="1">
<p159:morph option="byObject"/>
</p:transition>Morph Option Modes
option="byObject": The standard 60 FPS spatial interpolation mode for shapes, cards, 3D models, and traveling entities.option="byWord": Fluid kinetic typography morphing where shared words glide to their new positions.option="byChar": Anagram-style character deformation.
Transition Timing Standards
- Standard Spatial Flow:
duration = 1400ms – 1600ms. - Traveling Mascot Flight:
duration = 1600ms – 1800ms. - Macro Camera Zoom:
duration = 1800ms – 2000ms.
4. Automated CLI & Python API
Inject Morph transitions using:
python scripts/pptx_morph_injector.py Presentation.pptx --type morph --dur 1600 --mode byObjectOr in Python code:
from scripts.motion_graph_kit import MotionDeck
deck = MotionDeck()
s1 = deck.add_slide(transition="none")
deck.add_thematic_traveling_entity(s1, "assets/satellite.png", left=-2.5, top=4.0, rot_deg=20)
s2 = deck.add_slide(transition="morph", duration_ms=1600)
deck.add_thematic_traveling_entity(s2, "assets/satellite.png", left=6.0, top=1.8, rot_deg=-10)
