adamwiggins (owner)

Revisions

gist: 169581 Download_button fork
public
Public Clone URL: git://gist.github.com/169581.git
Embed All Files: show embed
accelerate.py #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Accelerate( IntervalAction ):
    def init(self, other, rate = 2):
        self.other = other
        self.rate = rate
        self.duration = other.duration
 
    def start(self):
        self.other.target = self.target
        self.other.start()
 
    def update(self, t):
        self.other.update( t**self.rate )
 
    def __reversed__(self):
        return Accelerate(Reverse(self.other), 1.0/self.rate)