1.0.0-beta.1 • Published 7 years ago

react-leap v1.0.0-beta.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

react-leap Build Status npm version

Leap Motion for ReactJS

Quick start

Setup LeapProvider:

import React from 'react';
import { LeapProvider } from 'react-leap'
import MyApp from './myapp'

const AppShell = () => (
  <div>
    <LeapProvider options={{enableGestures: true}}>
      <MyApp />
    </LeapProvider>
  </div>
)

export default AppShell

Connect Leap data to your app (myapp.js):

import React from 'react'
import { withLeapContainer } from 'react-leap'

const MyApp = ({frame}) => {
  const hands = frame.hands
  
  // process data from frame

  return (
    <div>
    </div>
  )
}

export default withLeapContainer(MyApp)
1.0.0-beta.1

7 years ago