Project

leapmotion

0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
LeapMotion WebSocket wrapper for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

LeapMotion

LeapMotion WebSocket wrapper for Ruby

Install

 % gem install leapmotion

Requirements

Samples

Usage

Start "Leap Motion.app"

  • /Applications/Leap Motion.app
  • It provides WebSocket API.

Run Ruby

require 'rubygems'
require 'leapmotion'

leap = LeapMotion.connect

leap.on :connect do
  puts "connect"
end

leap.on :disconnect do
  puts "disconnect"
  exit
end

leap.on :data do |data|
  puts "hands      #{data.hands.size}"
  puts "pointables #{data.pointables.size}"
  puts data
  puts "-"*5
end

leap.on :error do |err|
  STDERR.puts err
end

leap.wait

Gestures

leap = LeapMotion.connect :gestures => true

leap.on :gestures do |gestures|
  gestures.each do |g|
    puts g.type
    puts g
  end
  puts "-"*5
end

leap.wait

Test

% gem install bundler
% bundle install
% bundle exec rake test

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request