code: def on_draw(self, event):
      # Set time offset. Factor runs from 1 to 0
      # the time offset goes from 0 to size
      factor = (self._timeout - time.time()) / SPEED
      self.program["u_time_offset"] = -(1 - factor) * SIZE
  
      # Draw
      gloo.clear()
      self.program.draw("points")
  
      # Build new starts if the first block is fully behind us
      if factor < 0:
          self._generate_stars()
  
file_path: vispy/examples/demo/gloo/spacy.py
imports: import time
  import numpy
  from vispy import gloo
  from vispy import app
  from vispy.util.transforms import perspective
label_desc: Use image node_id 5 for calling the Canvas obj's underlying member method code with example usage: obj.on_draw(event) without return types