Skip to content

Commit 490fbb5

Browse files
committed
updated VR examples
1 parent 1f6d205 commit 490fbb5

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

libraries/vr/examples/Cube/Cube.pde

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
import processing.vr.*;
22

33
void setup() {
4-
fullScreen(PVR.STEREO);
4+
fullScreen(STEREO);
55
}
66

77
void draw() {
8-
// PGraphicsVR pvr = (PGraphicsVR)g;
9-
// if (pvr.eyeType == PVR.LEFT) {
10-
// background(200, 50, 50);
11-
// } else if (pvr.eyeType == PVR.RIGHT) {
12-
// background(50, 50, 200);
13-
// } else if (pvr.eyeType == PVR.MONOCULAR) {
14-
// background(50, 200, 50);
15-
// }
16-
178
background(157);
189
lights();
19-
// translate(width/2, height/2);
10+
translate(width/2, height/2);
2011
rotateX(frameCount * 0.01f);
2112
rotateY(frameCount * 0.01f);
2213
box(500);

libraries/vr/examples/Mono/Mono.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import processing.vr.*;
22

33
void setup() {
4-
fullScreen(PVR.MONO);
4+
fullScreen(MONO);
55
}
66

77
void draw() {
88
background(157);
99
lights();
10-
//translate(width/2, height/2);
10+
translate(width/2, height/2);
1111
rotateX(frameCount * 0.01f);
1212
rotateY(frameCount * 0.01f);
1313
box(500);

libraries/vr/examples/drawAim/drawAim.pde

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import processing.vr.*;
22

33
void setup() {
4-
fullScreen(PVR.STEREO);
4+
fullScreen(STEREO);
55
}
66

77
void calculate() {
@@ -56,9 +56,8 @@ void draw() {
5656
box(100);
5757
popMatrix();
5858

59-
// Use eye coordinates at 100 units from the camera position:
60-
PGraphicsVR gvr = (PGraphicsVR)g;
61-
gvr.eye();
59+
// Use eye coordinates at 100 units from the camera position:;
60+
eye();
6261
stroke(255, 200);
6362
strokeWeight(50);
6463
point(0, 0, 100);

0 commit comments

Comments
 (0)