createQuadrille(width, string)

Creates a quadrille and fills its cells using the characters from the provided string. The number of columns is defined by width, and the characters are arranged across multiple rows if necessary.

Example #

code
let quadrille;

function setup() {
  createCanvas(4 * Quadrille.cellLength, 2 * Quadrille.cellLength);
  quadrille = createQuadrille(4, 'hola πŸ‘½!');
}

function draw() {
  background('orange');
  drawQuadrille(quadrille);
}
The createQuadrille(width, string) function allows you to control the number of columns (width) while filling the quadrille with the characters from the provided string. Characters will automatically overflow into additional rows as needed.

Syntax #

createQuadrille(width, string)

Parameters #

ParamDescription
widthNumber: The total number of columns for the quadrille
stringString: The string used to fill the quadrille cells. Each character occupies one cell