返回 ppt-master
animations.md
根目录 / docs / animations.md
1 # Page Transitions & Element Animations
2
3 [English](./animations.md) | [Chinese](./zh/animations.md)
4
5 ---
6
7 PPT Master writes **page transitions** and optional **element object
8 animations** as real PowerPoint OOXML, not embedded video. Object animation
9 includes entrance, emphasis, motion-path, and exit effects. This guide covers
10 the choices and commands users need; exact effect mappings, the complete
11 sidecar schema, anchor rules, and package validation live in the
12 [animation execution reference](../skills/ppt-master/references/animations.md).
13
14 ## Default Behavior
15
16 | Layer | Default | What it means |
17 |---|---|---|
18 | Page transition | `fade`, 0.4 seconds | Slides change with a restrained visual transition |
19 | Element object animation | **`none` (off)** | Each slide appears as a complete page; opt in only when motion helps the presentation |
20
21 Changing animation settings does not require regenerating the slides. Reuse the
22 same `svg_output/`; default release export still requires its current passing
23 final SVG quality report. When no current matching passing final report exists,
24 run the final checker and resolve its blockers before rerunning `svg_to_pptx.py`.
25
26 ## Common Recipes
27
28 | Goal | Command |
29 |---|---|
30 | Keep the defaults | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project>` |
31 | Change the page transition | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -t push` |
32 | Remove the visual transition | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -t none` |
33 | Auto-advance every 5 seconds | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --auto-advance 5` |
34 | Enable automatic element reveals | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto` |
35 | Use one entrance effect throughout | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --animation entrance_fade` |
36 | Reveal elements on click | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-trigger on-click` |
37 | Animate all elements together | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-trigger with-previous` |
38 | Slow the reveal sequence | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-duration 0.5 --animation-stagger 0.8` |
39
40 ## Choose a Page Transition
41
42 | Relationship between adjacent slides | Start with |
43 |---|---|
44 | Ordinary continuation within one section | `fade` |
45 | Immediate change with no continuity to preserve | `none` or `cut` |
46 | Directional steps, timeline, or visible layer progression | `push`, `wipe`, `cover`, or `uncover` with a meaningful direction |
47 | The same object or scene changes position, size, crop, or appearance | `morph` |
48 | Section opening, key reveal, or marked state boundary | A selective `split`, `reveal`, `shape`, `flash`, or `random_bars` |
49 | A repeated collection advances through one spatial frame | `pan`, `conveyor`, or `ferris_wheel`; use Morph when individual objects must retain identity |
50 | The viewpoint travels around or through a continuous space | `rotate`, `window`, `orbit`, or `fly_through` |
51 | The theme supports a stage, paper, or physical-page metaphor | A selective `fall_over`, `drape`, `curtains`, `wind`, `prestige`, `peel_off`, `page_curl`, `airplane`, `origami`, or `doors` |
52 | A disruptive beat represents breakage, collapse, or dispersal | A selective `fracture`, `crush`, `dissolve`, `vortex`, or `shred` |
53 | A marked reveal benefits from a geometric, timed, or textured pattern | A selective `checkerboard`, `blinds`, `clock`, `ripple`, `honeycomb`, `glitter`, or `comb` |
54 | A card, panel, gallery, or viewpoint visibly turns or changes face | A selective `switch`, `flip`, `gallery`, `cube`, `box`, or `zoom` |
55
56 Keep `fade` or `none` when no other transition adds meaning. Do not change
57 effects merely to create variety; `random` is appropriate only when
58 unpredictability is itself intentional.
59
60 The 48 canonical transition keys cover all three sections in the current
61 PowerPoint gallery:
62
63 - Subtle: `morph`, `fade`, `push`, `wipe`, `split`, `reveal`, `cut`,
64 `random_bars`, `shape`, `uncover`, `cover`, `flash`.
65 - Exciting: `fall_over`, `drape`, `curtains`, `wind`, `prestige`, `fracture`,
66 `crush`, `peel_off`, `page_curl`, `airplane`, `origami`, `dissolve`,
67 `checkerboard`, `blinds`, `clock`, `ripple`, `honeycomb`, `glitter`,
68 `vortex`, `shred`, `switch`, `flip`, `gallery`, `cube`, `doors`, `box`,
69 `comb`, `zoom`, `random`.
70 - Dynamic Content: `pan`, `ferris_wheel`, `conveyor`, `rotate`, `window`,
71 `orbit`, `fly_through`.
72
73 The old names `strips`, `circle`, `diamond`, `newsflash`, `plus`, `pull`,
74 `wedge`, and `wheel` remain accepted only as compatibility inputs. New
75 sidecars, plans, traces, and output use canonical keys. Compatibility inputs
76 desugar into a native effect plus its Effect Options—for example, `diamond`
77 becomes `shape` with `shape: diamond`, and `wedge` becomes `clock` with
78 `style: wedge`.
79
80 Set effect-specific PowerPoint options in
81 `transition.effect_options`. Direction, shape, pattern, Morph scope, black
82 screen, page count, and bounce are validated against the selected effect.
83 Run
84 `python3 skills/ppt-master/scripts/pptx_animations.py --describe-transition <effect>`
85 for the exact values. `-t none` removes the visual effect but does not remove
86 an explicitly configured auto-advance timer.
87
88 ## Choose a Start Mode
89
90 | Start mode | Behavior | Best fit |
91 |---|---|---|
92 | `on-click` | One content group appears per click | Live presentations where the speaker controls pacing |
93 | `with-previous` | All content groups animate together when the slide appears | A single coordinated entrance |
94 | `after-previous` (default) | Groups appear sequentially without clicks | Kiosk playback, walkthroughs, and narrated decks |
95
96 `--recorded-narration` does not support `on-click`; use `after-previous` or `with-previous` for narrated or video-ready output.
97
98 ## Choose an Object Animation
99
100 Start with `none`. When object motion has a communication job, choose its
101 lifecycle before its visual effect:
102
103 | Communication job | Choice | Boundary |
104 |---|---|---|
105 | Reveal information in reading or narration order | `auto` or a native `entrance_*` key | This is the usual object-animation case |
106 | Redirect attention to an already visible object | An explicit `emphasis_*` key | Do not use it as the object's first reveal |
107 | Show meaningful spatial or causal movement | An explicit `path_*` key, or Morph across adjacent slides | The path itself should carry meaning; deliberate background ambience is an advanced exception |
108 | Remove, replace, or make room for content on the same slide | An explicit `exit_*` key | A normal slide change already removes the old page |
109 | Add deterministic or seeded variation to generic entrances | `mixed` or `random` | These modes still select entrance effects only |
110 | No clear motion task | `none` | Keep the slide static |
111
112 The canonical registry contains 203 PowerPoint-native keys: 53 entrance, 33
113 emphasis, 64 motion path, and 53 exit presets. New selections, sidecars,
114 automatic choices, traces, and examples use these category-qualified keys.
115 `auto`, `mixed`, and `random` select entrances only. Use an explicit canonical
116 key for emphasis, motion-path, or exit behavior.
117 The 29 established short names remain accepted only as compatibility inputs;
118 they normalize before writing and do not retain a second behavior engine.
119 Old Fly direction names all normalize to `entrance_fly`, and old Wipe
120 direction names all normalize to `entrance_wipe`; their direction is preserved
121 as an option rather than another canonical preset. Legacy `wheel` keeps four
122 spokes. Run
123 `python3 skills/ppt-master/scripts/pptx_animations.py --list` for the complete
124 categorized list. The four media playback commands are handled by the
125 audio/video workflows because they require media or bookmark targets.
126
127 ## Customize Specific Objects
128
129 Use `animations.json` only when deck-wide settings are not enough—for example,
130 one object entering, moving, drawing attention, and then leaving. List the real
131 groups, write sparse overrides for only the affected slides and objects,
132 validate, and export. `scaffold` is an optional neutral editing starter: it
133 sets the default object effect to `none`, and untouched `{}` group entries do
134 not enable animation.
135
136 ```bash
137 python3 skills/ppt-master/scripts/animation_config.py list-groups <project>
138 python3 skills/ppt-master/scripts/animation_config.py validate <project>
139 python3 skills/ppt-master/scripts/svg_to_pptx.py <project>
140 ```
141
142 The sidecar targets stable top-level `<g id="...">` content groups. A group ID
143 is a PowerPoint shape-target anchor, not an Animation Pane row. The compatible
144 single-effect object still creates one row; an `effects[]` array can create
145 several ordered rows that all target the same shape:
146
147 ```json
148 {
149 "version": 1,
150 "slides": {
151 "03_threshold": {
152 "animation": { "trigger": "after-previous" },
153 "groups": {
154 "risk-marker": {
155 "effects": [
156 { "effect": "entrance_fade", "order": 1, "duration": 0.25 },
157 { "effect": "path_right", "order": 2, "delay": 0.1, "duration": 0.7 },
158 { "effect": "emphasis_teeter", "order": 3, "trigger": "with-previous", "duration": 0.45 },
159 { "effect": "exit_fade", "order": 4, "trigger_shape": "details-button", "duration": 0.3 }
160 ]
161 }
162 }
163 }
164 }
165 }
166 ```
167
168 A populated group uses either the legacy single-effect fields or the
169 `{ "effects": [...] }` form, never both. `effects` must be non-empty, and every
170 row names an explicit `effect`. Existing single-effect sidecars remain fully
171 compatible.
172
173 Common row fields are:
174
175 | Field | Purpose |
176 |---|---|
177 | `effect` | Select one explicit effect; the legacy form may use `none` to keep that object static |
178 | `trigger` | Override this row's Start mode; otherwise inherit the slide animation trigger |
179 | `order` | Order ordinary rows across the slide without changing slide layers; trigger-shape rows remain in separate interactive sequences |
180 | `delay` | Add a pause to this row's resolved Start behavior |
181 | `duration` | Override this row's scheduled animation duration |
182 | `effect_options` | Set effect-specific `direction`, `amount`, `color`, `font_name`, `relative`, or `size` |
183 | `trigger_shape` | Trigger this row when another top-level group is clicked (PowerPoint **On Click of**) |
184 | Timing modifiers | `repeat_count`/`repeat_duration`, `auto_reverse`, `rewind`, `accelerate`, `decelerate`, `bounce_end`, and `restart` |
185 | Completion | `after_effect` (dim/hide) and a `.m4a`/`.mp3`/`.wav` `sound` path |
186
187 `order`, `delay`, `duration`, `trigger`, and `trigger_shape` are resolved per
188 row. The slide-level animation trigger is inheritance only. `trigger_shape`
189 implies `on-click`; if the row also declares `trigger`, it must be
190 `on-click`.
191
192 Use `python3 skills/ppt-master/scripts/pptx_animations.py --describe
193 <canonical_effect>` to see exactly which options that effect accepts. Speed is
194 controlled by `duration`; smooth start/end are controlled by
195 `accelerate`/`decelerate`. Change Font's `font_name` is one concrete
196 target-installed PowerPoint face, never a CSS font stack.
197
198 `trigger_shape` points to a different group id on the same slide and affects
199 only its row. Recorded narration rejects any row that resolves to `on-click`,
200 including trigger-shape rows.
201
202 When a user asks the AI to tune individual objects, use the [`customize-animations`](../skills/ppt-master/workflows/stages/customize-animations.md) stage. The full sidecar schema and target-validation rules remain in the [animation execution reference](../skills/ppt-master/references/animations.md).
203
204 ## Validation & Compatibility
205
206 PPT Master validates animation settings strictly: unknown effects or Start modes, invalid timing values, missing slide/group references, and attempts to animate structural objects fail instead of silently changing behavior. Export also reads the candidate PPTX back before replacing an existing output.
207
208 | Boundary | User-facing consequence |
209 |---|---|
210 | Animation target | Element animation operates on logical top-level content-group anchors; one anchor may own several Animation Pane rows |
211 | Static structure | Backgrounds, Master/Layout content, placeholders, and page chrome remain static |
212 | Unsupported object builds | No paragraph/text-range builds, custom freeform motion-path authoring, native Chart/SmartArt build sequencing, or media playback commands are inferred from grouped SVG content |
213 | Output route | Animation exists in the native PPTX generated from `svg_output/`; `svg_final/` is a static preview |
214 | Existing PPTX routes | Template Fill and Native Enhance preserve source object animation rather than translating it into this generated-deck model |
215 | Playback compatibility | Microsoft PowerPoint desktop is the primary validation target; Keynote, WPS, LibreOffice, and older Office versions may remap or omit individual effects |
216
217 For the full CLI reference, see [`svg-pipeline.md`](../skills/ppt-master/scripts/docs/svg-pipeline.md). For exact effect definitions, sidecar requirements, anchor fallback logic, and OOXML read-back rules, see the [animation execution reference](../skills/ppt-master/references/animations.md).
218
218 lines MARKDOWN