Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// How to load in modules
const FaceTracking = require('FaceTracking');
const D = require('Diagnostics');
const Scene = require('Scene');
const TouchGestures = require('TouchGestures');
const object = Scene.root.find("object");
face.mouth.openness.monitor().subscribe(function(event) {
if(event.newValue > 0) {
object.transform.x = FaceTracking.face(0).cameraTransform.applyTo(FaceTracking.face(0).mouth.center).x;
object.transform.y = FaceTracking.face(0).cameraTransform.applyTo(FaceTracking.face(0).mouth.center).y;
object.transform.z = FaceTracking.face(0).cameraTransform.applyTo(FaceTracking.face(0).mouth.center).z;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.