Source Academy Modules
    Preparing search index...

    Function set_dimensions

    • Sets the dimensions of the canvas, which should be between the min and max widths and height.

      Parameters

      • dimensions: DimensionsXY

        An array containing [width, height] of the canvas.

      Returns void

      // set the width as 500 and height as 400
      set_dimensions([500, 400]);