Skip to content

Commit

Permalink
add documentation for eyeX, eyeY, eyeZ properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloneduckling committed Mar 4, 2021
1 parent bbe0a71 commit 8082db1
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions src/webgl/p5.Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,84 @@ p5.Camera = function(renderer) {
this.cameraMatrix = new p5.Matrix();
this.projMatrix = new p5.Matrix();
};
/**
* camera position value on x axis
* @property {Number} eyeX
* @readonly
* @example
* <div><code>
* let cam;
* function setup() {
* createCanvas(100, 100, WEBGL);
* background(0);
* cam = createCamera();
* cam.eyeX = 100;
* setCamera(cam);
* }
*
* function draw() {
* cam.lookAt(0, 0, 0);
* box(50);
* }
* </code></div>
*
* @alt
* An example showing the use of camera object properties
*
*/

/**
* camera position value on y axis
* @property {Number} eyeY
* @readonly
* @example
* <div><code>
* let cam;
* function setup() {
* createCanvas(100, 100, WEBGL);
* background(0);
* cam = createCamera();
* cam.eyeY = 100;
* setCamera(cam);
* }
*
* function draw() {
* cam.lookAt(0, 0, 0);
* box(50);
* }
* </code></div>
*
* @alt
* An example showing the use of camera object properties
*
*/
/**
* camera position value on z axis
* @property {Number} eyeZ
* @readonly
* @example
* <div><code>
* let cam;
* function setup() {
* createCanvas(100, 100, WEBGL);
* background(0);
* cam = createCamera();
* cam.eyeX = 100;
* cam.eyeY = 100;
* cam.eyeZ = 100;
* setCamera(cam);
* }
*
* function draw() {
* cam.lookAt(0, 0, 0);
* box(50);
* }
* </code></div>
*
* @alt
* An example showing the use of camera object properties
*
*/

////////////////////////////////////////////////////////////////////////////////
// Camera Projection Methods
Expand Down

0 comments on commit 8082db1

Please sign in to comment.