import de.voidplus.leapmotion.*;
LeapMotion leap;
PImage img0;
void setup(){
size(600,600,P3D);
leap=new LeapMotion(this);
img0=loadImage("234484-13031Q3353876_burned (1).png");
imageMode(CENTER);
}
void draw(){
background(255);
for(Hand hand:leap.getHands()){
int n=hand.getOutstrechtedFingers().size();
println(n);
PVector hand_position = hand.getPosition();
if(n==5||n==4) image(img0,hand_position.x,hand_position.y-100,200,200);
hand.draw();
fill(0);stroke(0);
}
}
沒有留言:
張貼留言