-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main
53 lines (37 loc) · 641 Bytes
/
Main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//LeapBall
import de.voidplus.leapmotion.*;
import development.*;
//fields
short frame;
ball b;
int frameX;
int frameY;
int frameZ;
int points;
LeapMotion leap;
void setup(){
frameX = displayWidth/1;
frameY = displayHeight/1;
frameZ = 0;
leap = new LeapMotion(this);
points = 0;
size(frameX, frameY, P3D);
noCursor();
b = new ball();
}
void draw(){
translate(width/100, height/100,0);
background(0);
b.drawBall();
drawEnvironment();
b.applyGravity();
b.testCollisions();
update();
}
void drawEnvironment(){
pushMatrix();
fill(150);
translate(frameX/2,frameY,0);
box(1000,1,1000);
popMatrix();
}