graphics
The graphics parameter renders quadrilles onto a custom p5.Graphics buffer, enabling flexible compositing and advanced texturing.
Example 1
(click and drag the canvas to move the quadrille graphics)
Note
This example shows how to render a quadrille onto a
p5.Graphicsobject, allowing it to be used as a dynamic image (image()). The rendered graphics object can be moved independently of the main canvas, enabling layering and modular manipulation.
Example 2
(click and drag to orbit; dynamic Game of Life pattern rendered as a 3D texture)
Note
This example highlights the use of a
p5.Graphicsobject to render a quadrille and apply it as a 3D texture in a WEBGL environment. The quadrille represents a Game of Life simulation, with its updated state drawn onto the graphics object, decoupling the simulation from the main canvas for advanced visualization.
Syntax
drawQuadrille(quadrille, { graphics })
Parameters
| Param | Description |
|---|---|
graphics |
p5.Graphics: Renderer target. Defaults to this (main canvas) |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLengthvisitwidthcloneheightorisFilledring- p5.js
createCanvasbackgroundcolornoStrokeframeCountcreateGraphicsmouseYmouseXrotateYWEBGLimagemouseIsPressedorbitControlPIsphere
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.