code: def __init__(self):
      app.Canvas.__init__(
          self,
          size=(512, 512),
          title="Rotating cube",
          keys="interactive",
      )
      self.timer = app.Timer("auto", self.on_timer)
  
      # Build cube data
      V, I, outline = create_cube()
      vertices = VertexBuffer(V)
      self.faces = IndexBuffer(I)
      self.outline = IndexBuffer(outline)
  
      # Build program
      # --------------------------------------
      self.program = Program(vertex, fragment)
      self.program.bind(vertices)
  
      # Build view, model, projection & normal
      # --------------------------------------
      view = translate((0, 0, -5))
      model = np.eye(4, dtype=np.float32)
  
      self.program["u_model"] = model
      self.program["u_view"] = view
      self.phi, self.theta = 0, 0
  
      self.activate_zoom()
  
      # OpenGL initialization
      # --------------------------------------
      gloo.set_state(
          clear_color=(0.30, 0.30, 0.35, 1.00),
          depth_test=True,
          polygon_offset=(1, 1),
          line_width=0.75,
          blend_func=("src_alpha", "one_minus_src_alpha"),
      )
      self.timer.start()
  
      self.show()
  
file_path: vispy/examples/gloo/outlined_cube.py
imports: import numpy
  from vispy import gloo, app
  from vispy.gloo import Program, VertexBuffer, IndexBuffer
  from vispy.util.transforms import perspective, translate, rotate
  from vispy.geometry import create_cube
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()