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

Are there plans for NPM package? #13

Closed
ghost opened this issue Mar 12, 2019 · 8 comments
Closed

Are there plans for NPM package? #13

ghost opened this issue Mar 12, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 12, 2019

Hi! Are there any plans to set this up as an NPM package, like how you have it for FaceFilter? If not I'd be happy to help with a Pull Request and also help maintain it, as I intend to use this for a few different side projects (by the way, you did an amazing job with these libraries and keeping file size small!)

@xavierjs
Copy link
Member

Hi,

Currently no.
I will add the ES6 version to the github and also commit the change to import direcly JSON as string instead of by ajax. But I don't plan to add a NPM package for this library, so you are welcome to publish the NPM package.

Best,
Xavier

@xavierjs
Copy link
Member

I have added the ES6 version into /dist
And a short explanation here: https://github.com/jeeliz/jeelizWeboji#using-the-es6-module

It is also possible to give the JSON content of the neural network model with the NNC init argument (see the PDF doc it has been updated). When it is provided it won't try to load the neural network model using AJAX.

So I think all is here to do the NPM module. it only lacks the package.json, maybe to port a demo to ES6.

Best,
Xavier

@ghost
Copy link
Author

ghost commented Mar 13, 2019

Thanks so much! I tried the new version and my app stopped working but I'm not sure why. Here's my init:

jeelizFaceTransfer.init({
  canvasId: 'facefilter-canvas',
  NNC: jeelizNN,
  videoSettings,
  callbackReady: () => {
    console.log('ready')
    $('body').addClass('handsfree-ready')
    this.canvasSize = jeelizFaceTransfer.get_size()
    this.track()
  }
})

It's still trying to load jeelizFaceTransferNNC.json. It also stopped calling the callbackReady. When I call it directly with window.ta() it crashes because the methods don't exist anymore. Here's my JEEFACETRANSFERAPI as copied from this directory: https://github.com/jeeliz/jeelizWeboji/tree/master/dist

image

Yesterday it was:

image

Here's a quick demo of it working yesterday: https://browsehandsfree.firebaseapp.com/

ezgif com-video-to-gif (1)

@xavierjs
Copy link
Member

Hi,

You are right, I did a mistake.
It should work since last commit.
Best,
Xavier

@xavierjs
Copy link
Member

BTW tell me when you have a working demo, I would be glad to add a link from the readme.md of this github repository and share the link (twitter, linkedin)

@ghost
Copy link
Author

ghost commented Mar 16, 2019

Hi! It's not much to share yet, but right now you can scroll and click through the forum hands-free (and from really far away!)

ezgif com-gif-maker

I just want to say thank you again for this library, it's really well done! I'm not launching until Monday and the content is just basically dummy content, but here is the prototype: https://browsehandsfree.com

To start it, click the webcam icon and then smile to click:

ezgif com-video-to-gif (3)

It was tricky, because of how Discourse works I had to use Webpack to bundle your library into a Discourse Component. I wrote about that here: https://meta.discourse.org/t/discourse-webpack-a-boilerplate-for-developing-js-heavy-discourse-components/111750

The idea is that people will be able easily share head tracked based games and apps by sharing embeds from sites like Glitch.com and CodePen (here are my old examples): https://glitch.com/@handsfreejs).

For example, if someone with disabilities would like to use YouTube 360 hands-free, then someone in the community could just whip up a Glitch project in a few minutes and then embed it on the forum for them to use:

The best part is that the person with disabilities never has to stop the camera. Because it's embedded in the site they can just use it without ever turning off the webcam (this is the part I'm trying to figure out how to do securely next though and is going to take the most work). And also, because it's JavaScript anyone can start using it once it's ready without downloading anything

Anyways, this is just a crazy idea I've been wanting to try and your library finally makes 100% of my requirements possible so I'm giving it a try lol

@xavierjs
Copy link
Member

Hi @browsehandsfree

Thank you very much for these explanations.
It is really a great work! I tried it and it works very nice for me.
I think maybe it should be useful to display a small camera feedback because if we start not perfectly in front of the camera or with a bad lighting it may not work properly at the beginning.

Best,
Xavier

@xavierjs
Copy link
Member

xavierjs commented Mar 21, 2019

I have added the link to your app in the readme.md (https://github.com/jeeliz/jeelizWeboji#demonstrations) .
Feel free to submit a PR to change the description or the link :)

Best,
Xavier

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