q5play
    Preparing search index...

    Function resizeCanvas

    • 💻 Resizes the canvas to the specified width and height.

      Parameters

      • w: number

        width of the canvas

      • h: number

        height of the canvas

      Returns void

      await Canvas(200, 100);

      q5.draw = function () {
      background(0.8);
      };

      q5.mousePressed = function () {
      resizeCanvas(200, 200);
      };