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

Cannot pass in Leap.loop options without callback #190

Closed
pehrlich opened this issue Oct 25, 2014 · 0 comments
Closed

Cannot pass in Leap.loop options without callback #190

pehrlich opened this issue Oct 25, 2014 · 0 comments

Comments

@pehrlich
Copy link
Contributor

See this line: https://github.com/leapmotion/leapjs/blob/master/lib/index.js#L53

It should be replaced to check for type of opts being function, rather than a couple of specific keys for an edge-case

@pehrlich pehrlich mentioned this issue Jun 23, 2015
7 tasks
mustafa-zidan added a commit to mustafa-zidan/leapjs that referenced this issue May 24, 2017

* Fix bug where controller.use would rely on Leap in global namespace in node.

* Fix whitespace

* Add signature

* sig formatting

* rebuilding -- fully integrating post process into frame class

* Fix whitespace

* Bump to version 0.5.0

* Test page for device events

This angular app prints out events emitted from a Leap controller.  It
allows protocol and leapjs version to be specified.

* Fix issue where paintable frame would not be set

* Update README.md

* Update README.md

* Change deviceList array in to devices object,.

* protocol v6

* Query correct protocol version; fix test for confidence

* Add frame output to protocol tester

* Reverse log order on protocol tester

* Fix typo'd ignore

* Fixes leapmotion#154 useAnimationLoop disabled in chrome.

Conflicts:
	leap.min.js

* Only run animation loop if focused

This improves performance when multiple tabs are open, as chrome we
provide animationFrames for any window visible, even if out of focus,
LeapJS only needs to update if focus is given.  This improved by a
noticeable 5 FPS (15 to 20) with unfocused visible windows.

Note that when focus is returned, the focus event is fired before
resuming the animation loop.

* Only run the pipeline on animation frames in the browser

This is pretty important, as the pipeline can be heavy and even include
calls for rendering to the GPU.  It does mean that if someone is needs
to do data analysis on deviceFrames directly, they won't have the same
processed frames available to them.  This isn't a problem until its a
problem.

* Explicitly name leap animation frame callback for nicer profiling

* Allow .use to be called multiple times on a controller

* Version 0.4.2

* Add pipeline note to changelog

* Fix integration test

* Add info to changelog

* Fix indentation

* Clean up fingers & tools testing

* Add named finger properties to hand

* Have animation frames not be trigged when not receiving device frames

Note that prior to this, every animation f

* Fix test assertions for hand-thumb

* Fixes leapmotion#159 unable to background after disconnect and reconnect.

Note that this simply adds a cleanup line to connection/base.js.  An
alternative and perhaps more proper way of fixing this would be to
destroy the entire connection object on disconnect, and create on
connect.

* Fixes leapmotion#158 setBackground unavailable; add an option controller.loopWhileDisconnected

* Fix code style for default opts.useAllPlugins

* Release v0.4.3

* Fix issue where Leap.loop would ignore useAllPlugins option

* Use grunt to build scripts.  Fixes 141

changing the version in package.json will now update bower, the header
comments, version.js, the src file names, and all the places those src
files are used.  The banner is now automatically included at the tops
of script files. yay.  Still need to go through and clean out the
makefile, but that can be done later.

* Add grunt watch

* Fix browserify ignore

* Add load-grunt-tasks

* Remove bunk example

* Add convenience method controller.connected()

* Add comment.

* Cleanup

* Downgrade uglify to support node 0.8.0

* Add Grunt task for running tests

* Downgrade load-grunt-tasks for node 0.8 support

* Update version number in test/helpers/browser.html

* Travis config to use grunt

* No longer deprecate deviceConnected/Disconnected events

* Backfill new device events to older protocol versions

* Clean up examples directory

* Update grunt file to allow beta-flagged version numbers

* Bump to version 0.6.0-beta1

* Fix issue where a call to disconnect would automatically reconnect.

* Add convenience method controller.connected()

Conflicts:
	CHANGELOG.md
	leap.min.js

* Add `grunt test watch` configuration

* Add `controller.streaming` method

* Changed GitHub handle in contributors.txt

* Add serviceVersion information to protocol

* No longer default to useAllPlugings == true when using Leap.loop

* Update readme

* No longer test on node 0.8

* Update readme with getting-started link

* Sort fingers on hands

* Update dumper to allow C&P after pause

* Delete leapTest.js

* Report focus correctly after reconnecting, fixes leapmotion#171

* Backfill streaming events for protocol v4, handling disconnection and deviceDisconnection

* Allow emission of deviceStopped/deviceRemoved/streamingStopped upon manual disconnection.

* Fix issue where focus changes while disconnect would cause focus not to be sent while connected.

* Speed up refocus detection by 100ms

* Decrement protocols more quickly

* Update changelog

* Fix test error

* Clean up protocol.js

* Deprecation warnings for deviceConnected/Disconnected

* Include device dummy info om backfilled deviceStreaming/Stopped info

* Update README.md

* Update README.md

* Speed up test failure by running node tests first

* Emit hand events

* Allow hand and frame binding via controller options

* Ensure Leap.loop compatability

* Clean up controller.loop dead code.

* Fix issue where Leap.loop `hand` option would not automatically connect.

* Add loop example

* Clean up troubleshooting/compat in readme, add math example, reference wiki

* Update gl matrix docs links in readme

* Change header size to be more reasonable

* Update gl-matrix to latest (2.2.1)

* Update grunt file to work with new example

* Bump to version 0.6.0-beta2

* Allow prototypical extension of Fingers in plugins

* console.warn plugin duplication, rather than throwing an error.

* Fix issue where hand option could not be used with loop + loop options

* Add console log to dumper

Conflicts:
	examples/dumper.html

* Bones API

* Update finger.js test

Changing the number 4 to the number 5 for positions in the test string.

* Update frame.js test

Changing from 10 pointables found to five pointables found

* Update finger.js

* Update bone.js

* Split out lerp method

* Add bone.matrix() method; use in example

* Add finger property to bone

* Add no-bones compatibility and warning

* Add plugin warning

* Bump to beta3

* Remove JSON.rst (moved to wiki)

* Add iFrame test

* Add images directory with logo files

* Update to Apache 2.0 License

* Clean up changelog/typos

* Update finger.js

Making it so bones are added if there are bases.

* updating builds

* Add iFrame test

* Improve bone docs

* correctly position joints example

* Updated toString() to display width.

Width is now supported for fingers.

* Fix bone.direction()

* Allow tagging of tests as browser-only

* Grunt watch for subdirectories as well

* Add version warning dialog

* Add `checkVersion` controller option

* Add warning for bones version out of date

* Update copy on "out of date" warning

* Upgrade warning message to include beta/developer reference

* Version beta4

* Rebuild for beta4

* Rename intermediate -> medial

* Update README.md

* Adjust padding on buttons

* Clean up dialog padding

* Bump to version 0.6.0

* rebuild w/ the latest gl-matrix

* Update example to use joint spheres

* Fix issue where first frame emitted would be invalid.

Note that this call to `runAnimationLoop` was originally added to allow
looping without there being frames.  However, that functionality seems
broken regardless, and perhaps should be deprecated, as there’s nothing
wrong with people running their own loops for leap-independent
animations.

* Recompile

* Upgrade to latest phantomjs

faster, possibly better consistency against browser

* Remove unused variable from example

* Fix some tests which would actually connect to the running leap software

* Allow Leap.loop to be called with no arguments, fix error with Leap.loop being called multiple times.

* In gestures.html, renamed ctl to controller. Made this a member variable of window.

* Added buttons to gestures.html to test gesture enable/disable via websocket.

* Add arm api to hand; update example.

* Remove notice

* Add arm type

* Bump to v0.6.1

* Update CHANGELOG.md

* Add bone basis arrows example

* Update description

* Use was on https pages

* Fix issue where dumper would not print out service version

* Add class name to warning dialog

* Add before/after frame created events

* Fallback to http if https cannot connect

In cases where browsers still allow plain connections on TLS sites, we
still use this fallback for users which haven’t upgraded their leap
service.  This can probably be removed before too long.

* Update to use port 6436 for SSL

* Bump to version 0.6.2

* Add example to stylize the V2 upgrade dialog

* Update header to mention Apache-2.0

* Update changelog

* Update CHANGELOG.md

* Update CHANGELOG.md

* Add optimizeHMD flag to Controller

* Update test descriptions

* Rename protocol#sendHMD to #sendOptimizeHMD

* Remove unused variable

* Rename optimizeHMD to setOptimizeHMD

* Add log message for optimize HMD

* Bump to version 0.6.3

* Fix broken example links

Links to examples were sending to a 404. Now the links direct to the appropriate URLs.

* Add to CONTRIBUTORS

* Include forgotten semicolons

* loopWhileDisconnected now defaults to true

* Update gruntfile watch atBegin

* Start animation loop immediately when a controller is constructed

* Add "frameEnd" event

* Add frameEnd event dumper example, fixes leapmotion#194

* Fixes leapmotion#190 Cannot pass in Leap.loop options without callback

* Add note to THREEJS bones example

* Expose EventEmitter and _ on Leap

* Only emit valid frames

Important, as looping begins before connection

* Bump to 0.6.4

* Fix 404 LICENSE link

* Update comment in bone hand example

* Remove githalytics.

* Update README.md

* Use svg instead of png to get better image quality

* Update README.md

* Update underscore dependency.

* Sign Contributor License Agreement
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

1 participant