Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions src/webgl/p5.Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -86,6 +89,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -192,6 +198,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -253,6 +262,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -298,6 +310,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -360,6 +375,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -405,6 +423,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right.
* cam.setPosition(100, -400, 800);
*
Expand Down Expand Up @@ -467,6 +488,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -512,6 +536,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right.
* cam.setPosition(100, -400, 800);
*
Expand Down Expand Up @@ -574,6 +601,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -619,6 +649,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right.
* cam.setPosition(100, -400, 800);
*
Expand Down Expand Up @@ -681,6 +714,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right: (100, -400, 800)
* // Point it at the origin: (0, 0, 0)
* // Set its "up" vector: (0, 1, 0).
Expand Down Expand Up @@ -725,6 +761,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right: (100, -400, 800)
* // Point it at the origin: (0, 0, 0)
* // Set its "up" vector: (0, 1, 0).
Expand Down Expand Up @@ -786,6 +825,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right: (100, -400, 800)
* // Point it at the origin: (0, 0, 0)
* // Set its "up" vector: (0, 1, 0).
Expand Down Expand Up @@ -830,6 +872,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right: (100, -400, 800)
* // Point it at the origin: (0, 0, 0)
* // Set its "up" vector: (0, 1, 0).
Expand Down Expand Up @@ -891,6 +936,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right: (100, -400, 800)
* // Point it at the origin: (0, 0, 0)
* // Set its "up" vector: (0, 1, 0).
Expand Down Expand Up @@ -935,6 +983,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-right: (100, -400, 800)
* // Point it at the origin: (0, 0, 0)
* // Set its "up" vector: (0, 1, 0).
Expand Down Expand Up @@ -1605,6 +1656,9 @@ class Camera {
* normalMaterial();
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
* }
*
* function draw() {
Expand Down Expand Up @@ -1684,6 +1738,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -1746,6 +1803,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -1809,6 +1869,9 @@ class Camera {
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down Expand Up @@ -3803,6 +3866,9 @@ function camera(p5, fn){
* // Create a p5.Camera object.
* cam = createCamera();
*
* // Set the camera
* setCamera(cam);
*
* // Place the camera at the top-center.
* cam.setPosition(0, -400, 800);
*
Expand Down