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

Button to take a screenshot. #53

Closed
AnastasiiaaaaM opened this issue Oct 30, 2018 · 1 comment
Closed

Button to take a screenshot. #53

AnastasiiaaaaM opened this issue Oct 30, 2018 · 1 comment

Comments

@AnastasiiaaaaM
Copy link

I'm using the jeelizFaceFilter.js to track the face and add a mask, as it's done in Comedy Glasses Demo. I need to add a button to get the photo shot.
screenshot 2018-10-30 at 11 04 20

Here is my code:
https://gist.github.com/AnastasiiaaaaM/39c1b694301b96fbabbade996041d063
But when I make a screenshot of a div "container". I get a photo of a camera canvas and mask as a full screen
screenshot 2018-10-30 at 12 49 54

@xavierjs
Copy link
Member

I think there is a problem with html2canvas(). It does not take into account CSS3D.
In the main script (https://github.com/jeeliz/jeelizFaceFilter/blob/master/demos/CSS3D/comedy-glasses/demo_comedyGlasses.js), the div is positionned using a 3D transform matrix (function apply_matrix ).

On the github of html2canvas, a guy seems to confirm: niklasvh/html2canvas#345 (comment)

If I were you, if the screeshot feature is very important, I would remake the demo using the THREE.JS boilerplate, then I would replace the cube by a textured plane and it would be easy to do a screenshot (https://stackoverflow.com/questions/15558418/how-do-you-save-an-image-from-a-three-js-canvas) without using any library like html2canvas.

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

2 participants