Nitrate Processed Mincemeat

    react-leap

    1.0.0-beta.1 • Public • Published

    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)

    Install

    npm i react-leap

    DownloadsWeekly Downloads

    1

    Version

    1.0.0-beta.1

    License

    MIT

    Last publish

    Collaborators

    • avatar