You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributor_docs/contributing_to_the_p5js_reference.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ If you like, you can find the source code for this `sin` function in the p5 repo
175
175
176
176
Now we'll look at each section in turn.
177
177
178
-
### <aid="@description"></a>Describing the function
178
+
### <aid="description"></a>Describing the function
179
179
180
180
Example:
181
181
@@ -336,15 +336,15 @@ Here's a cut-down example from the source of [`applyMatrix`](https://github.com/
336
336
* ...
337
337
```
338
338
339
-
### <a id="@method"></a>`@method` - specifying the function name
339
+
### <a id="method"></a>`@method` - specifying the function name
340
340
341
341
[`@method`](https://jsdoc.app/tags-function) is used to define the name of the function, in this case `sin`. Note that the function name does not include the brackets `()`.
342
342
343
343
You may sometimes see this missing from the reference. In that case JSDoc will try to infer it by looking at the name of the function from the following source code. It is recommended to include the function name using the @methodtag where possible.
344
344
345
345
This tag is also useful when detailing multiple signatures for a function (see later).
346
346
347
-
### <a id="@param"></a>`@param` - specifying details of each parameter
347
+
### <a id="param"></a>`@param` - specifying details of each parameter
348
348
349
349
[`@param`](https://jsdoc.app/tags-param) is used to define the parameters or arguments that the function accepts. It is used once per parameter.
350
350
@@ -460,7 +460,7 @@ Example:
460
460
* the current <a href="#/p5/angleMode">angleMode()</a>.
461
461
```
462
462
463
-
### <aid="@return"></a>`@return` - specifying the return value
463
+
### <aid="return"></a>`@return` - specifying the return value
464
464
465
465
[`@return`](https://jsdoc.app/tags-returns) is used to define the return value of the function.
466
466
@@ -868,7 +868,7 @@ For more on `describe()` visit the [web accessibility contributor documentation]
868
868
869
869
With all the above you should have most of the tools needed to write and edit p5.js reference comments. However, there are a few more specialized usages of JSDoc reference comments that you may come across in p5.js. These are situationally useful and not something that you need often.
870
870
871
-
### <aid="@private"></a>`@private` tag
871
+
### <aid="private"></a>`@private` tag
872
872
873
873
You can use the `@private` if a property or variable or class is private. If a feature is marked as `@private` it will not be included as part of the rendered reference on the website. This is done automatically for methods whose names start with `_`.
874
874
@@ -892,7 +892,7 @@ invert(canvas) {
892
892
893
893
### `@module` and related tags
894
894
895
-
#### <aid="@module"></a>`@module` and `@submodule`
895
+
#### <aid="module"></a>`@module` and `@submodule`
896
896
897
897
At the top of each source code file will be a comment block with a `@module` tag. A module is a top-level grouping of features in the reference pages on the website. This does _not_ necessarily correspond to any specific software `module` concept in the code itself.
898
898
@@ -929,7 +929,7 @@ For both:
929
929
*/
930
930
```
931
931
932
-
#### <aid="@for"></a>The `@for` tag
932
+
#### <aid="for"></a>The `@for` tag
933
933
934
934
The `@for` tag defines the relationship between this module and the overall `p5` class, effectively saying this module is a part of the `p5` class.
935
935
@@ -961,7 +961,7 @@ Example of `@for` and `@requires`
961
961
* @requiresconstants
962
962
*/
963
963
```
964
-
#### <aid="@beta"></a>The @beta tag - marking experimental API features
964
+
#### <aid="beta"></a>The @beta tag - marking experimental API features
965
965
966
966
This tag is used to mark that a feature is experimental and that its details may change or it may be removed. A warning will be presented explaining this on the reference page.
967
967
@@ -983,7 +983,7 @@ It should be placed on a separate line in the comment block and does not need an
983
983
*/
984
984
```
985
985
986
-
#### <aid="@deprecated"></a>The @deprecated tag
986
+
#### <aid="deprecated"></a>The @deprecated tag
987
987
988
988
Marks that a feature will be removed from a future version of p5.js, possibly also indicating a better option.
989
989
@@ -1274,25 +1274,25 @@ getRow (r) {
1274
1274
1275
1275
Click on any tag to go to its section in the text.
0 commit comments