Cell Length

cellLength #

Defines the quadrille default drawing cell length in pixels. Default is 100.

Used by drawQuadrille.

Example #

code
Quadrille.cellLength = 55;
let quadrille;
let lengthSlider;

function setup() {
  createCanvas(400, 400);
  quadrille = createQuadrille(4, 4);
  lengthSlider = createSlider(10, 100, Quadrille.cellLength, 5);
  lengthSlider.position(10, height - 20);
  lengthSlider.input(() => Quadrille.cellLength = lengthSlider.value());
}

function draw() {
  background('orange');
  drawQuadrille(quadrille);
}

Syntax #

Quadrille.cellLength