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!