Source Academy Modules
    Preparing search index...

    Function set_fps

    • Sets the frames per second of the canvas, which should be between the MIN_FPS and MAX_FPS. It ranges between 1 and 120, with the default target as 30. This function should not be called in the update function.

      Parameters

      • fps: number

        The frames per second of canvas to set.

      Returns void

      // set fps to 60
      set_fps(60);