Skip to main content

Face

Face tracking, face effects, and face expression events.

Commonly used

Guides

All APIs in this topic

Add components to a scene object, reference assets and other modules with a script input, require modules with require('LensStudio:<name>'), and create events with script.createEvent('<name>').

Components, assets, and modules

APIDescription
EyeColorVisualApplies an eye color effect to a face.
FaceInsetVisualProvides a 2D visual of a section of a tracked face, such as Mouth, Nose, etc.
FaceMaskVisualMaps a 2D texture to the user's face.
FaceStretchVisualUsed to apply deformation effects to specific regions of a tracked face.
FaceTrackingModuleDeclares the face tracking permission for your Lens project.
FaceTrackingScopeThe face that a tracker should use.
HeadUsed to move and rotate SceneObjects in sync with the user's head movements.
RetouchVisualAdds subtle retouching effects to detected faces such as soft skin, teeth whitening, etc.

Events

APIDescription
BrowsLoweredEventTriggered when eyebrows are lowered on the tracked face.
BrowsRaisedEventTriggered when eyebrows are raised on the tracked face.
BrowsReturnedToNormalEventTriggered when eyebrows are returned to normal on the tracked face.
FaceFoundEventTriggered when a new face is detected and starts being tracked.
FaceLostEventTriggered when a face can no longer be tracked.
FaceTrackingEventThis is the base class for all face tracking events.
KissFinishedEventTriggered when the tracked face ends a kiss.
KissStartedEventTriggered when the tracked face starts a kiss.
MouthClosedEventTriggered when the tracked face's mouth closes.
MouthOpenedEventTriggered when the tracked face's mouth opens.
SmileFinishedEventTriggered when a smile ends on the tracked face.
SmileStartedEventTriggered when a smile begins on the tracked face.

Objects and data

APIDescription
FaceCropTextureProviderTexture Provider giving a cropped region of the input texture, calculated based on face position.
FaceRenderObjectProviderMesh provider for a Face Mesh.
NamedValuesA type containing two arrays which map positionally to each other.
StretchPointA point in the FaceStretchVisual feature.

Enums

APIDescription
AttachmentPointType
Expressions
EyeToRenderSpecifies which eye to apply an EyeColorVisual effect to.
FaceInsetRegion