facefoundβ
This event is emitted by Face Effects when a face is first found.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face |
transform | TransformObject | Transform information of the located face. |
vertices | [{x, y, z}] | Position of face points, relative to transform. |
normals | [{x, y, z}] | Normal direction of vertices, relative to transform. |
attachmentPoints | { name, position: {x,y,z} } | See XR8.FaceController.AttachmentPoints for list of available attachment points. position is relative to the transform. |
uvsInCameraFrame | [{u, v}] | The list of uv positions in the camera frame corresponding to the returned vertex points. |
Property | Type | Description |
---|
position | {x, y, z} | The 3d position of the located face. |
rotation | {w, x, y, z} | The 3d local orientation of the located face. |
scale | Number | A scale factor that should be applied to objects attached to this face. |
scaledWidth | Number | Approximate width of the head in the scene when multiplied by scale. |
scaledHeight | Number | Approximate height of the head in the scene when multiplied by scale. |
scaledDepth | Number | Approximate depth of the head in the scene when multiplied by scale. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.facefound', (e) => {
console.log(e)
})
faceloadingβ
This event is emitted by Face Effects when loading begins for additional face AR resources.
Propertiesβ
Property | Type | Description |
---|
maxDetections | Number | The maximum number of faces that can be simultaneously processed. |
pointsPerDetection | Number | Number of vertices that will be extracted per face. |
indices | [{a, b, c}] | Indexes into the vertices array that form the triangles of the requested mesh, as specified with meshGeometry on configure. |
uvs | [{u, v}] | uv positions into a texture map corresponding to the returned vertex points. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.faceloading', (e) => {
console.log(e)
})
facelostβ
This event is emitted by Face Effects when a face is no longer being tracked.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the face that was lost. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.facelost', (e) => {
console.log(e)
})
facescanningβ
This event is emitted by Face Effects when all face AR resources have been loaded and scanning has begun.
Propertiesβ
Property | Type | Description |
---|
maxDetections | Number | The maximum number of faces that can be simultaneously processed. |
pointsPerDetection | Number | Number of vertices that will be extracted per face. |
indices | [{a, b, c}] | Indexes into the vertices array that form the triangles of the requested mesh, as specified with meshGeometry on configure. |
uvs | [{u, v}] | uv positions into a texture map corresponding to the returned vertex points. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.facescanning', (e) => {
console.log(e)
})
faceupdatedβ
This event is emitted by Face Effects when faces are subsequently found.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face |
transform | TransformObject | Transform information of the located face. |
vertices | [{x, y, z}] | Position of face points, relative to transform. |
normals | [{x, y, z}] | Normal direction of vertices, relative to transform. |
attachmentPoints | { name, position: {x,y,z} } | See XR8.FaceController.AttachmentPoints for list of available attachment points. position is relative to the transform. |
uvsInCameraFrame | [{u, v}] | The list of uv positions in the camera frame corresponding to the returned vertex points. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.faceupdated', (e) => {
console.log(e)
})
blinkedβ
This event is emitted by Face Effects when a tracked face's eyes blink.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.blinked', (e) => {
console.log(e)
})
interpupillarydistanceβ
This event is emitted by Face Effects when a tracked face's distance in millimeters between the centers of each pupil is first detected.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
interpupillaryDistance | Number | Approximate distance in millimeters between the centers of each pupil. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.interpupillarydistance', (e) => {
console.log(e)
})
lefteyebrowloweredβ
This event is emitted by Face Effects when a tracked face's distance in millimeters between the centers of each pupil is first detected.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.lefteyebrowlowered', (e) => {
console.log(e)
})
lefteyebrowraisedβ
This event is emitted by Face Effects when a tracked face's left eyebrow is raised from its initial position when the face was found.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.lefteyebrowraised', (e) => {
console.log(e)
})
lefteyeclosedβ
This event is emitted by Face Effects when a tracked face's left eye closes.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.lefteyeclosed', (e) => {
console.log(e)
})
lefteyeopenedβ
This event is emitted by Face Effects when a tracked face's left eye opens.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.lefteyeopened', (e) => {
console.log(e)
})
lefteyewinkedβ
This event is emitted by Face Effects when a tracked face's left eye closes and opens within 750ms while the right eye remains open.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.lefteyewinked', (e) => {
console.log(e)
})
mouthclosedβ
This event is emitted by Face Effects when a tracked face's mouth closes.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.mouthclosed', (e) => {
console.log(e)
})
mouthopenedβ
This event is emitted by Face Effects when a tracked face's mouth opens.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.mouthopened', (e) => {
console.log(e)
})
righteyebrowloweredβ
This event is emitted by Face Effects when a tracked face's right eyebrow is lowered to its initial position when the face was found.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.righteyebrowlowered', (e) => {
console.log(e)
})
righteyebrowraisedβ
This event is emitted by Face Effects when a tracked face's right eyebrow is raised from its initial position when the face was found.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.righteyebrowraised', (e) => {
console.log(e)
})
righteyeclosedβ
This event is emitted by Face Effects when a tracked face's right eye closes.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.righteyeclosed', (e) => {
console.log(e)
})
righteyeopenedβ
This event is emitted by Face Effects when a tracked face's right eye opens.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.righteyeopened', (e) => {
console.log(e)
})
righteyewinkedβ
This event is emitted by Face Effects when a tracked face's right eye closes and opens within 750ms while the left eye remains open.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face. |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.righteyewinked', (e) => {
console.log(e)
})
earpointfoundβ
This event is emitted by Face Effects when an ear point is found.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face |
point | String | Ear point name. One of the following: leftLobe , leftCanal , leftHelix , rightLobe , rightCanal , rightHelix |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.earpointfound', (e) => {
console.log(e)
})
earpointlostβ
This event is emitted by Face Effects when an ear point is lost.
Propertiesβ
Property | Type | Description |
---|
id | Number | A numerical id of the located face |
point | String | Ear point name. One of the following: leftLobe , leftCanal , leftHelix , rightLobe , rightCanal , rightHelix |
Exampleβ
world.events.addListener(world.events.globalId, 'facecontroller.earpointfound', (e) => {
console.log(e)
})