Coder Social home page Coder Social logo

Comments (3)

schwittlick avatar schwittlick commented on August 15, 2024

i am currently updating the library to the 0.7.4 version of the leap sdk. after this is settled i will get back to you and explain how you can achieve what you're looking for. till then you can do it by hand, by getting the current frame:

LeapMotionP5 leap = new LeapMotionP5(this);
Frame frame = leap.getFrame();
//with this you have access to all date from the leap. eg:
if (!frame.hands().empty()) {
            // Get the first hand
            Hand hand = frame.hands().get(0);
            // Check if the hand has any fingers
            FingerList fingers = hand.fingers();
            if (!fingers.empty()) {
                // Calculate the hand's average finger tip position
                for (Finger finger : fingers) {
                    Vector fingerPos = finger.tipPosition();
                    int id = finger.id();
                    // etc
                }
            }
}

the vector you get with that way is not yet mapped to the dimensions of your processing window though. so unless you dont want to get your hands dirty with the original leap sdk i suggest to wait until im done. i will try to include your needs as good as possible, i think they are indeed good features for the p5 lib.
the handEnter/handLeave/fingerEnter/fingerLeave events are going to be changed as well. i will let you know here how to access them in the future releases.

from leapmotionp5.

ashleyjamesbrown avatar ashleyjamesbrown commented on August 15, 2024

Thanks so much for the response

Ashley

Ashley James Brown
{experience designer :: games architect :: digital artist}

e. [email protected]
w. ashleyjamesbrown.com
f. facebook.com/iamashleyjamesbrown
t. @arctic_sunrise
m. 07712887364

On 26 Feb 2013, at 13:32, mrzl wrote:

i am currently updating the library to the 0.7.4 version of the leap sdk. after this is settled i will get back to you and explain how you can achieve what you're looking for. till then you can do it by hand, by getting the current frame:

LeapMotionP5 leap = new LeapMotionP5(this);
Frame frame = leap.getFrame();

with this you have access to all date from the leap. eg:
if (!frame.hands().empty()) {
// Get the first hand
Hand hand = frame.hands().get(0);

    // Check if the hand has any fingers
    FingerList fingers = hand.fingers();
    if (!fingers.empty()) {
        // Calculate the hand's average finger tip position
        for (Finger finger : fingers) {
            Vector fingerPos = finger.tipPosition();
            int id = finger.id();
            // etc
        }
    }

}

the vector you get with that way is not yet mapped to the dimensions of your processing window though. so unless you dont want to get your hands dirty with the original leap sdk i suggest to wait until im done. i will try to include your needs as good as possible, i think they are indeed good features for the p5 lib.
the handEnter/handLeave/fingerEnter/fingerLeave events are going to be changed as well. i will let you know here how to access them in the future releases.


Reply to this email directly or view it on GitHub.

from leapmotionp5.

ashleyjamesbrown avatar ashleyjamesbrown commented on August 15, 2024

Hi any updates at all ? :-)

Heading to resonate in a few weeks and fancied putting this to the test

Thanks

Ashley

Ashley James Brown
{experience designer :: games architect :: digital artist}

e. [email protected]
w. ashleyjamesbrown.com
f. facebook.com/iamashleyjamesbrown
t. @arctic_sunrise
m. 07712887364

On 26 Feb 2013, at 13:32, mrzl wrote:

i am currently updating the library to the 0.7.4 version of the leap sdk. after this is settled i will get back to you and explain how you can achieve what you're looking for. till then you can do it by hand, by getting the current frame:

LeapMotionP5 leap = new LeapMotionP5(this);
Frame frame = leap.getFrame();

with this you have access to all date from the leap. eg:
if (!frame.hands().empty()) {
// Get the first hand
Hand hand = frame.hands().get(0);

    // Check if the hand has any fingers
    FingerList fingers = hand.fingers();
    if (!fingers.empty()) {
        // Calculate the hand's average finger tip position
        for (Finger finger : fingers) {
            Vector fingerPos = finger.tipPosition();
            int id = finger.id();
            // etc
        }
    }

}

the vector you get with that way is not yet mapped to the dimensions of your processing window though. so unless you dont want to get your hands dirty with the original leap sdk i suggest to wait until im done. i will try to include your needs as good as possible, i think they are indeed good features for the p5 lib.
the handEnter/handLeave/fingerEnter/fingerLeave events are going to be changed as well. i will let you know here how to access them in the future releases.


Reply to this email directly or view it on GitHub.

from leapmotionp5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.