Using face-api to map players' faces:
1. Calculated the nose position between left contour and right contour's position to get the faces "rotate" and "tilt" numbers.
2. Got faces' expressions and values.
Here is what the bugs we found! 🐛🐛🐛🐛🐛
Mapping players' faces to avatars :
Here is our older version of finger run, we replaced the video canvas into 'real' avatars
And we mapped the avatars' faces, rotations and tilts with our face values that we get from players' webcam in real-time.
Click time! Using web socket to get players' mouse click and make their avatars run with face expressions:
1. Face expressions: Different face expression has different speed values, angry faces will speed up your avatars speed.
2. Web socket: Clicks, faces' values, scores.