code: def update(self, dt):
      z = 0
      if self.action["zoom_out"]:
          z -= 1
      if self.action["zoom_in"]:
          z += 1
      if z != 0:
          self.camera.zoom_relative(
              z / 10.0, self.get_key_sensitivity() / 10.0
          )
  
      dx, dy, dz = 0, 0, 0
      if self.action["left"]:
          dx -= 1
      if self.action["right"]:
          dx += 1
      if self.action["up"]:
          dy -= 1
      if self.action["down"]:
          dy += 1
      if self.action["spin_left"]:
          dz += 1
      if self.action["spin_right"]:
          dz -= 1
  
      if not self.is_2D():
          if dx != 0:
              self.camera.euler_rotate(
                  dx * dt * self.get_key_sensitivity(),
                  *(get_direction_vectors()[1]),
              )
          if dy != 0:
              self.camera.euler_rotate(
                  dy * dt * self.get_key_sensitivity(),
                  *(get_direction_vectors()[0]),
              )
          if dz != 0:
              self.camera.euler_rotate(
                  dz * dt * self.get_key_sensitivity(),
                  *(get_direction_vectors()[2]),
              )
      else:
          self.camera.mouse_translate(
              0,
              0,
              dx * dt * self.get_key_sensitivity(),
              -dy * dt * self.get_key_sensitivity(),
          )
  
      rz = 0
      if self.action["rotate_z_neg"] and not self.is_2D():
          rz -= 1
      if self.action["rotate_z_pos"] and not self.is_2D():
          rz += 1
  
      if rz != 0:
          self.camera.euler_rotate(
              rz * dt * self.get_key_sensitivity(),
              *(get_basis_vectors()[2]),
          )
  
      if self.action["reset_camera"]:
          self.camera.reset()
  
      if self.action["rot_preset_xy"]:
          self.camera.set_rot_preset("xy")
      if self.action["rot_preset_xz"]:
          self.camera.set_rot_preset("xz")
      if self.action["rot_preset_yz"]:
          self.camera.set_rot_preset("yz")
      if self.action["rot_preset_perspective"]:
          self.camera.set_rot_preset("perspective")
  
      if self.action["toggle_axes"]:
          self.action["toggle_axes"] = False
          self.camera.axes.toggle_visible()
  
      if self.action["toggle_axe_colors"]:
          self.action["toggle_axe_colors"] = False
          self.camera.axes.toggle_colors()
  
      if self.action["save_image"]:
          self.action["save_image"] = False
          self.window.plot.saveimage()
  
      return True
  
file_path: sympy/sympy/plotting/pygletplot/plot_controller.py
imports: from pyglet.window import key
  from pyglet.window.mouse import LEFT, RIGHT, MIDDLE
  from sympy.plotting.pygletplot.util import get_direction_vectors, get_basis_vectors
label_desc: Use image node_id 2 for calling the PlotController obj's underlying member method code with example usage: obj.update(dt) and returns: True