Skip to content

Commit c450860

Browse files
committed
Improve clarity of p5.Camera methods (ortho, persepective, frustum,
camera) documentation. Emphasize distinction between global variants.
1 parent 202771d commit c450860

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/webgl/p5.Camera.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,10 @@ p5.Camera = function(renderer) {
663663
////////////////////////////////////////////////////////////////////////////////
664664

665665
/**
666-
* Sets a perspective projection for a p5.Camera object and sets parameters
667-
* for that projection according to <a href="#/p5/perspective">perspective()</a>
668-
* syntax.
666+
* Sets a perspective projection.
667+
* Accepts the same parameters as the global
668+
* <a href="#/p5/perspective">perspective()</a>.
669+
* More information on this function can be found there.
669670
* @method perspective
670671
* @for p5.Camera
671672
*/
@@ -743,8 +744,10 @@ p5.Camera.prototype.perspective = function(fovy, aspect, near, far) {
743744
};
744745

745746
/**
746-
* Sets an orthographic projection for a p5.Camera object and sets parameters
747-
* for that projection according to <a href="#/p5/ortho">ortho()</a> syntax.
747+
* Sets an orthographic projection.
748+
* Accepts the same parameters as the global
749+
* <a href="#/p5/ortho">ortho()</a>.
750+
* More information on this function can be found there.
748751
* @method ortho
749752
* @for p5.Camera
750753
*/
@@ -802,8 +805,10 @@ p5.Camera.prototype.ortho = function(left, right, bottom, top, near, far) {
802805
};
803806

804807
/**
805-
* Sets the frustum for a p5.Camera object and sets parameters
806-
* for that frustum according to <a href="#/p5/frustum">frustum()</a> syntax.
808+
* Sets the camera's frustum.
809+
* Accepts the same parameters as the global
810+
* <a href="#/p5/frustum">frustum()</a>.
811+
* More information on this function can be found there.
807812
* @method frustum
808813
* @for p5.Camera
809814
*/
@@ -1092,8 +1097,10 @@ p5.Camera.prototype.lookAt = function(x, y, z) {
10921097
////////////////////////////////////////////////////////////////////////////////
10931098

10941099
/**
1095-
* Sets a camera's position and orientation. This is equivalent to calling
1096-
* <a href="#/p5/camera">camera()</a> on a p5.Camera object.
1100+
* Sets the camera's position and orientation.
1101+
* Accepts the same parameters as the global
1102+
* <a href="#/p5/camera">camera()</a>.
1103+
* More information on this function can be found there.
10971104
* @method camera
10981105
* @for p5.Camera
10991106
*/

0 commit comments

Comments
 (0)