code: def __init__(self, **kwargs):
      app.Canvas.__init__(self, size=(400, 400), **kwargs)
  
      self.program = gloo.Program(VERT_CODE, FRAG_CODE)
  
      # Set attributes
      self.program["a_position"] = gloo.VertexBuffer(positions)
      self.program["a_texcoord"] = gloo.VertexBuffer(texcoords)
  
      self.program["u_texture"] = gloo.Texture2D(load_crate())
  
      # Handle transformations
      self.init_transforms()
  
      self.apply_zoom()
  
      gloo.set_clear_color((1, 1, 1, 1))
      gloo.set_state(depth_test=True)
  
      self._timer = app.Timer("auto", connect=self.update_transforms)
      self._timer.start()
  
      self.show()
  
file_path: vispy/examples/demo/gloo/glsl_sandbox_cube.py
imports: import numpy
  from vispy import app, gloo
  from vispy.io import read_mesh, load_data_file, load_crate
  from vispy.util.transforms import perspective, translate, rotate
label_desc: Use image node_id 1 to create a new Canvas object from inherited base classes: app with example: obj = Canvas()