origin
The origin parameter defines the top-left corner of the quadrille for drawing: CORNER positions it at the top-left corner of the canvas, the default in P2D; CENTER positions it at the center of the canvas, the default in WEBGL.
Example
(click or press any key to toggle the origin of q between CORNER and CENTER)
Syntax
drawQuadrille(quadrille, { origin })
Parameters
| Param | Description |
|---|---|
origin |
Constant: CORNER draws the quadrille aligned to the top-left corner of the canvas (default in P2D); CENTER draws it aligned to the center of the canvas (default in WEBGL) |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLength- p5.js
createCanvasbackgroundcolorCENTER
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.