Coder Social home page Coder Social logo

aframe-leap-hands's Introduction

A-Frame VR leap-hand for Leap Motion

GitHub license Work in progress

A-Frame VR component for Leap Motion controller.

4d731aec-193d-463c-8189-d54c5e023206-20847-0002ac9dc2db9992

Installation (Scripts)

In the dist/ folder, download either the minified or unminified build. Include the scripts on your page, and all components are automatically registered for you.

Or, use a CDN-hosted version:

<script src="//unpkg.com/aframe-leap-hands/dist/aframe-leap-hands.min.js"></script>

Installation (NPM)

Using NPM and Browserify or Webpack:

npm install --save aframe-leap-hands
require('aframe-leap-hands').registerAll();

Usage

<a-entity camera="near: 0.01" look-controls position="0 1.5 0">
  <a-entity leap-hand="hand: left"></a-entity>
  <a-entity leap-hand="hand: right"></a-entity>
</a-entity>

Options

leap-hand component:

Property Default Description
hand left or right
enablePhysics false Adds a physics body for aframe-physics-system.
holdDistance 0.2 Holding distance, in meters.
holdDebounce 100 Debouncing on grip, in milliseconds.
holdSelector [holdable] Selector that limits which objects may be held.
holdSensitivity 0.95 0—1.
releaseSensitivity 0.75 0–1.
debug false Shows a grip target indicator.

leap system:

Property Default Description
vr true If true, sets default VR position and quaternion.
scale 0.001
position 0 0 0
quaternion 0 0 0 1

For example, to set both hands to desktop configuration:

<a-scene leap="vr: false">
  <a-entity leap-hand="hand: left"></a-entity>
  <a-entity leap-hand="hand: right"></a-entity>
</a-scene>

References:

Official

Third-party

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.