lordmauve / wasabi2d

Cutting-edge 2D game framework for Python
https://wasabi2d.readthedocs.io/
GNU Lesser General Public License v3.0
154 stars 24 forks source link

animate() for tuples not respecting tween #36

Closed lordmauve closed 3 years ago

lordmauve commented 4 years ago

I tried to write an animation on pos with tween=bounce_end.

However I see no bounces; I saw a very quick (linear?) tween to the target position.

import wasabi2d as w2d                                                          

  scene = w2d.Scene(background="#223366")                                         

  cx, cy = scene.width // 2, scene.height // 2                                    

  title = scene.layers[0].add_label(                                              
      "Example",                                                 
      pos=(cx, -10),                                                               
      fontsize=48,                                                                
      align='center',                                                             
  )                       

w2d.animate(title, tween='bounce_end', pos=(cx, cy))
w2d.run()
lordmauve commented 4 years ago

I looked into bounce_end for another thing and ultimately decided it was just happening too quickly - over a 1 second tween it reaches 90% of the transition in maybe 2 frames.

lordmauve commented 4 years ago

Oh, maybe that was out_elastic.

encukou commented 3 years ago

This should be fixed in #62. When I filed #61, I didn't realize it was a duplicate.