Finish animation update loop with loop/pingpong/reverse/stop flags, clean up keyframe sampling, add coverage
- animationUpdate now advances and resolves boundary crossings for ANIMATION_FLAG_LOOP, ANIMATION_FLAG_PINGPONG, ANIMATION_FLAG_REVERSE, and the STOP_BEGINNING/STOP_END flags, firing onLoop/onComplete appropriately; guards against LOOP+PINGPONG being set together and moves the duration-must-be-positive check into animationInit - keyframeGetValue clamps to the last keyframe's value instead of dividing by zero once time reaches it, and its keyframe walk drops a branch that's unreachable after that clamp - Adds test/animation/test_animation.c covering init, per-layer sampling, and the full animationUpdate flag matrix
This commit is contained in:
@@ -7,3 +7,4 @@ include(dusktest)
|
||||
|
||||
# Tests
|
||||
dusktest(test_keyframe.c)
|
||||
dusktest(test_animation.c)
|
||||
|
||||
Reference in New Issue
Block a user