code: def __init__(self):
      app.Canvas.__init__(
          self, "Cube", keys="interactive", size=(400, 400)
      )
  
      self.cube = BoxVisual(1.0, 0.5, 0.25, color="red", edge_color="k")
      self.theta = 0
      self.phi = 0
  
      # Create a TransformSystem that will tell the visual how to draw
      self.cube_transform = transforms.MatrixTransform()
      self.cube.transform = self.cube_transform
  
      self._timer = app.Timer("auto", connect=self.on_timer, start=True)
  
      self.show()
  
file_path: vispy/examples/basics/visuals/rotating_box.py
imports: import sys
  from vispy import app, gloo
  from vispy.visuals import BoxVisual, transforms
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()