Skip to content

Commit fa38cdb

Browse files
committed
docs(src/color): Move describe() into functions where possible
Should fix the failing tests 🤞
1 parent 05ba126 commit fa38cdb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/color/p5.Color.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ p5.Color.prototype.toString = function(format) {
268268
* function draw() {
269269
* backgroundColor.setRed(128 + 128 * sin(millis() / 1000));
270270
* background(backgroundColor);
271+
* describe('canvas with gradually changing background color');
271272
* }
272-
* describe('canvas with gradually changing background color');
273273
* </code>
274274
* </div>
275275
*/
@@ -290,8 +290,8 @@ p5.Color.prototype.setRed = function(new_red) {
290290
* function draw() {
291291
* backgroundColor.setGreen(128 + 128 * sin(millis() / 1000));
292292
* background(backgroundColor);
293+
* describe('canvas with gradually changing background color');
293294
* }
294-
* describe('canvas with gradually changing background color');
295295
* </code>
296296
* </div>
297297
*
@@ -313,8 +313,8 @@ p5.Color.prototype.setGreen = function(new_green) {
313313
* function draw() {
314314
* backgroundColor.setBlue(128 + 128 * sin(millis() / 1000));
315315
* background(backgroundColor);
316+
* describe('canvas with gradually changing background color');
316317
* }
317-
* describe('canvas with gradually changing background color');
318318
* </code>
319319
* </div>
320320
*
@@ -339,8 +339,8 @@ p5.Color.prototype.setBlue = function(new_blue) {
339339
* squareColor.setAlpha(128 + 128 * sin(millis() / 1000));
340340
* fill(squareColor);
341341
* rect(13, 13, width - 26, height - 26);
342+
* describe('a square with gradually changing opacity on a gray background');
342343
* }
343-
* describe('a square with gradually changing opacity on a gray background');
344344
* </code>
345345
* </div>
346346
**/

src/color/setting.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ p5.prototype.fill = function(...args) {
532532
* rotateX(frameCount * 0.01);
533533
* rotateY(frameCount * 0.01);
534534
* box(45, 45, 45);
535+
* describe('black canvas with purple cube wireframe spinning');
535536
* }
536-
* describe('black canvas with purple cube wireframe spinning');
537537
* </code>
538538
* </div>
539539
*/
@@ -570,8 +570,8 @@ p5.prototype.noFill = function() {
570570
* rotateX(frameCount * 0.01);
571571
* rotateY(frameCount * 0.01);
572572
* box(45, 45, 45);
573+
* describe('black canvas with pink cube spinning');
573574
* }
574-
* describe('black canvas with pink cube spinning');
575575
* </code>
576576
* </div>
577577
*/
@@ -819,9 +819,9 @@ p5.prototype.stroke = function(...args) {
819819
* translate(0, 0, 40);
820820
* torus(15, 5);
821821
* noErase();
822+
* describe(`60×60 centered teal sphere, yellow background.
823+
* Torus rotating around sphere erases to reveal black text underneath.`);
822824
* }
823-
* describe(`60×60 centered teal sphere, yellow background.
824-
* Torus rotating around sphere erases to reveal black text underneath.`);
825825
* </code>
826826
* </div>
827827
*/

0 commit comments

Comments
 (0)