Skip to main content

Module motion

Module motion 

Source
Expand description

Swimming over time: the pose for each frame of a behavior’s seamless loop.

Structs§

SwimPose
How the koi’s body and fins look in one frame. Paired values list the left fin, then the right, as the koi sees them.

Enums§

Course
Where the koi swims in a frame.

Constants§

FRAMES_PER_SECOND
Frames per second of every behavior’s loop; GIF frame delays derive from it.

Functions§

calculate_swim_pose
The pose for a frame of a behavior’s loop; frame numbers wrap around the loop, so frame frame_count(behavior) is frame zero again.
frame_count
Frames in a behavior’s loop at FRAMES_PER_SECOND.