From d61b28619586e9e4b1f9d1db6ea7e56d88713df9 Mon Sep 17 00:00:00 2001 From: Dave Pagurek Date: Thu, 13 Jun 2024 15:47:12 -0400 Subject: [PATCH] Update clearDepth() example --- src/core/rendering.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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();