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

How to add capture image feature? #122

Closed
ghost opened this issue Sep 17, 2019 · 2 comments
Closed

How to add capture image feature? #122

ghost opened this issue Sep 17, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 17, 2019

Hi Xavier,
I have two questions, I am trying to use the demo based on Canvas2d "Draw with your mouse" in a create-react project and I am running into errors. Can you suggest a good way to do it?

Secondly, once I can successfully integrate the demo in the create-react-app, I want to add a feature where we can click a picture of us with the filter. Something like a photo-booth.

Can you please guide me on how should I approach this? Thanks mate.

@xavierjs
Copy link
Member

Hi,

I don't want to work with specific frameworks like React.
React is great to build front-end apps but Jeeliz FaceFilter is something which can be usable with any framework.
You can submit a PR with a React demo, but I won't provide support for high end frontend frameworks like React, Angular, Vue, ...

Your second question is strongly related to this closed issue: #53
If you draw above the canvas with <div> elements I think it will be a mess to implement the capture image feature.

You should use THREE;js or raw webgl to draw on your canvas so that you can directly get capture the image using canvas.toDataURL(). React is great for front-end dev but I think it will be a loss of time and performance to use it for this. You can still use react for the global structure of your app, but for the face filter module you have to get out of react paradigm, use a unique canvas not managed by react. This closes issue contains some information about how to interface it with react: #74

Best,
Xavier

@ghost
Copy link
Author

ghost commented Sep 19, 2019

You're very helpful as always. I'll look into the above closed issues. Thanks again!

@ghost ghost closed this as completed Sep 19, 2019
This issue was closed.
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