class Animator:
    def __init__(self, globals, the1=False):
        if the1:
            global TheAnimator
            TheAnimator = self
        self.globals = globals
        self.t0 = 0.0
        self.spans = []
        self.initial = {}
    
    def sspan(self, dur):
        t0 = self.t0
        self.t0 += dur
        self.span = (t0, self.t0, [])
        self.spans.append(self.span)
        return self
    
    def move(self, name, x0, x1):
        if name not in self.initial: self.initial[name] = x0
        self.span[2].append((name, x0, x1))
        return self

    def set(self, name, x):
        self.sspan(0)
        return self.move(name, x, x)

    def append(self, other):
        for name, value in other.initial.items():
            self.set(name, value)
        for t0, t1, moves in other.spans:
            self.spans.append((self.t0 + t0, self.t0 + t1, moves))
        self.t0 += other.t0
        return self
    
    def update1(self, frame=None):
        if frame is None:
            t = self.globals['anim'] * self.t0
        else:
            t = frame / 50.0
        set = {}
        for t0, t1, moves in self.spans:
            s = (t - t0) / (t1 - t0) if t1 > t0 else int(t > t0)
            s = max(0, min(1, s))
            for name, v0, v1 in moves:
                if t < t0 and name in set: continue
                v = v0 + s * (v1 - v0)
                set[name] = v
                self.globals[name] = v

    @classmethod
    def update0(cls, frame=None):
        global TheAnimator
        TheAnimator.update1(frame)

@@ -43,44 +43,11 @@
 bals
-, the1=False):%0A        if the1:%0A    
+):%0A
     
@@ -49,35 +49,38 @@
 %0A        global 
-The
+Global
 Animator%0A       
@@ -76,31 +76,30 @@
 tor%0A        
-    The
+Global
 Animator = s
@@ -411,18 +411,67 @@
 , x0, x1
+, newSpan=False):%0A        if newSpan: self.sspan(1
 )
-:
 %0A       
@@ -970,144 +970,20 @@
 date
-1
+To
 (self, 
-frame=None):%0A        if frame is None:%0A            t = self.globals%5B'anim'%5D * self.t0%0A        else:%0A            t = frame / 50.0
+t):
 %0A   
@@ -1367,17 +1367,16 @@
 f update
-0
 (cls, fr
@@ -1398,18 +1398,137 @@
     
-global The
+if frame is None:%0A            t = self.globals%5B'anim'%5D * self.t0%0A        else:%0A            t = frame / 50.0%0A        global Global
 Anim
@@ -1544,11 +1544,14 @@
     
-The
+Global
 Anim
@@ -1565,13 +1565,10 @@
 date
-1(frame
+To(t
 )%0A

improve some method, variable names