一、準備系統
下載Driver安裝 https://www.leapmotion.com/setup
選擇Windows Download
安裝
二、測試
使用內建Visualizer測試
三、開發
在Processing上開發
1. Processing 加入 Library
2.使用Examples程式碼測試
路徑:Java Examples>Contributed Libraries>Leap Motion for Processing
使用精簡Code測試
import de.voidplus.leapmotion.*;//載入函式庫
LeapMotion leap;
void setup(){
size(600,400);//設定視窗大小
leap=new LeapMotion(this);//取得LeapMotion
}
void draw(){
background(255);//設定背景顏色
for (Hand hand : leap.getHands ()) {
hand.draw();//畫手
}
}
期中作品
貓狗養成遊戲,可以透過體感裝置和虛擬世界的貓狗互動。
沒有留言:
張貼留言