diff --git a/src/core/rendering.js b/src/core/rendering.js index 5652389574..6214d4f180 100644 --- a/src/core/rendering.js +++ b/src/core/rendering.js @@ -664,7 +664,7 @@ p5.prototype.createFramebuffer = function(options) { * createCanvas(100, 100, WEBGL); * * // Create the p5.Framebuffer objects. - * prev = createFramebuffer({ format: FLOAT }); + * previous = createFramebuffer({ format: FLOAT }); * current = createFramebuffer({ format: FLOAT }); * * describe( @@ -673,9 +673,9 @@ p5.prototype.createFramebuffer = function(options) { * } * * function draw() { - * // Set the previous p5.Framebuffer to the + * // Swap the previous p5.Framebuffer and the * // current one so it can be used as a texture. - * previous = current; + * [previous, current] = [current, previous]; * * // Start drawing to the current p5.Framebuffer. * current.begin();