From 60272999158cf2a806a88f7fc5b6cf996522f0b7 Mon Sep 17 00:00:00 2001 From: Jordan Philyaw Date: Sun, 19 Jan 2025 19:23:10 -0500 Subject: [PATCH 1/2] class documentation remove duplicate frog example --- src/core/reference.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/core/reference.js b/src/core/reference.js index 52ff833fd8..348203b029 100644 --- a/src/core/reference.js +++ b/src/core/reference.js @@ -1566,46 +1566,6 @@ * *
* - * // Declare two frog variables. - * let frog1; - * let frog2; - * - * function setup() { - * createCanvas(100, 100); - * - * // Assign the frog variables a new Frog object. - * frog1 = new Frog(25, 50, 10); - * frog2 = new Frog(75, 50, 20); - * - * describe('Two frog faces drawn next to each other on a gray background.'); - * } - * - * function draw() { - * background('cornflowerblue'); - * - * // Show the frogs. - * frog1.show(); - * frog2.show(); - * } - * - * class Frog { - * constructor(x, y, size) { - * this.x = x; - * this.y = y; - * this.size = size; - * } - * - * show() { - * textAlign(CENTER, CENTER); - * textSize(this.size); - * text('🐸', this.x, this.y); - * } - * } - * - *
- * - *
- * * // Create an array that will hold frogs. * let frogs = []; * From 6a01c321d98a6b9637488618d7413f758006912f Mon Sep 17 00:00:00 2001 From: Jordan Philyaw Date: Sun, 19 Jan 2025 19:25:08 -0500 Subject: [PATCH 2/2] class documentation describe blue background --- src/core/reference.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/reference.js b/src/core/reference.js index 348203b029..3ee337f7f8 100644 --- a/src/core/reference.js +++ b/src/core/reference.js @@ -1428,7 +1428,7 @@ * // Assign the frog variable a new Frog object. * fifi = new Frog(50, 50, 20); * - * describe('A frog face drawn on a gray background.'); + * describe('A frog face drawn on a blue background.'); * } * * function draw() { @@ -1467,7 +1467,7 @@ * frog1 = new Frog(25, 50, 10); * frog2 = new Frog(75, 50, 20); * - * describe('Two frog faces drawn next to each other on a gray background.'); + * describe('Two frog faces drawn next to each other on a blue background.'); * } * * function draw() { @@ -1510,7 +1510,7 @@ * // Slow the frame rate. * frameRate(1); * - * describe('Two frog faces on a gray background. The frogs hop around randomly.'); + * describe('Two frog faces on a blue background. The frogs hop around randomly.'); * } * * function draw() { @@ -1590,7 +1590,7 @@ * frameRate(1); * * describe( - * 'Five frog faces on a gray background. The frogs hop around randomly.' + * 'Five frog faces on a blue background. The frogs hop around randomly.' * ); * } *