code: def __init__(self):
      super().__init__(
          size=(512, 512), title="Rotating quad", keys="interactive"
      )
      # Build program & data
      self.program = Program(vertex, fragment, count=4)
      self.program["color"] = [
          (1, 0, 0, 1),
          (0, 1, 0, 1),
          (0, 0, 1, 1),
          (1, 1, 0, 1),
      ]
      self.program["position"] = [
          (-1, -1),
          (-1, +1),
          (+1, -1),
          (+1, +1),
      ]
      self.program["theta"] = 0.0
  
      gloo.set_viewport(0, 0, *self.physical_size)
      gloo.set_clear_color("white")
  
      self.timer = app.Timer("auto", self.on_timer)
      self.clock = 0
      self.timer.start()
  
      self.show()
  
file_path: vispy/examples/gloo/rotating_quad.py
imports: from vispy import gloo, app
  from vispy.gloo import Program
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()