code: def __init__(self):
      app.Canvas.__init__(self, keys="interactive", size=(800, 800))
      self.title = "Atom [zoom with mouse scroll]"
  
      self.translate = 6.5
      self.program = gloo.Program(vert, frag)
      self.view = translate((0, 0, -self.translate))
      self.model = np.eye(4, dtype=np.float32)
      self.projection = np.eye(4, dtype=np.float32)
      self.apply_zoom()
  
      self.program.bind(gloo.VertexBuffer(data))
      self.program["u_model"] = self.model
      self.program["u_view"] = self.view
      self.program["u_size"] = 5 / self.translate
  
      self.theta = 0
      self.phi = 0
      self.clock = 0
      self.stop_rotation = False
  
      gloo.set_state("translucent", depth_test=False)
      self.program["u_clock"] = 0.0
  
      self._timer = app.Timer("auto", connect=self.on_timer, start=True)
  
      self.show()
  
file_path: vispy/examples/demo/gloo/atom.py
imports: import numpy
  from vispy import gloo
  from vispy import app
  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()