def __init__(self): GLMultiViewportProgram.__init__(self) self.animating = False self.animationTime = 0 self.animationDuration = 0 self.animationStartTime = 0 self.items = dict()
def idlefunc(self): if not self.animating: GLMultiViewportProgram.idlefunc(self) return t = time.time() self.animationTime = t - self.animationStartTime if self.animationDuration == 0: self.animationTime = 0 else: self.animationTime = self.animationTime % self.animationDuration self._updateTime(self.animationTime)