diff --git a/docs/yuidoc-p5-theme/assets/transformation-matrix-4-4.png b/docs/yuidoc-p5-theme/assets/transformation-matrix-4-4.png new file mode 100644 index 0000000000..f4203b3312 Binary files /dev/null and b/docs/yuidoc-p5-theme/assets/transformation-matrix-4-4.png differ diff --git a/lib/addons/p5.sound.js b/lib/addons/p5.sound.js index ca19c190a9..a8a7e3f450 100644 --- a/lib/addons/p5.sound.js +++ b/lib/addons/p5.sound.js @@ -218,7 +218,7 @@ function getAudioContext() { * example below. This method utilizes * StartAudioContext * , a library by Yotam Mann (MIT Licence, 2016).

- * @param {Element|Array} [element(s)] This argument can be an Element, + * @param {Element|Array} [elements] This argument can be an Element, * Selector String, NodeList, p5.Element, * jQuery Element, or an Array of any of those. * @param {Function} [callback] Callback to invoke when the AudioContext diff --git a/src/core/shape/vertex.js b/src/core/shape/vertex.js index 775889f3dc..a02c80b6ad 100644 --- a/src/core/shape/vertex.js +++ b/src/core/shape/vertex.js @@ -958,7 +958,7 @@ p5.prototype.quadraticVertex = function(...args) { * @method vertex * @param {Number} x * @param {Number} y - * @param {Number} z z-coordinate of the vertex. + * @param {Number} [z] z-coordinate of the vertex. * Defaults to 0 if not specified. * @chainable */ @@ -967,8 +967,8 @@ p5.prototype.quadraticVertex = function(...args) { * @param {Number} x * @param {Number} y * @param {Number} [z] - * @param {Number} u the vertex's texture u-coordinate - * @param {Number} v the vertex's texture v-coordinate + * @param {Number} [u] the vertex's texture u-coordinate + * @param {Number} [v] the vertex's texture v-coordinate * @chainable */ p5.prototype.vertex = function(x, y, moveTo, u, v) { diff --git a/src/core/transform.js b/src/core/transform.js index 1fe637e5d9..180acdaaf2 100644 --- a/src/core/transform.js +++ b/src/core/transform.js @@ -24,13 +24,41 @@ import p5 from './main'; * > The transformation matrix used when applyMatrix is called * + * The transformation matrix used when applyMatrix is called with 4x4 matrix + * + * @method applyMatrix + * @param {Array} arr an array of numbers - should be 6 or 16 length (2*3 or 4*4 matrix values) + * @chainable + */ +/** + * @method applyMatrix + * @param {Number} a numbers which define the 2×3 or 4x4 matrix to be multiplied + * @param {Number} b numbers which define the 2×3 or 4x4 matrix to be multiplied + * @param {Number} c numbers which define the 2×3 or 4x4 matrix to be multiplied + * @param {Number} d numbers which define the 2×3 or 4x4 matrix to be multiplied + * @param {Number} e numbers which define the 2×3 or 4x4 matrix to be multiplied + * @param {Number} f numbers which define the 2×3 or 4x4 matrix to be multiplied + * @chainable + */ +/** * @method applyMatrix - * @param {Number|Array} a numbers which define the 2×3 matrix to be multiplied, or an array of numbers - * @param {Number} b numbers which define the 2×3 matrix to be multiplied - * @param {Number} c numbers which define the 2×3 matrix to be multiplied - * @param {Number} d numbers which define the 2×3 matrix to be multiplied - * @param {Number} e numbers which define the 2×3 matrix to be multiplied - * @param {Number} f numbers which define the 2×3 matrix to be multiplied + * @param {Number} a + * @param {Number} b + * @param {Number} c + * @param {Number} d + * @param {Number} e + * @param {Number} f + * @param {Number} g numbers which define the 4x4 matrix to be multiplied + * @param {Number} h numbers which define the 4x4 matrix to be multiplied + * @param {Number} i numbers which define the 4x4 matrix to be multiplied + * @param {Number} j numbers which define the 4x4 matrix to be multiplied + * @param {Number} k numbers which define the 4x4 matrix to be multiplied + * @param {Number} l numbers which define the 4x4 matrix to be multiplied + * @param {Number} m numbers which define the 4x4 matrix to be multiplied + * @param {Number} n numbers which define the 4x4 matrix to be multiplied + * @param {Number} o numbers which define the 4x4 matrix to be multiplied + * @param {Number} p numbers which define the 4x4 matrix to be multiplied * @chainable * @example *