Face Events

Makes your Lens react when you open your mouth, smile, kiss, raise your eyebrows or tilt your head. It also tells the Lens where your eyes, nose and mouth are on screen.

Camera, Audio & Sensors

Camera feed, hand and face tracking, touch, tilt, haptics, and sound.

Made with this block

Inputs

enableHintboolean

Shows a system hint (on screen instruction) for the relevant interaction for face events, true by default unless the lens shows it's own hint through text or another means.

Events

onFaceFound

this event is triggered when a face is found in the image and is being tracked

onFaceLost

This event is being triggered when a tracked face is lost

onMouthOpened

This event is being triggered when the user opens the mouth

onMouthClosed

This event is being triggered when the user closes the mouth

onSmileStarted

This event is triggered when the user smiles

onSmileFinished

Event is triggered when the user stops smiling

onKissStarted

This event is triggered when a kiss starts

onKissFinished

Event is triggered when a kiss is finished

onBrowsRaised

This event is triggered when the user raise the eyebrows

onBrowsLowered

This event is triggered when a user lowers the eyebrows

onBrowsNormal

This event is triggered when a user returns the eyebrows to a normal (natural) position

onTiltLeft

An event called when the user tilts their head to the left. Use this or onTiltRight if a user requests changing something using head tilt.

onTiltRight

An event called when the user tilts their head to the right. Use this or onTiltLeft if a user requests changing something using head tilt.

onTiltCenter

An event called when the user re-centers their head after tilting it to one side.

Functions

getHeadAnglefloat

Gets the head tilt angle ranging from 0 to 90.0 when the user tilts left and 0 to -90.0 when the user tilts to the right.

getNosePosition2Dvec2

Gets the 2D nose position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.

getLeftEyePosition2Dvec2

Gets the 2D left eye position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.

getRightEyePosition2Dvec2

Gets the 2D right eye position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.

getMouthPosition2Dvec2

Gets the 2D mouth position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.

getHeadCenterPosition2Dvec2

Gets the 2D head center position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.

getForeheadPosition2Dvec2

Gets the 2D forehead position of the user in screen space as a vec2 ranging from (0.0,0.0) - top left corner to (1.0,1.0) - bottom right corner.