hleap-0.2.0.0: Web Socket interface to Leap Motion controller

Copyright(c) 2016-19 Brian W Bush
LicenseMIT
MaintainerBrian W Bush <code@functionally.io>
StabilityStable
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

System.Hardware.Leap

Contents

Description

Interaction with Leap Motion <https://www.leapmotion.com/product/desktop>, based on the Web Socket API <https://developer.leapmotion.com/documentation/javascript/supplements/Leap_JSON.html>.

Here is a simple example applicaton that prints all events:

main :: IO ()
main =
  runWithHandler def [setFocused True, setGestures True] $ event ->
    print (event :: Event Float)

Synopsis

Configuration

setBackground Source #

Arguments

:: Bool

Whether to enable background events.

-> ConnectionModifier

Function for making the modification.

Enable or disable background events. See <https://developer.leapmotion.com/documentation/javascript/supplements/Leap_JSON.html> for details.

setFocused Source #

Arguments

:: Bool

Whether to enable focus.

-> ConnectionModifier

Function for making the modification.

setGestures Source #

Arguments

:: Bool

Whether to enable gestiure events.

-> ConnectionModifier

Function for making the modification.

setOptimizedHMD Source #

Arguments

:: Bool

Whether to enable HMD optimization.

-> ConnectionModifier

Function for making the modification.

Enable or disable head-mounted-display optimization. See <https://developer.leapmotion.com/documentation/javascript/supplements/Leap_JSON.html> for details.

Applications

type ClientApp a Source #

Arguments

 = Connection

The Web Socet connection.

-> IO a

Action for the client application.

A client application for Leap Motion using Web Sockets.

type Handler a Source #

Arguments

 = Event a

The event.

-> IO ()

The action for handling the event.

A handler for Leap Motion events.

run Source #

Arguments

:: Configuration

The Web Socket configuration.

-> ClientApp a

The client application.

-> IO a

Action for running the client.

Run a Leap Motion application using Web Sockets.

runWithHandler Source #

Arguments

:: FromJSON a 
=> Configuration

The Web Socket configuration.

-> [ConnectionModifier]

Modifications to be made to the connection.

-> Handler a

The event handler.

-> IO ()

Action for running with event handling.

Run and process events from Leap Motion using Web Sockets.