Example #1
0
 def on_idle(self, idle_event: events.Idle, signal):
     self.render_clock += idle_event.time_delta
     if self.render_clock > self.target_count:
         self.pre_render_updates(idle_event.scene)
         signal(events.PreRender())
         signal(events.Render())
         self.render_clock = 0
Example #2
0
 def on_idle(self, idle_event: events.Idle, signal):
     t = get_time()
     if t >= self.target_clock:
         signal(events.PreRender(t - self.last_frame))
         signal(events.Render())
         self.target_clock = t + self.target_frame_length
         self.last_frame = t
Example #3
0
 def on_idle(self, idle_event: events.Idle, signal):
     self.render_clock += idle_event.time_delta
     if self.render_ready:
         self.render_ready = False
         signal(events.Render())
     elif self.render_clock >= self.target_count:
         self.render_clock = 0
         signal(events.PreRender())
Example #4
0
 def activate(self, engine):
     yield events.PreRender()
     yield events.Render()