Skip to content

Latest commit

 

History

History
102 lines (63 loc) · 3.46 KB

CONTRIBUTE.md

File metadata and controls

102 lines (63 loc) · 3.46 KB

How to contribute

This project is still a work in progress, but we hope that you will contribute!

Getting Started

If you want to help develop this library, here are the steps to get started with:

  1. Fork the repository to your account, and then clone it your computer:
git clone https://github.com/YOURGITHUBHANDLE/kinectron.git
  1. Make sure you have node and npm installed.

From here, you can choose to develop independently on the client-side API or the server application.

Contribute to API

You can develop on the client-side API from Mac or PC.

  1. Install dependencies.
cd client 
npm install
  1. Make changes in client/src/kinectron.js

  2. Build the library with changes.

Kinectron is developed using Browserify. Browserify is a module bundler that bundles several files into one file.

Kinectron requires PeerJS to send data over the network. Browserify makes sure that the PeerJS files are included in the Kinectron library. To create the bundle, run the build script.

npm run build

The final bundled library is created at client/bin/kinectron.bundle.js

OR

If you'd like to make several changes over time, Watchify will watch your file for changes, and simultaneously bundle them. Watchify will continue to watch for changes as long as it is running. To start this process run the start script.

npm start 

Use control + C to stop this process.

Contribute to Server Application

You can develop on the server application from Windows only. This has only been tested on Windows 10.

  1. Install dependencies.

After you've forked and cloned the repository, move into the app folder and install all dependencies.

cd app
npm install
  1. Build Kinect 2 for Electron

You will need to have node-gyp & it's dependencies installed (https://github.com/nodejs/node-gyp) before you can continue.

Node-gyp was installed with the previous npm install command. Follow the installation instructions on the node-gyp github repo to install the dependencies.

Now you are ready to build Kinect 2 for Electron.

// run this with target set to your electron version and arch set to your system architecture
// find electron version in your package.json file
// this is what I will run with electron version 1.4.13 and a 64-bit system  

node .\node_modules\kinect2\tools\electronbuild.js --target=1.4.13 --arch=x64

This will say gyp info ok at the end if it has built correctly.

  1. Run the electron application with npm start.
npm start
  1. To create a new release / packaged application. Run electron-packager from inside the application folder
cd app
npm run package

This will make an application for the platform and architecture for the computer you are working on. To learn more about packaging options read the Electron Packager documentation.

Additional Resources