Skip to main content

Face106Interface

APJS Script API reference for the Face106Interface interface.

TypeNameInterface Description
VariableseyeDistance: number

Function: Eye distance

VariablesID: number

Function: Each detected face has a unique faceID. When a face that was lost during tracking is detected again, it will have a new faceID.

Variablespitch: number

Function: Pitch angle in radians. Positive and negative values represent opposite up/down head tilts.

VariablespointsArray: Float32Array

Function: Vector2f Flat Array <br/>Array of 106 key points of the human face, stored as [x0, y0, x1, y1, ...] in normalized camera input coordinates [0.0, 1.0]. (0, 0) is bottom-left; x increases rightward and y increases upward.

Variablesrect: Rect

Function: Bounding rectangle of the detected face in normalized coordinates [0.0, 1.0], relative to the camera input image. x and y represent the bottom-left corner; width and height extend rightward and upward.

Variablesroll: number

Function: Roll angle in radians. Positive and negative values represent opposite head tilts around the forward axis.

Variablesscore: number

Function: Confidence score in the range [0, 1].

VariablesvisibilityArray: Float32Array

Function: Visibility of corresponding points. The point is not occluded: 1.0, and occluded: 0.0

Variablesyaw: number

Function: Yaw angle in radians. Positive and negative values represent opposite side-to-side head rotations.

FunctionshasAction(action: number | FaceAction): boolean

Function: Returns whether the specified facial action is currently detected.

Parameters

action: - The action enum value or numeric action identifier to test.

Examples

pitch: number

const face = result.getFaceBaseInfo(0);
const upWard = face.pitch < -0.2;
const downWard = face.pitch > 0.2;

roll: number

const face = result.getFaceBaseInfo(0);
const isTiltedLeft = face.roll > 0.2;
const isTiltedRight = face.roll < -0.2;

yaw: number

const face = result.getFaceBaseInfo(0);
const facingLeft = face.yaw > 0.2;
const facingRight = face.yaw < -0.2;

hasAction(action: number | FaceAction): boolean

const face = result.getFaceBaseInfo(0);
if (face.hasAction(APJS.FaceAction.MouthAh)) {
// react to an open mouth
}

Use Case

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use Face106Interface here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies