createQuadrille()
Creates an 8x8 quadrille with a chessboard pattern.
Example
Note
createQuadrille()is equivalent tocreateQuadrille(8, 8).fill(). See createQuadrille(width, height) and fill().
Warning
Global Parameters The following parameters are static fields of the
Quadrilleclass, meaning they are shared across all instances ofQuadrille. Changing these values affects all newly created quadrille objects:
Quadrille.lightSquareandQuadrille.darkSquare: Define the colors for the light and dark squares of the chessboard pattern.- Quadrille.cellLength and Quadrille.tileDisplay are discussed separately.
Syntax
createQuadrille()
Parameters
| Param | Description |
|---|---|
Quadrille.lightSquare |
String | p5.Color: The global color used for the light squares of the chessboard pattern. Can be an HTML color string (e.g., 'red', '#ff0000', 'rgb(255,0,0)') or a p5.Color instance. Default is #FDCDAA |
Quadrille.darkSquare |
String | p5.Color: The global color used for the dark squares of the chessboard pattern. Can be an HTML color string or a p5.Color instance. Default is #D28C45 |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLengthtileDisplaydarkSquarelightSquare- p5.js
createCanvas
Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.