onFaceInfo
Reports face information processed by the voice driver plugin.
onFaceInfo?(outFaceInfo: string): void;
Parameters
- outFaceInfo
- Output parameter. A JSON string of the face information processed by the voice driver plugin, containing the following fields:
- faces: An array of objects. Each object contains information about a detected face.
- blendshapes: Object. A set of blendshape coefficients named according to the ARKit standard. Each key-value pair represents a blendshape coefficient. The coefficient is a float in the range [0.0, 1.0].
- rotation: An array of objects. Head rotation values, including the following key-value pairs with float values in the range [-180.0, 180.0]:
- pitch: Head pitch angle. Positive when looking down, negative when looking up.
- yaw: Head yaw angle. Positive when turning left, negative when turning right.
- roll: Head roll angle. Positive when tilting right, negative when tilting left.
- timestamp: String. The timestamp of the output result in milliseconds.
Return Values
- true: Successfully parsed the face information JSON.
- false: Failed to parse the face information JSON.