Transitions like PowerPoint: measured frame by frame and retuned

Every transition and Effect Option was built in PowerPoint (COM), exported as
video and compared frame by frame with DeckCraft at the same progress
(mean abs diff over 150 variants 35.7 -> 15.0, 0-255).

- anim: transition_frame(kind, option, t, aspect) with measured curves
  (smoothstep fades, ease-in-out moves, Cover/Uncover/Pan curves), directions
  and option meanings, soft edges as per-corner opacity, 3-D effects as
  perspective-projected cards, Dynamic Content moving slide contents over
  cross-fading backgrounds (Source::OldBack/NewBack/OldContent/NewContent);
  layer_mesh subdivides perspective quads so textures stay straight.
- New options: Page Curl Single, Glitter Hexagons, Shred In/Out, Zoom and
  Rotate; PowerPoint-style Effect Options labels.
- render: composite_transition (CPU twin of the show), render_slide_part,
  render_transition; deckcraft-cli render-transition FILE --slide N --t T.
- show: per-vertex opacity meshes, slide parts rendered once per transition.
- pptx: PowerPoint's elements and defaults (p:strips diagonal wipes, p14:warp
  and p:newsflash for Zoom, p:zoom for Shape In/Out, glitter pattern, shred
  rectangle/dir, prstTrans invX per preset, pageCurlSingle, defaults for
  randomBar/doors/window/pan/zoom); PowerPoint reopens DeckCraft's files with
  the same effects.
- Tests: measured curves, probes of which slide shows where at t, option
  coverage, per-frame triangle budget, PowerPoint XML and defaults round trip.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-13 05:25:33 -04:00
co-authored by Claude Opus 5.5
parent 735e16d93c
commit fae945831b
19 changed files with 3080 additions and 879 deletions
+27 -9
View File
@@ -1,6 +1,6 @@
# Transitions and animations: parity with PowerPoint
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (created; effect lists counted from `crates/model/src/anim.rs` against PowerPoint 16.113's galleries) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
> **Last reviewed:** 2026-10-13 · **Last updated:** 2026-10-13 · **Change:** major (transitions measured frame by frame against PowerPoint for Windows' video export and retuned; previous: created) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
Transitions and animations are what make a deck a presentation, and the part of PowerPoint people
notice first when it's missing. Scores roll up into [target-app-parity.md](target-app-parity.md)
@@ -9,14 +9,31 @@ notice first when it's missing. Scores roll up into [target-app-parity.md](targe
## Transitions: 48 of 48
`crates/model/src/anim.rs` `TRANSITIONS` lists every transition in PowerPoint's gallery, in its
three groups, with its Effect Options. All 48 round-trip through PPTX
(`every_transition_kind_round_trips`), including the PowerPoint 2010+ `p14`/`p15` ones.
three groups, with its Effect Options (now also Page Curl Single, Glitter Hexagons, Shred In/Out
and Zoom and Rotate). All 48 round-trip through PPTX with the elements, attributes and defaults
PowerPoint itself writes (`every_transition_kind_round_trips`,
`transition_xml_matches_powerpoints_elements`, `transition_defaults_read_like_powerpoint`): 145 of
145 PowerPoint-built test slides reopen in PowerPoint with the same effect after a DeckCraft
save.
**Measured against PowerPoint (2026-10-13).** Synthetic two-colour decks with asymmetric markers
were built in PowerPoint for Windows over COM with every transition and option (150 variants,
2 s each), exported with `CreateVideo` at 30 fps, and compared frame by frame with
`deckcraft-cli render-transition` at the same progress (`plan/powerpoint/tools/synth_transitions.ps1`,
`trans_compare.py`). Mean absolute difference over all variants at t = 0.1…0.9 (0–255): **35.7
before, 15.0 after**. Curves (fades are a smoothstep, moves ease in-out; Cover, Uncover and Pan
have their own measured curves), directions and option meanings (e.g. Glitter starts on the
option's side, Ripple's corner is where the wave heads, Wind/Airplane/Origami "Left" is `invX`),
soft edges (Wipe, Split, Shape, Clock, Ripple) and the Dynamic Content transitions moving the
slides' contents over cross-fading backgrounds now follow PowerPoint. 3-D transitions are
perspective-projected cards (`crates/anim/src/transition_geom.rs`) drawn with
perspective-correct subdivided meshes.
| Group | PowerPoint | DeckCraft | Fidelity |
|---|---|---|---|
| Subtle (Morph, Fade, Push, Wipe, Split, Reveal, Cut, Random Bars, Shape, Uncover, Cover, Flash) | 12 | 12 | 2-D, close to PowerPoint |
| Exciting (Fall Over, Drape, Curtains, Wind, Prestige, Fracture, Crush, Peel Off, Page Curl, Airplane, Origami, Dissolve, Checkerboard, Blinds, Clock, Ripple, Honeycomb, Glitter, Vortex, Shred, Switch, Flip, Gallery, Cube, Doors, Box, Comb, Zoom, Random) | 29 | 29 | 3-D ones are fake 3-D (trapezoid quads, `crates/anim/src/transition.rs`); particle effects (Vortex, Shred, Fracture, Crush) approximate |
| Dynamic Content (Pan, Ferris Wheel, Conveyor, Rotate, Window, Orbit, Fly Through) | 7 | 7 | Same approach |
| Subtle (Morph, Fade, Push, Wipe, Split, Reveal, Cut, Random Bars, Shape, Uncover, Cover, Flash) | 12 | 12 | Matches PowerPoint's frames (mean diff 1–8; Random Bars and Reveal Through Black ~15) |
| Exciting (Fall Over, Drape, Curtains, Wind, Prestige, Fracture, Crush, Peel Off, Page Curl, Airplane, Origami, Dissolve, Checkerboard, Blinds, Clock, Ripple, Honeycomb, Glitter, Vortex, Shred, Switch, Flip, Gallery, Cube, Doors, Box, Comb, Zoom, Random) | 29 | 29 | Perspective 3-D cards with measured motion; cloth, paper and particle effects (Curtains, Peel Off, Page Curl, Airplane, Origami, Fracture, Crush, Honeycomb, Vortex, Shred) are flat approximations of PowerPoint's meshes |
| Dynamic Content (Pan, Ferris Wheel, Conveyor, Rotate, Window, Orbit, Fly Through) | 7 | 7 | Contents move over cross-fading backgrounds, as in PowerPoint (mean diff 5–17) |
| Transition feature | PowerPoint | DeckCraft |
|---|---|---|
@@ -28,7 +45,7 @@ three groups, with its Effect Options. All 48 round-trip through PPTX
| Morph: Words and Characters | yes | yes (#5) |
| Morph: geometry (circle to star) | yes | yes (#27) |
| Morph: `!!` name forcing, pictures, 3-D models, ink | yes | names partly; no 3-D or ink |
| Frame-by-frame comparison with PowerPoint | | **not done** |
| Frame-by-frame comparison with PowerPoint | | done (Windows, 2026-10-13); headless frames: `deckcraft-cli render-transition` |
## Animations: 64 of ~190 effects
@@ -69,11 +86,12 @@ In, Wipe, Zoom, Float In, Grow/Shrink, Pulse, Spin, motion lines): weighted, ~85
| Rewind and other effect options on round trip (#77) | 1–2 |
| Transition sounds | 1–2 |
| Morph across pictures, `!!` names, align once per transition (#67) | 2–4 |
| Reference captures from PowerPoint for the 3-D transitions, then tuning | 2–4 |
| **Total** | **~14–26** (the Transitions and Animations rows of the feature table; part of the Features dimension's 140–240 h) |
| Cloth, paper and particle transitions as real meshes (Curtains, Peel Off, Page Curl, Airplane, Origami, Vortex, Shred, Honeycomb) | 4–8 |
| **Total** | **~16–30** (the Transitions and Animations rows of the feature table; part of the Features dimension's 140–240 h) |
## Revision history
| Date | Change | Summary |
|---|---|---|
| 2026-10-13 | major | Transitions measured frame by frame against PowerPoint's video export and retuned (mean diff 35.7 → 15.0); PowerPoint's XML defaults and option meanings; new options |
| 2026-10-10 | major | Created: 48/48 transitions, 64 of ~190 animation effects, pane and option depth, estimates |
+8 -3
View File
@@ -1,6 +1,6 @@
# DeckCraft architecture
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-10 · **Change:** major (created from the code on main at d556ff9; AGENTS.md §4 keeps the rules) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
> **Last reviewed:** 2026-10-13 · **Last updated:** 2026-10-13 · **Change:** minor (transition frames: perspective meshes, slide parts, headless compositor; previous: created from the code on main at d556ff9) · **Target:** Microsoft PowerPoint for Mac 16.113 (Microsoft 365)
How DeckCraft is built today. The binding rules (layering, everything is a command, thin UI, never
break wasm, never crash) are in [AGENTS.md](../AGENTS.md) §3–§5; this document describes what
@@ -49,8 +49,12 @@ Programmatic calls never open dialogs. Pointer gestures go through `Session::poi
## Rendering and the show
The renderer draws a slide to an RGBA pixmap on the CPU; the UI uploads it as an egui texture.
Transitions are layers of textured quads over the old and new slide images (fake 3-D from
trapezoids). The show window and the presenter view are egui viewports; animation state per shape
Transitions are layers of textured quads over the old and new slide images, or over their
backgrounds and contents rendered apart (Dynamic Content), from `anim::transition_frame`: 3-D
effects project cards through a perspective camera and `anim::layer_mesh` subdivides them so
textures stay straight; soft edges are per-corner opacities. The show renders the slides once per
transition and only composites cached textures each frame; `render::composite_transition` is the
CPU twin used by `deckcraft-cli render-transition` and the tests. The show window and the presenter view are egui viewports; animation state per shape
comes from `anim::timeline` each frame. PDF export renders each slide at print resolution and
overlays an invisible real-text layer with embedded font subsets.
@@ -74,4 +78,5 @@ macOS, Windows, Linux, FreeBSD and web artifacts.
| Date | Change | Summary |
|---|---|---|
| 2026-10-13 | minor | Transitions: perspective meshes, background/content parts, CPU compositor |
| 2026-10-10 | major | Created from the code on main (d556ff9) and AGENTS.md §4 |