AnyEvent::LeapMotion - Perl interface to the Leap Motion Controller (via WebSocket)
use AnyEvent; use AnyEvent::LeapMotion; my $leap = AnyEvent::LeapMotion->new( enable_gesture => 1, on_frame => sub { my $frame = shift; ... }, ); $leap->run; AE::cv->recv;
AnyEvent::LeapMotion is a simple interface to the Leap Motion controller. It receives tracking data through a WebSocket server.
my $leap = AnyEvent::LeapMotion->new()
Create an instance of AnyEvent::LeapMotion.
$leap->run()
Running an event loop.
There is Device::Leap module on CPAN, but it is difficult to use and cannot get the gesture. So I made a module with simple interface.
WebSocket Communication
Copyright (C) Takumi Akiyama.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Takumi Akiyama <t.akiym@gmail.com>
To install AnyEvent::LeapMotion, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::LeapMotion
CPAN shell
perl -MCPAN -e shell install AnyEvent::LeapMotion
For more information on module installation, please visit the detailed CPAN module installation guide.