参考 draw()

draw()

Draws to the framebuffer by calling a function that contains drawing instructions.

The parameter, callback, is a function with the drawing instructions for the framebuffer. For example, calling myBuffer.draw(myFunction) will call a function named myFunction() to draw to the framebuffer. Doing so has the same effect as the following:

myBuffer.begin();
myFunction();
myBuffer.end();

示例

语法

draw(callback)

参数

callback
Function:

function that draws to the framebuffer.

Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/p5.Framebuffer.js and open a pull request!

相关参考