Lightstreamer - Leap Motion Demo - HTML (LeapJS, Three.js) Client
This project includes a web client front-end for the Leap Motion Demo:
Each user can act on its own block in two different modes: he can make a fist to grab its block and drag it around the game field, or release the fist and "throw" his block. In the first case, all the hand positions are sent to the Lightstreamer server, which, in turn, push them to all the currently connected clients, whereas in the latter case, only the applied forces are sent to the server and to the other clients; each client will calculate the current position of the block using the received forces and will re-synchronize with the Lightstreamer server, which is calculating the various positions, too, every few seconds.
If you want to install a version of this demo pointing to your local Lightstreamer server, follow these steps:
- As prerequisite, the Lightstreamer - Leap Motion Demo - Java Adapter has to be deployed in your local Lightstreamer server instance. Please check out that project and follow the installation instructions provided with it.
- Get the
lightstreamer.jsfile from Lightstreamer distribution (see compatibility notes below) and put it in the
srcfolder of the demo. The version required by this demo can be found in Lightstreamer version 5.1.2 to 7.0.
- RequireJS is currently hot-linked in the html page: you may want to replace it with a local version and/or to upgrade its version.
- jQuery is currently hot-linked in the html page: you may want to replace it with a local version and/or to upgrade its version.
- leapjs is currently hot-linked in the html page (look for 0.3.0-beta2/leap.js), but you may need to replace it with a local version. You can find the version currently used in the demo on Github, where newer versions are also available.
- three.js is currently hot-linked in the html page: you may want to replace it with a local version and/or to upgrade its version.
- Deploy this demo on the Lightstreamer Server (used as Web server) or in any external Web Server. If you choose the former, please create the folder
<LS_HOME>/pages/LeapDemoand copy here the contents of the
/srcfolder of this project. The client demo configuration assumes that Lightstreamer Server, Lightstreamer Adapters, and this client are launched on the same machine. If you need to target a different Lightstreamer server, please search in
and change it accordingly.
- Open your browser and point it to: http://localhost:8080/LeapDemo/
Lightstreamer Adapters Needed by This Client
Lightstreamer Compatibility Notes