Socket
Book a DemoInstallSign in
Socket

leapmotion

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leapmotion

0.0.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

LeapMotion

LeapMotion WebSocket wrapper for Ruby

  • https://github.com/shokai/leapmotion-ruby
  • http://rubygems.org/gems/leapmotion

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

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

FAQs

Package last updated on 03 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.