code: def __init__(
      self,
  ):
      app.Canvas.__init__(self)
      self.size = 800, 600
      # fovy, zfar params
      self.fovy = 45.0
      self.zfar = 10.0
      width, height = self.size
      self.aspect = width / float(height)
  
      self.program = gloo.Program(vert, frag)
  
      self.model = np.eye(4, dtype=np.float32)
      self.projection = np.eye(4, dtype=np.float32)
      self.view = translate((0, 0, -5.0))
  
      self.program["u_model"] = self.model
      self.program["u_view"] = self.view
  
      self.theta = 0
      self.phi = 0
      self.visible = True
  
      self._timer = app.Timer(1.0 / 60)
      self._timer.connect(self.on_timer)
      self._timer.start()
  
      # ---------------------------------
      gloo.set_clear_color((1, 1, 1, 1))
      gloo.set_state("opaque")
      gloo.set_polygon_offset(1, 1)
  
imports: from PyQt5 import QtCore, QtWidgets
  import sys
  import numpy
  from vispy import app, gloo
  from vispy.util.transforms import perspective, translate, rotate
  from vispy.geometry import meshdata
  from vispy.geometry import generation
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()