Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work without controlling the render loop #23

Open
pehrlich opened this issue Jun 12, 2015 · 2 comments
Open

Work without controlling the render loop #23

pehrlich opened this issue Jun 12, 2015 · 2 comments

Comments

@pehrlich
Copy link
Contributor

Via @capnmidnight :

I have one comment. Work on making all of this stuff work better when the leap controller is not managing the animation frame loop. Or if it does work fine, update the documentation. I personally haven't been able to figure out how to use any of the plugins like boneHand or riggedHand because my app framework manages the loop on its own.

It looks like that there are places that would need a trivial refactor for this to work. For example, the bone hand would need an explicitly exposed "render" method, which would call the onHand, etc. https://github.com/leapmotion/leapjs-plugins/blob/master/main/bone-hand/leap.bone-hand.coffee#L475

@pehrlich
Copy link
Contributor Author

Found an example of this, here: https://developer.leapmotion.com/gallery/vr-quickstart

However, still leaving this issue open. Although that example does indeed work, it is possible or perhaps even easy to introduce a frame of lag. As the onHand method moves the hand, and is triggered by the hand event, which is running on its own requestAnimationFrame loop. If the Leap Controller is not initialized prior to the app's, a frame of delay could be introduced. (CC @capnmidnight )

@capnmidnight
Copy link

OK, thanks. This example worked well, but yes, I did notice the lag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants