1.0.0-beta.1 • Published 7 years ago
react-leap v1.0.0-beta.1
react-leap
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