Skip to content

Commit

Permalink
Add links to p5.Framebuffer.pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmcintyre committed May 15, 2024
1 parent 7be7607 commit 6dbbf11
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/webgl/p5.Framebuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ class Framebuffer {
/**
* An array containing the color of each pixel in the framebuffer.
*
* `myBuffer.loadPixels()` must be called before accessing the
* `myBuffer.pixels` array. `myBuffer.updatePixels()` must be called after
* any changes are made.
* <a href="#/p5.Framebuffer/loadPixels">myBuffer.loadPixels()</a> must be
* called before accessing the `myBuffer.pixels` array.
* <a href="#/p5.Framebuffer/updatePixels">myBuffer.updatePixels()</a>
* must be called after any changes are made.
*
* Note: Updating pixels via this property is slower than drawing to the
* framebuffer directly. Consider using a shader instead of looping over
* pixels.
* framebuffer directly. Consider using a
* <a href="#/p5.Shader">p5.Shader</a> object instead of looping over
* `myBuffer.pixels`.
*
* @property {Number[]} pixels
*
Expand Down

0 comments on commit 6dbbf11

Please sign in to comment.