Skip to main content

FacePetInfoInterface

APJS Script API reference for the FacePetInfoInterface interface.

TypeNameInterface Description
Variablesaction: number

Function: Action type <br/> The 1st, 2nd, and 3rd digits are respectively encoded as: left eye open/close, right eye open/close, mouth open/close

VariablesearType: number

Function: Ear status <br/> 0 indicates the ears are upright, and 1 indicates the ears are drooping.

VariablesfacePetType: FacePetType

Function: Pet face types (cat, dog, human)

VariablesID: number

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

Variablespitch: number

Function: Pitch angle, with the real measurement being negative above and positive below, in radians

VariablespointsArray: Float32Array

Function: Vector2f Flat Array. Normalized, 2D key point coordinates.

Variablesrect: Rect

Function: The rectangular area of the pet face

Variablesroll: number

Function: Rotation angle in radians. Negative values indicate left tilt and positive values indicate right tilt.

Variablesscore: number

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

Variablesyaw: number

Function: Horizontal rotation angle in radians. Negative values indicate rightward rotation and positive values indicate leftward rotation.

Use Case

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