Source Academy Modules
    Preparing search index...

    Function set_scale

    • Sets the scale (zoom) of the pixels in the canvas. If scale is doubled, then the number of units across would be halved. This has a side effect of making the game pixelated if scale > 1. The default scale is 1.

      Parameters

      • scale: number

        The scale of the canvas to set.

      Returns void

      // sets the scale of the canvas to 2.
      set_scale(2);