Hi guys,
We use a library for 3D face tracking called “Visage”. We use it for face painting.
This library has a sample that applies a tiger face painting to user’s face. The demo is provided here:
https://www.visagetechnologies.com/HTML5/latest/Samples/ShowcaseDemo/ShowcaseDemo.html
(Click “Tiger Model” checkmark).
Now, the most important part: the sample uses Three.js to apply the model with face paint.
It works perfectly on desktop, but on mobile device, the Tiger mask is misplaced, it doesn’t fit on the face but stays quite a bit off to the side.
It uses the following code to set up the mask position:
var container = document.getElementById('inner-container');
scene = new THREE.Scene();
v_camera = new THREE.PerspectiveCamera( 36.869, mWidth/mHeight, 0.001, 30 );
v_camera.lookAt(new THREE.Vector3(0, 0, -1));
renderer = new THREE.WebGLRenderer({ alpha: true });
renderer.setSize(mWidth, mHeight);
container.appendChild( renderer.domElement );
Any help on aligning it on mobile device would be much appreciated!