Skip to content

Commit f66d2c5

Browse files
authored
Updated some JsDoc definitions (#5578)
* removed unused parameters * fixed parameter naming error * Added previous chainable jsDoc * reinstated removed params * removed wrongly pasted chars * linting formatting * Added 4x4 matrix method definition * linting errors * linting errors * Trying to resolve lint errors * Update transform.js * added 4x4 matrix image * Added 4-4 image to docs * Updated applymatrix images * Update transform.js * Reverted param names * changed images to match param names * Update transform.js
1 parent 0112c3a commit f66d2c5

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed
6.7 KB
Loading

lib/addons/p5.sound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function getAudioContext() {
218218
* example below. This method utilizes
219219
* <a href="https://github.com/tambien/StartAudioContext">StartAudioContext
220220
* </a>, a library by Yotam Mann (MIT Licence, 2016).</p>
221-
* @param {Element|Array} [element(s)] This argument can be an Element,
221+
* @param {Element|Array} [elements] This argument can be an Element,
222222
* Selector String, NodeList, p5.Element,
223223
* jQuery Element, or an Array of any of those.
224224
* @param {Function} [callback] Callback to invoke when the AudioContext

src/core/shape/vertex.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ p5.prototype.quadraticVertex = function(...args) {
958958
* @method vertex
959959
* @param {Number} x
960960
* @param {Number} y
961-
* @param {Number} z z-coordinate of the vertex.
961+
* @param {Number} [z] z-coordinate of the vertex.
962962
* Defaults to 0 if not specified.
963963
* @chainable
964964
*/
@@ -967,8 +967,8 @@ p5.prototype.quadraticVertex = function(...args) {
967967
* @param {Number} x
968968
* @param {Number} y
969969
* @param {Number} [z]
970-
* @param {Number} u the vertex's texture u-coordinate
971-
* @param {Number} v the vertex's texture v-coordinate
970+
* @param {Number} [u] the vertex's texture u-coordinate
971+
* @param {Number} [v] the vertex's texture v-coordinate
972972
* @chainable
973973
*/
974974
p5.prototype.vertex = function(x, y, moveTo, u, v) {

src/core/transform.js

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,41 @@ import p5 from './main';
2424
* > <img style="max-width: 150px" src="assets/transformation-matrix.png"
2525
* alt="The transformation matrix used when applyMatrix is called"/>
2626
*
27+
* <img style="max-width: 300px" src="assets/transformation-matrix-4-4.png"
28+
* alt="The transformation matrix used when applyMatrix is called with 4x4 matrix"/>
29+
*
30+
* @method applyMatrix
31+
* @param {Array} arr an array of numbers - should be 6 or 16 length (2*3 or 4*4 matrix values)
32+
* @chainable
33+
*/
34+
/**
35+
* @method applyMatrix
36+
* @param {Number} a numbers which define the 2×3 or 4x4 matrix to be multiplied
37+
* @param {Number} b numbers which define the 2×3 or 4x4 matrix to be multiplied
38+
* @param {Number} c numbers which define the 2×3 or 4x4 matrix to be multiplied
39+
* @param {Number} d numbers which define the 2×3 or 4x4 matrix to be multiplied
40+
* @param {Number} e numbers which define the 2×3 or 4x4 matrix to be multiplied
41+
* @param {Number} f numbers which define the 2×3 or 4x4 matrix to be multiplied
42+
* @chainable
43+
*/
44+
/**
2745
* @method applyMatrix
28-
* @param {Number|Array} a numbers which define the 2×3 matrix to be multiplied, or an array of numbers
29-
* @param {Number} b numbers which define the 2×3 matrix to be multiplied
30-
* @param {Number} c numbers which define the 2×3 matrix to be multiplied
31-
* @param {Number} d numbers which define the 2×3 matrix to be multiplied
32-
* @param {Number} e numbers which define the 2×3 matrix to be multiplied
33-
* @param {Number} f numbers which define the 2×3 matrix to be multiplied
46+
* @param {Number} a
47+
* @param {Number} b
48+
* @param {Number} c
49+
* @param {Number} d
50+
* @param {Number} e
51+
* @param {Number} f
52+
* @param {Number} g numbers which define the 4x4 matrix to be multiplied
53+
* @param {Number} h numbers which define the 4x4 matrix to be multiplied
54+
* @param {Number} i numbers which define the 4x4 matrix to be multiplied
55+
* @param {Number} j numbers which define the 4x4 matrix to be multiplied
56+
* @param {Number} k numbers which define the 4x4 matrix to be multiplied
57+
* @param {Number} l numbers which define the 4x4 matrix to be multiplied
58+
* @param {Number} m numbers which define the 4x4 matrix to be multiplied
59+
* @param {Number} n numbers which define the 4x4 matrix to be multiplied
60+
* @param {Number} o numbers which define the 4x4 matrix to be multiplied
61+
* @param {Number} p numbers which define the 4x4 matrix to be multiplied
3462
* @chainable
3563
* @example
3664
* <div>

0 commit comments

Comments
 (0)