createQuadrille(width, height)
Creates an empty quadrille having width number of columns and height number of rows.
Example
code
// quadrille object declaration
let quadrille;
function setup() {
// Quadrille.cellLength is a constant defining the quadrille
// cell length default is: 100
createCanvas(6 * Quadrille.cellLength, 4 * Quadrille.cellLength);
// quadrille object initialization
quadrille = createQuadrille(6, 4);
}
function draw() {
background('violet');
// to display the quadrille a call to drawQuadrille is needed
drawQuadrille(quadrille);
}Syntax
createQuadrille(width, height)
Parameters
| Param | Description |
|---|---|
width | Number: total number of columns |
height | Number: total number of rows |