AbstractAbstractdrawCalled by the rendering engine on every frame.
When overriding this method, ensure that the p5 instance is configured properly. For example, rectangles may be drawn incorrectly if a previous CanvasDrawer had modified p5.rectMode(). CanvasDrawer classes are not obligated/expected to use the default p5 attributes.
See the p5 documentation on attributes for more information: https://p5js.org/reference/#Attributes
Invoked by the rendering engine to generate a frame.
A Graphic represents an individual object or drawing rendered onto the canvas.
Each Graphic is given an instance of p5 and contains a draw() method invoked by the rendering engine to draw a frame. Graphics are stored in a list, and drawn sequentlly, one after the other.
Remarks
Classes implementing Graphic are expected to support customization options for different layouts. This is predominantly done through implementing logic with RenderConfig instance, a data class that stores information such as canvas size and colors. Graphic classes created for custom layouts do not have to support this customization, though it is still recommended.
Graphic classes are intended to be static, drawing the same visual onto the canvas every frame. For Graphics that change overtime, implement the DynamicGraphic class, which provides MIDI and time data to read from.