StaticdefaultThe default stroke of the sketch. Equivalent to a stroke of 1 in a 500x500 sketch.
StaticisIs the canvas rendering mode set to WebGL?
StaticlockedWhen true, buildCanvas will not create a new canvas.
StaticbuildBuild a p5 canvas with the given aspect ratio, resolution, and canvas type.
If lockedCanvas is true, no canvas will be built.
OptionalcanvasType: stringCan be WEBGL ("webgl") or P2D ("p2d").
OptionallockCanvas: booleanWhen true, the canvas will be locked after it has been created.
StaticlockLocks the canvas. After this is called, buildCanvas will not create a new canvas.
StaticresizeStaticunlockUnlocks the canvas. After this is called, buildCanvas will create a new canvas.
StaticupdateUpdate the current aspect ratio of the canvas to the given aspect ratio. This method will resize the canvas and decorate it with the appropriate updated attributes.
Staticupdate
The CanvasContext provides static access to information and methods for the running p5.js sketch canvas.