code: def on_resize(self, event):
      gloo.set_viewport(
          0, 0, event.physical_size[0], event.physical_size[1]
      )
      self.projection = perspective(
          45.0, event.size[0] / float(event.size[1]), 1.0, 1000.0
      )
      self.program["u_projection"] = self.projection
  
file_path: vispy/examples/gloo/display_lines.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 4 for calling the Canvas obj's underlying member method code with example usage: obj.on_resize(event) without return types