Inside Playdate Version 2.1.1 playdate.graphics.animation.loop.new documents a parameter and property named shouldLoop
. When I iterate the key-value pairs of an animation loop, however, there is no shouldLoop
key. There is a loop
key with a boolean value, which seems to correspond to shouldLoop
in the documentation.
3 Likes
Good call! I've added shouldLoop
to the __index metamethod so that the get matches the set. Here's the patch if you want to fix that on your copy before we can get that into an update:
--- a/SDK/CoreLibs/animation.lua
+++ b/SDK/CoreLibs/animation.lua
@@ -49,6 +49,9 @@ loopAnimation.__index = function(table, key)
elseif key == "paused" then
return table._paused
+
+ elseif key == "shouldLoop" then
+ return table.loop
elseif key == "step" then
return table._step
1 Like
Thanks, Dave! I applied the patch to my copy, and it worked.