leapmotion/leapjs
关于
Leap Motion Controller 的 JavaScript 客户端
学习与教育实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 0
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Welcome to the Leap Motion JavaScript framework.
You can now use LeapJS with Ultraleap Gemini V5 and Hyperion V6! Visit the Ultraleap Tracking WebSocket repository to grab the code and build it from source.
Leap.loop(function(frame){
console.log(frame.hands.length);
});
Learn more in the Getting Started Guide, and the API Reference.
Installation
Browser: Download the latest leap.js from our CDN.
Bower: bower install leapjs
Node: npm install leapjs
Examples
Visit developer.leapmotion.com/gallery/category/javascript for the latest examples.
Some more basic examples have also been included in the examples/ directory.
Plugins
Plugins are used to modularly extend Leap Webapps with external libraries.
Here we use the screenPosition plugin to get the position of the hand as an on-screen cursor.
Leap.loop({
hand: function(hand){
console.log( hand.screenPosition() );
}
}).use('screenPosition');
Misc
LeapJS includes the vector math library GL-Matrix for your use and convenience. For example, we can easily compute a dot product. See the example and the gl matrix docs for more info.
var dot = Leap.vec3.dot(hand.direction, hand.indexFinger.direction);
Also visit the wiki for how to make plugins, protocol guide, and other stuff.
Contributing
Add your name, email, and github account to the CONTRIBUTORS.txt list, thereby agreeing to the terms and conditions of the Contributor License Agreement.
Open a Pull Request. If your information is not in the CONTRIBUTORS file, your pull request will not be reviewed.
探索相关项目
加载中…
