Closed AnastasiiaaaaM closed 5 years ago
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: https://github.com/niklasvh/html2canvas/issues/345#issuecomment-36919474
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.
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.
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