Skip to content

Commit 542906e

Browse files
xscriptorxscriptor
andauthored
update animate-logo for support on macos add changelog (#2)
Co-authored-by: xscriptor <“preciado.oscar.osorio@gmail.com”>
1 parent 160c869 commit 542906e

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

plugins/animate-logo/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
## 2026-08-15 — v0.1.0
4+
5+
### Full Frame Cycle for Frame-Style Animations
6+
7+
- Fixed frame truncation in `frame` style: when `duration_ms` is not set in the logo animation config, the plugin no longer caps the output to the 1200 ms default (e.g. 14 frames at 12 fps), which caused the animation to be cut short and restart from the beginning.
8+
- When `duration_ms` is absent and `style` is `frame` with source frames available, the plugin now emits every source frame exactly once (e.g. all 36 frames of a kitty animation), letting the host loop the complete animation.
9+
- Behavior for generated styles (`sweep`, `wave`, `rainbow`, `sparkle`, `breathing`, `none`) and for explicit `duration_ms` values is unchanged.

plugins/animate-logo/src/main.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@ fn main() {
1414
let args = request.args;
1515
let fps = clamp(args.fps.unwrap_or(12), 1, 60);
1616
let frame_delay = 1000 / fps;
17-
let duration_ms = std::cmp::max(frame_delay, args.duration_ms.unwrap_or(1200));
18-
let frame_count = std::cmp::max(1, duration_ms / frame_delay);
1917
let style = args.style.as_deref().unwrap_or("sweep");
18+
19+
let frame_count = if args.duration_ms.is_none()
20+
&& style == "frame"
21+
&& request.frames.as_ref().is_some_and(|sets| !sets.is_empty())
22+
{
23+
request.frames.as_ref().unwrap().len() as u64
24+
} else {
25+
let duration_ms = std::cmp::max(frame_delay, args.duration_ms.unwrap_or(1200));
26+
std::cmp::max(1, duration_ms / frame_delay)
27+
};
28+
2029
let frame_sets = request.frames.unwrap_or_default();
2130

2231
let frames: Vec<AnimationFrame> = match style {

0 commit comments

Comments
 (0)