Skip to content

Instantly share code, notes, and snippets.

@error454
error454 / Leap Explanation.md
Last active December 20, 2015 22:49
Leap joints etc for Payam.

leapFrame.js defines a function that helps you read and act on a single frame of leap data.
The leap device passes 'frames' of data as it sees objects in the world. A single frame of data has information on how many objects are seen, what direction they're pointing, where they're located in 3D space etc. Take time and look at leapFrame.js and the functions it provides:

  • palm position
  • palm direction
  • palm normal vector
  • finger position
  • finger angle
  • delta finger position

If you need some help figuring out what some of these vectors look like, take a look at the leap documentation, they have nice pictures showing all the axis etc.

@simsaens
simsaens / Main.lua
Created June 1, 2013 14:19
Juice Library - Codea Project Gist Created with AutoGist
-- Juice
-- Use this function to perform your initial setup
function setup()
r = juice.rect(WIDTH/2,HEIGHT/2,70)
parameter.integer( "ObjType", 1, 4, 1, objChanged )
parameter.action( "Spin", function() r:spin(2) end )
@thallium205
thallium205 / ranker.java
Created March 22, 2012 15:01
Java Implementation of the Google App Engine Ranklist
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import org.mortbay.log.Log;
@rsanchez1
rsanchez1 / input.js
Created August 3, 2011 13:46
enyo key input example
{kind: "Input", name: "email", hint: "", value: "", onkeypress: "inputChange"},
inputChange: function(source, event) {
enyo.log("called the input change event");
if (event.keyCode == 13) {
enyo.log("pressed enter button, submit form");
}
}
@ppanyukov
ppanyukov / p4changes.sh
Created June 20, 2011 10:36
Print Perforce commit stats by user between two specified dates
#!/bin/bash
#
# A kind of an alias support for the Perforce p4.
#
# This one aliases "interchanges" and "changes" commands to be printed out nicely in format:
#
# Change <change_no> on <date> by <user>@<workspace> [<status>]
# <first line of change description>
# --
# Change <change_no> on <date> by <user>@<workspace> [<status>]