summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 12:30:09 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:33:04 -0300
commit63b15f2b58c91afc372765785d0233f733af73e2 (patch)
treec0597e68dd5369c4bb633cec34aa77bb85d6e833 /src
parentb52da82a9405ac4c9f1c18e2ef53594d5c1f6721 (diff)
downloadsketchbook-63b15f2b58c91afc372765785d0233f733af73e2.tar.gz
sketchbook-63b15f2b58c91afc372765785d0233f733af73e2.zip
anim: only a playing deck loops past its end: the stock player sent a paused playhead set past the end back to 0 on the next update, where the player before the Deck held the end while paused (a script that shoots a scene's last picture at deck.t 999 got an empty frame); a talk still holds its last picture; zig build test 192/192 steps, 152/152 tests; 01-computeranim's anim tests 203/203 on itHEADmain
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src')
-rw-r--r--src/anim/player.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/anim/player.zig b/src/anim/player.zig
index b329714..fd318ac 100644
--- a/src/anim/player.zig
+++ b/src/anim/player.zig
@@ -119,9 +119,10 @@ pub fn update(s: *State, in: *const sk.Input) void {
} else |_| {}
}
// Played past the end: from the start again, or held there (a talk
- // holds its last picture).
+ // holds its last picture, and so does a paused playhead set past the
+ // end: only playing loops).
if (!in.exporting and d.t > d.duration + 1) {
- if (s.looping and !talking) ask.to = 0 else d.t = d.duration;
+ if (s.looping and !talking and d.playing) ask.to = 0 else d.t = d.duration;
}
d.update(in, ask, talk, .{});
}