Skip to content

Commit

Permalink
Updated some JsDoc definitions (#5578)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Gaweph authored Feb 12, 2022
1 parent 0112c3a commit f66d2c5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/addons/p5.sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function getAudioContext() {
* example below. This method utilizes
* <a href="https://github.com/tambien/StartAudioContext">StartAudioContext
* </a>, a library by Yotam Mann (MIT Licence, 2016).</p>
* @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
Expand Down
6 changes: 3 additions & 3 deletions src/core/shape/vertex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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) {
Expand Down
40 changes: 34 additions & 6 deletions src/core/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,41 @@ import p5 from './main';
* > <img style="max-width: 150px" src="assets/transformation-matrix.png"
* alt="The transformation matrix used when applyMatrix is called"/>
*
* <img style="max-width: 300px" src="assets/transformation-matrix-4-4.png"
* alt="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
* <div>
Expand Down

0 comments on commit f66d2c5

Please sign in to comment.