configure UI and more leapmotion examples
This commit is contained in:
parent
9b0c8ffc86
commit
ebe188592e
4 changed files with 392 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ int rgb2int(int r, int g, int b) {
|
|||
}
|
||||
|
||||
void setup() {
|
||||
size(640, 360);
|
||||
size(400, 200);
|
||||
noStroke();
|
||||
rectMode(CENTER);
|
||||
}
|
||||
|
|
@ -29,6 +29,7 @@ void draw() {
|
|||
points.add(new PVector(mouseX-rect1Width/2, height/2-rect1Height/2));
|
||||
points.add(new PVector(mouseX+rect1Width/2, height/2-rect1Height/2));
|
||||
points.add(new PVector(mouseX+rect1Width/2, height/2+rect1Height/2));
|
||||
points.add(new PVector(mouseX-rect1Width/2, height/2+rect1Height/2));
|
||||
points.add(new PVector(mouseX-rect1Width/2, height/2-rect1Height/2));
|
||||
// Draw second rectangle using lines
|
||||
int inverseX = width-mouseX;
|
||||
|
|
@ -43,6 +44,7 @@ void draw() {
|
|||
points.add(new PVector(inverseX+rect2Width/2, height/2-rect2Height/2));
|
||||
points.add(new PVector(inverseX+rect2Width/2, height/2+rect2Height/2));
|
||||
points.add(new PVector(inverseX-rect2Width/2, height/2+rect2Height/2));
|
||||
points.add(new PVector(inverseX-rect2Width/2, height/2-rect2Height/2));
|
||||
if (points.size() > 0) {
|
||||
println("point size : "+points.size());
|
||||
println("pointlist");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue