Skip to content

Commit b9f5c35

Browse files
committed
Remove extra * in JSDoc
1 parent 14571ce commit b9f5c35

3 files changed

Lines changed: 54 additions & 47 deletions

File tree

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
/**
2-
** @name Alpha Mask
3-
** @description Using the <a href="https://p5js.org/reference/#/p5/mask" target="_blank">mask()</a> method,
4-
** you can create a mask for an image to specify the transparency in
5-
** different parts of the image. To run this example locally, you will need two
6-
** image files, and a running <a href="https://github.com/processing/p5.js/wiki/Local-server">
7-
** local server</a>.
8-
**/
2+
* @name Alpha Mask
3+
* @description Using the <a href="https://p5js.org/reference/#/p5/mask" target="_blank">mask()</a> method,
4+
* you can create a mask for an image to specify the transparency in
5+
* different parts of the image. To run this example locally, you will need two
6+
* image files, and a running <a href="https://github.com/processing/p5.js/wiki/Local-server">
7+
* local server</a>.
8+
*/
99
// Preload the image assets from the canvas
1010
// assets directory.
1111
function preload() {
1212
// Photo by Sergey Shmidt, https://unsplash.com/photos/koy6FlCCy5s
13-
img = loadImage("assets/image.jpg");
13+
img = loadImage('assets/image.jpg');
1414

1515
// Photo by Mockup Graphics, https://unsplash.com/photos/_mUVHhvBYZ0
16-
imgMask = loadImage("assets/mask.png");
16+
imgMask = loadImage('assets/mask.png');
1717
}
1818

1919
function setup() {
20-
describe('Two photos, the one on the left labeled with "Masked Image," and the one on the right labeled with "Mask."');
20+
describe(
21+
'Two photos, the one on the left labeled with "Masked Image," and the one on the right labeled with "Mask."'
22+
);
2123
createCanvas(710, 400);
2224

23-
// Use the mask() method to apply imgMask photo as a
25+
// Use the mask() method to apply imgMask photo as a
2426
// mask for img.
2527
img.mask(imgMask);
2628

@@ -33,15 +35,21 @@ function draw() {
3335

3436
// Draw the masked image on the left, then
3537
// the photo used to mask on the right.
36-
describeElement('Masked Image', 'A photo of yellow flowers masked by a photo of two leaves.');
38+
describeElement(
39+
'Masked Image',
40+
'A photo of yellow flowers masked by a photo of two leaves.'
41+
);
3742
image(img, 0, 0, 350, 350);
3843

39-
describeElement('Mask', 'The photo of two leaves used to mask the previous photo.');
44+
describeElement(
45+
'Mask',
46+
'The photo of two leaves used to mask the previous photo.'
47+
);
4048
image(imgMask, 350, 0, 350, 350);
4149

4250
//Add labels to explain the images shown.
4351
textSize(24);
4452
fill(0);
45-
text("Masked Image", 10, 10);
46-
text("Mask", 360, 10);
47-
}
53+
text('Masked Image', 10, 10);
54+
text('Mask', 360, 10);
55+
}
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,68 @@
1-
/**
2-
** @name DOM Form Elements
3-
** @description The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model" target="_blank">Document Object Model</a>,
4-
** or DOM, represents the resulting structure of the web page. Using p5.js' form elements,
5-
** such as <a href="https://p5js.org/reference/#/p5/createInput" target="_blank">createInput()</a>,
6-
** <a href="https://p5js.org/reference/#/p5/createSelect" target="_blank">createSelect()</a>,
7-
** and <a href="https://p5js.org/reference/#/p5/createRadio" target="_blank">createRadio()</a>, you can build different ways to take information submitted through
8-
** a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select" target="_blank">select</a>,
9-
** <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input" target="_blank">input</a>,
10-
** or <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio" target="_blank">radio button</a>, and update the DOM based on the information.
11-
**/
1+
/**
2+
* @name DOM Form Elements
3+
* @description The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model" target="_blank">Document Object Model</a>,
4+
* or DOM, represents the resulting structure of the web page. Using p5.js' form elements,
5+
* such as <a href="https://p5js.org/reference/#/p5/createInput" target="_blank">createInput()</a>,
6+
* <a href="https://p5js.org/reference/#/p5/createSelect" target="_blank">createSelect()</a>,
7+
* and <a href="https://p5js.org/reference/#/p5/createRadio" target="_blank">createRadio()</a>, you can build different ways to take information submitted through
8+
* a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select" target="_blank">select</a>,
9+
* <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input" target="_blank">input</a>,
10+
* or <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio" target="_blank">radio button</a>, and update the DOM based on the information.
11+
**/
1212
// Define the inputs for this form as global variables.
1313
let nameInput;
1414
let fontSelect;
1515
let foodRadio;
1616

1717
function setup() {
1818
createCanvas(720, 400);
19-
19+
2020
// Assign an input box to nameInput.
2121
nameInput = createInput();
2222
nameInput.position(25, 115);
23-
23+
2424
// Assign radio buttons to foodRadio.
2525
foodRadio = createRadio();
2626
foodRadio.position(25, 215);
27-
27+
2828
// List the radio options for foodRadio, along
2929
// with the background color associated with each selection.
3030
foodRadio.option('#F7F5BC', 'Cranberries');
3131
foodRadio.option('#B8E3FF', 'Almonds');
3232
foodRadio.option('#C79A9A', 'Gouda');
33-
33+
3434
// Assign a select dropdown to fontSelect.
3535
fontSelect = createSelect();
3636
fontSelect.position(25, 300);
37-
37+
3838
// List out the dropdown options for fontSelect.
3939
fontSelect.option('Sans-serif');
4040
fontSelect.option('Serif');
4141
fontSelect.option('Cursive');
42-
43-
// If the fontSelect selection is changed, call the
42+
43+
// If the fontSelect selection is changed, call the
4444
// fontChanged function.
4545
fontSelect.changed(fontChanged);
4646
}
4747

4848
function draw() {
4949
describe(
5050
'A form with "Welcome to p5.js!" for a header, a text input with the label "What is your name?", and a set of radio buttons with the label "What is your favorite food?", with the options of "Cranberries," "Almonds," or "Gouda." The text submitted through the input appears next to its label. The radio button selection changes the canvas background color. The select element changes the form font.'
51-
);
51+
);
5252

5353
// Set the background color to the current foodRadio value.
5454
let backgroundColor = foodRadio.value();
5555
background(backgroundColor);
56-
56+
5757
// Create the header for the form.
5858
textSize(25);
5959
text('Welcome to p5.js!', 25, 50);
60-
61-
// Create the text inputs that will update with the
60+
61+
// Create the text inputs that will update with the
6262
// new user inputs.
6363
textSize(20);
6464
text(`What is your name? ${nameInput.value()}`, 25, 100);
6565
text('What is your favorite food?', 25, 200);
66-
6766
}
6867

6968
function fontChanged() {
@@ -72,4 +71,4 @@ function fontChanged() {
7271
// new value.
7372
let fontSelection = fontSelect.value();
7473
textFont(fontSelection);
75-
}
74+
}

examples/12_Advanced_Canvas_Rendering/00_Create_Graphics.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
2-
** @name Create Graphics
3-
** @description The <a href="https://p5js.org/reference/#/p5/createGraphics" target="_blank">createGraphics()</a> function can be
4-
** used to create a new p5.Graphics object, which can serve as an off-screen graphics buffer within the canvas.
5-
** Off-screen buffers can have different dimensions and properties than its current display surface, even though they appear to be
6-
** existing in the same space.
7-
**/
2+
* @name Create Graphics
3+
* @description The <a href="https://p5js.org/reference/#/p5/createGraphics" target="_blank">createGraphics()</a> function can be
4+
* used to create a new p5.Graphics object, which can serve as an off-screen graphics buffer within the canvas.
5+
* Off-screen buffers can have different dimensions and properties than its current display surface, even though they appear to be
6+
* existing in the same space.
7+
*/
88
// Define graphic as a global variable. This variable
99
// will be the offscreen buffer.
1010
let graphic;
@@ -44,4 +44,4 @@ function draw() {
4444

4545
// Draw the buffer to the screen with image().
4646
image(graphic, 150, 75);
47-
}
47+
}

0 commit comments

Comments
 (0)