Skip to main content

XR8.FaceController.configure()

XR8.FaceController.configure({ nearClip, farClip, meshGeometry, coordinates })

Description

Configures what processing is performed by FaceController.

Parameters

ParameterTypeDefaultDescription
nearClip [Optional]Number0.01The distance from the camera of the near clip plane, i.e. the closest distance to the camera at which scene objects are visible.
farClip [Optional]Number1000The distance from the camera of the far clip plane, i.e. the farthest distance to the camera at which scene objects are visible.
meshGeometry [Optional]Array<String>[XR8.FaceController.MeshGeometry.FACE]Controls which parts of the head geometry are visible. Options: [XR8.FaceController.MeshGeometry.FACE, XR8.FaceController.MeshGeometry.EYES, XR8.FaceController.MeshGeometry.IRIS, XR8.FaceController.MeshGeometry.MOUTH]
maxDetections [Optional]Number1The maximum number of faces to detect. The available choices are 1, 2, or 3.
enableEars [Optional]BooleanfalseIf true, runs ear detection simultaneosly with Face Effects and returns ear attachment points.
uvType [Optional]String[XR8.FaceController.UvType.STANDARD]Specifies which uvs are returned in the facescanning and faceloading event. Options are: [XR8.FaceController.UvType.STANDARD, XR8.FaceController.UvType.PROJECTED]
coordinates [Optional]CoordinatesThe camera configuration.

The Coordinates object has the following properties:

ParameterTypeDefaultDescription
origin [Optional]{position: {x, y, z}, rotation: {w, x, y, z}}{position: {x: 0, y: 0, z: 0}, rotation: {w: 1, x: 0, y: 0, z: 0}}The position and rotation of the camera.
scale [Optional]Number1Scale of the scene.
axes [Optional]String'RIGHT_HANDED'Can be either 'LEFT_HANDED' or 'RIGHT_HANDED'.
mirroredDisplay [Optional]BooleanFalseIf true, flip left and right in the output.

IMPORTANT: XR8.FaceController cannot be used at the same time as XR8.XrController.

Returns

None

Example

  XR8.FaceController.configure({
meshGeometry: [XR8.FaceController.MeshGeometry.FACE],
coordinates: {
mirroredDisplay: true,
axes: 'LEFT_HANDED',
},
})