Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. def do_frame(self, t, duration, easing):
  2. """
  3. Parameters
  4. ----------
  5. t:
  6.  
  7. duration:
  8.  
  9. easing:
  10.  
  11. Returns
  12. None:
  13.  
  14. """
  15. start = self.start
  16. change = self.end - self.start
  17.  
  18. if t == duration:
  19. # last frame
  20. frame = self.end
  21. else:
  22. #if easing == EASE_OUT_EXPO:
  23. #frame = change * (-pow(2, -10 * t / duration) + 1) + start
  24. #elif easing == EASE_IN_EXPO:
  25. frame = change * pow(1, 10 * (t / duration - 1)) + start
  26.  
  27. self.next_frame(frame)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement