code: def __init__(self):
      app.Canvas.__init__(self, keys="interactive", size=(800, 550))
  
      vertices, faces, outline = create_box(
          width=1,
          height=1,
          depth=1,
          width_segments=4,
          height_segments=8,
          depth_segments=16,
      )
  
      self.box = visuals.BoxVisual(
          width=1,
          height=1,
          depth=1,
          width_segments=4,
          height_segments=8,
          depth_segments=16,
          vertex_colors=vertices["color"],
          edge_color="b",
      )
  
      self.theta = 0
      self.phi = 0
  
      self.transform = MatrixTransform()
  
      self.box.transform = self.transform
      self.show()
  
      self.timer = app.Timer(connect=self.rotate)
      self.timer.start(0.016)
  
file_path: vispy/examples/basics/visuals/box.py
imports: from vispy import app, gloo, visuals
  from vispy.geometry import create_box
  from vispy.visuals.transforms import MatrixTransform
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()