Files
deckcraft/crates
marshiyar b7482dd392 engine: animation.add and animation.set take the points of a custom motion path
What was wrong: animation.add ignored a `path` parameter, so a customPath
animation always got the default straight path of a quarter of the slide
height, and no command could set or change the points of one.

What changed: animation.add, animation.set and animation.options accept `path`
for a motion path: either points [[x, y], ...] in slide points, as offsets from
where the shape sits (converted to the stored slide-fraction path; `closed`
returns to the first point), or the OOXML path string animation.get answers.
At most 1000 points, finite numbers within 1e6 points, and strings of at most
16 KiB made of path commands and numbers are accepted; anything else is
refused before the deck changes, as is `path` on an animation that is not a
motion path. animation.add answers the stored path.

How it was tested: three new tests in cmd/animation.rs: points become the
expected path (add, set with `closed`, back to the default without `path`), a
raw string is kept and animation.options replaces it, and malformed paths are
refused with nothing added. The animation tests pass, and clippy is clean with
-D warnings.

Fixes #1576
2026-10-30 20:13:05 -07:00
..
2026-10-28 06:02:27 +00:00
2026-10-25 13:42:04 -04:00
2026-10-30 15:48:33 -04:00
2026-10-30 15:58:54 -04:00
2026-10-30 15:42:30 -04:00
2026-10-30 15:59:09 -04:00
2026-10-30 16:08:19 -04:00
2026-10-30 15:48:46 -04:00
2026-10-30 16:05:36 -04:00
2026-10-30 16:08:21 -04:00
2026-10-28 06:02:27 +00:00