leapjs

用于 Leap Motion 控制器的 JavaScript 客户端。「JavaScript client for the Leap Motion Controller」

What do you think about the future of VR? Take our survey.

LeapJS Logo

Welcome to the Leap Motion JavaScript framework.

Build Status

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.

Analytics

主要指標

概覽
名稱與所有者leapmotion/leapjs
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證Apache License 2.0
所有者活动
創建於2013-01-04 22:13:20
推送於2025-02-24 13:39:44
最后一次提交2025-02-24 13:39:39
發布數29
最新版本名稱v1.1.1 (發布於 )
第一版名稱v0.1.0 (發布於 )
用户参与
星數2k
關注者數183
派生數443
提交數891
已啟用問題?
問題數108
打開的問題數28
拉請求數123
打開的拉請求數14
關閉的拉請求數74
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?