createQuadrille(array)
The createQuadrille function creates a quadrille and fills its cells using items from the array as the source. The array can contain any combination of valid JavaScript values, with null representing empty cells. Holes and explicit undefined entries are welcome too — createQuadrille copies the array and normalizes them to null on entry (raw arrays rendered by drawQuadrille are zero-copy views that instead alias your array untouched).
Example
Note
The
createQuadrille(array)function lets you populate a quadrille with any valid JavaScript values, such as images, colors, and strings, provided in anarray; for handling these values, see createQuadrille(jagged_array).
Syntax
createQuadrille(array)
Parameters
| Param | Description |
|---|---|
array |
An array containing any combination of valid JavaScript values. Use null to represent empty cells (holes and undefined normalize to null) |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLength- p5.js
createCanvasbackgroundcolorloadImage
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.