Skip to content

Commit dac7ff2

Browse files
authored
fixing all p5.Camera text orientation
1 parent c3851b3 commit dac7ff2

File tree

1 file changed

+18
-24
lines changed

1 file changed

+18
-24
lines changed

src/webgl/p5.Camera.js

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Camera {
7171
* fill(0);
7272
*
7373
* // Display the value of eyeX, rounded to the nearest integer.
74-
* text(`eyeX: ${round(cam.eyeX)}`, 0, 55);
74+
* text(`eyeX: ${round(cam.eyeX)}`, 0, 45);
7575
* }
7676
* </code>
7777
* </div>
@@ -89,9 +89,6 @@ class Camera {
8989
* // Create a p5.Camera object.
9090
* cam = createCamera();
9191
*
92-
* // Set the camera
93-
* setCamera(cam);
94-
*
9592
* // Place the camera at the top-center.
9693
* cam.setPosition(0, -400, 800);
9794
*
@@ -125,7 +122,7 @@ class Camera {
125122
* cam.setPosition(x, -400, 800);
126123
*
127124
* // Display the value of eyeX, rounded to the nearest integer.
128-
* text(`eyeX: ${round(cam.eyeX)}`, 0, 55);
125+
* text(`eyeX: ${round(cam.eyeX)}`, 0, 45);
129126
* }
130127
* </code>
131128
* </div>
@@ -183,7 +180,7 @@ class Camera {
183180
* fill(0);
184181
*
185182
* // Display the value of eyeY, rounded to the nearest integer.
186-
* text(`eyeY: ${round(cam.eyeY)}`, 0, 55);
183+
* text(`eyeY: ${round(cam.eyeY)}`, 0, 45);
187184
* }
188185
* </code>
189186
* </div>
@@ -237,7 +234,7 @@ class Camera {
237234
* cam.setPosition(0, y, 800);
238235
*
239236
* // Display the value of eyeY, rounded to the nearest integer.
240-
* text(`eyeY: ${round(cam.eyeY)}`, 0, 55);
237+
* text(`eyeY: ${round(cam.eyeY)}`, 0, 45);
241238
* }
242239
* </code>
243240
* </div>
@@ -295,7 +292,7 @@ class Camera {
295292
* fill(0);
296293
*
297294
* // Display the value of eyeZ, rounded to the nearest integer.
298-
* text(`eyeZ: ${round(cam.eyeZ)}`, 0, 55);
295+
* text(`eyeZ: ${round(cam.eyeZ)}`, 0, 45);
299296
* }
300297
* </code>
301298
* </div>
@@ -349,7 +346,7 @@ class Camera {
349346
* cam.setPosition(0, -400, z);
350347
*
351348
* // Display the value of eyeZ, rounded to the nearest integer.
352-
* text(`eyeZ: ${round(cam.eyeZ)}`, 0, 55);
349+
* text(`eyeZ: ${round(cam.eyeZ)}`, 0, 45);
353350
* }
354351
* </code>
355352
* </div>
@@ -408,7 +405,7 @@ class Camera {
408405
* fill(0);
409406
*
410407
* // Display the value of centerX, rounded to the nearest integer.
411-
* text(`centerX: ${round(cam.centerX)}`, 0, 55);
408+
* text(`centerX: ${round(cam.centerX)}`, 0, 45);
412409
* }
413410
* </code>
414411
* </div>
@@ -462,7 +459,7 @@ class Camera {
462459
* cam.lookAt(x, 20, -30);
463460
*
464461
* // Display the value of centerX, rounded to the nearest integer.
465-
* text(`centerX: ${round(cam.centerX)}`, 0, 55);
462+
* text(`centerX: ${round(cam.centerX)}`, 0, 45);
466463
* }
467464
* </code>
468465
* </div>
@@ -521,7 +518,7 @@ class Camera {
521518
* fill(0);
522519
*
523520
* // Display the value of centerY, rounded to the nearest integer.
524-
* text(`centerY: ${round(cam.centerY)}`, 0, 55);
521+
* text(`centerY: ${round(cam.centerY)}`, 0, 45);
525522
* }
526523
* </code>
527524
* </div>
@@ -575,7 +572,7 @@ class Camera {
575572
* cam.lookAt(10, y, -30);
576573
*
577574
* // Display the value of centerY, rounded to the nearest integer.
578-
* text(`centerY: ${round(cam.centerY)}`, 0, 55);
575+
* text(`centerY: ${round(cam.centerY)}`, 0, 45);
579576
* }
580577
* </code>
581578
* </div>
@@ -634,7 +631,7 @@ class Camera {
634631
* fill(0);
635632
*
636633
* // Display the value of centerZ, rounded to the nearest integer.
637-
* text(`centerZ: ${round(cam.centerZ)}`, 0, 55);
634+
* text(`centerZ: ${round(cam.centerZ)}`, 0, 45);
638635
* }
639636
* </code>
640637
* </div>
@@ -652,9 +649,6 @@ class Camera {
652649
* // Create a p5.Camera object.
653650
* cam = createCamera();
654651
*
655-
* // Set the camera
656-
* setCamera(cam);
657-
*
658652
* // Place the camera at the top-right.
659653
* cam.setPosition(100, -400, 800);
660654
*
@@ -688,7 +682,7 @@ class Camera {
688682
* cam.lookAt(10, 20, z);
689683
*
690684
* // Display the value of centerZ, rounded to the nearest integer.
691-
* text(`centerZ: ${round(cam.centerZ)}`, 0, 55);
685+
* text(`centerZ: ${round(cam.centerZ)}`, 0, 45);
692686
* }
693687
* </code>
694688
* </div>
@@ -746,7 +740,7 @@ class Camera {
746740
* fill(0);
747741
*
748742
* // Display the value of upX, rounded to the nearest tenth.
749-
* text(`upX: ${round(cam.upX, 1)}`, 0, 55);
743+
* text(`upX: ${round(cam.upX, 1)}`, 0, 45);
750744
* }
751745
* </code>
752746
* </div>
@@ -799,7 +793,7 @@ class Camera {
799793
* cam.camera(100, -400, 800, 0, 0, 0, x, 1, 0);
800794
*
801795
* // Display the value of upX, rounded to the nearest tenth.
802-
* text(`upX: ${round(cam.upX, 1)}`, 0, 55);
796+
* text(`upX: ${round(cam.upX, 1)}`, 0, 45);
803797
* }
804798
* </code>
805799
* </div>
@@ -857,7 +851,7 @@ class Camera {
857851
* fill(0);
858852
*
859853
* // Display the value of upY, rounded to the nearest tenth.
860-
* text(`upY: ${round(cam.upY, 1)}`, 0, 55);
854+
* text(`upY: ${round(cam.upY, 1)}`, 0, 45);
861855
* }
862856
* </code>
863857
* </div>
@@ -910,7 +904,7 @@ class Camera {
910904
* cam.camera(100, -400, 800, 0, 0, 0, 0, y, 0);
911905
*
912906
* // Display the value of upY, rounded to the nearest tenth.
913-
* text(`upY: ${round(cam.upY, 1)}`, 0, 55);
907+
* text(`upY: ${round(cam.upY, 1)}`, 0, 45);
914908
* }
915909
* </code>
916910
* </div>
@@ -968,7 +962,7 @@ class Camera {
968962
* fill(0);
969963
*
970964
* // Display the value of upZ, rounded to the nearest tenth.
971-
* text(`upZ: ${round(cam.upZ, 1)}`, 0, 55);
965+
* text(`upZ: ${round(cam.upZ, 1)}`, 0, 45);
972966
* }
973967
* </code>
974968
* </div>
@@ -1021,7 +1015,7 @@ class Camera {
10211015
* cam.camera(100, -400, 800, 0, 0, 0, 0, 1, z);
10221016
*
10231017
* // Display the value of upZ, rounded to the nearest tenth.
1024-
* text(`upZ: ${round(cam.upZ, 1)}`, 0, 55);
1018+
* text(`upZ: ${round(cam.upZ, 1)}`, 0, 45);
10251019
* }
10261020
* </code>
10271021
* </div>

0 commit comments

Comments
 (0)