Main graphics and rendering context, as well as the base API implementation for p5.js "core". To be used as the superclass for Renderer2D and Renderer3D classes, respectively.
语法
p5.Renderer(elt, [pInst], [isMainCanvas])
参数
elt
HTMLElement:
DOM node that is wrapped
pInst
P5:
pointer to p5 instance
isMainCanvas
Boolean:
whether we're using it as main canvas
Notice any errors or typos? Please let us know. Please feel free to edit src/core/p5.Renderer.js and open a pull request!